/* ===== YOUTUBE-STYLE VARIABLES ===== */
:root {
    --yt-card-dark: #212121;
    --yt-border-dark: #f9f9f92b;
    --yt-text-primary: #ffffff;
    --yt-text-secondary: #ffffff;
    --yt-red: #ff0000;
    --yt-red-hover: #cc0000;
    --yt-card-dark: #f9f9f92b;

}

[theme-mode="dark"]:root {
    --yt-card-dark: #3a3a3a;
    --yt-text-secondary: #aaaaaa;
    --yt-border-dark:#303030;
}


.main-layout {
    display: flex;
    gap: 24px;
}

.sidebar {
    width: 426px;
    flex-shrink: 0;
}

/* ===== VIDEO PLAYER SECTION ===== */
.video-player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#mainVideoPlayer {
    width: 100%;
    height: auto;
    max-height: 720px;
    display: block;
}

/* ===== VIDEO INFO SECTION ===== */
.video-info {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--yt-border-dark);
}

.video-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    margin-bottom: 12px;
    color: var(--yt-text-primary);
}

/* Video Stats Row */
.video-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--yt-text-secondary);
    font-size: 14px;
}

.video-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Action Buttons */
.action-btn {
    background: var(--yt-card-dark);
    border: none;
    color: var(--yt-text-primary);
    padding: 8px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 500;
    height: 36px;
}

.action-btn:hover {
    background: var(--yt-border-dark);
}

.action-btn.active {
    background: var(--yt-red);
    color: white;
}

.action-btn.liked {
    animation: likePulse 0.6s ease;
}

@keyframes likePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.subscribe-btn {
    background: var(--yt-red);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
    font-size: 14px;
    height: 36px;
}

.subscribe-btn:hover {
    background: var(--yt-red-hover);
}

.subscribe-btn.subscribed {
    background: var(--yt-card-dark);
    color: var(--yt-text-secondary);
}

/* ===== CHANNEL INFO ===== */
.channel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--yt-border-dark);
    margin-bottom: 24px;
}

.channel-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--yt-text-primary);
}

.channel-details p {
    font-size: 13px;
    color: var(--yt-text-secondary);
}

/* ===== DESCRIPTION SECTION ===== */
.description-container {
    background: var(--yt-card-dark);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    cursor: pointer;
    /* transition: background-color 0.2s; */
}

/* .description-container:hover {
    background: var(--yt-border-dark);
} */

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.description-header span {
    font-weight: 600;
    font-size: 16px;
    color: var(--yt-text-primary);
}

.description-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--yt-text-primary);
    max-height: 72px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.description-text.expanded {
    max-height: 500px;
}

.show-more-feed {
    color: var(--yt-text-secondary);
    font-weight: 500;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.show-more-feed:hover {
    color: var(--yt-text-primary);
}

/* ===== SPONSOR BANNER ===== */
.sponsor-banner {
    background: var(--yt-card-dark);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    /* border: 1px solid var(--yt-border-dark); */
}

.sponsor-label {
    font-size: 12px;
    color: var(--yt-text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sponsor-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--yt-text-primary);
}

.sponsor-text {
    font-size: 14px;
    color: var(--yt-text-secondary);
    line-height: 1.5;
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
    margin-top: 32px;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.comments-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--yt-text-primary);
}

.comments-sort {
    background: var(--yt-card-dark);
    border: none;
    color: var(--yt-text-primary);
    padding: 8px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.comments-sort:hover {
    background: var(--yt-border-dark);
}

/* Comment Form */
.comment-form {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input-wrapper {
    flex: 1;
    position: relative;
}

.comment-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--yt-border-dark);
    color: var(--yt-text-primary);
    padding: 8px 0;
    font-size: 14px;
    transition: border-color 0.2s;
}

.comment-input:focus {
    outline: none;
    border-bottom-color: var(--yt-blue);
}


/* Comments List */
.comment {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--yt-border-dark);
}

.comment:last-child {
    border-bottom: none;
}

.comment-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--yt-text-primary);
}

.comment-content h4 span {
    font-size: 12px;
    color: var(--yt-text-secondary);
    font-weight: normal;
    margin-left: 8px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--yt-text-primary);
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--yt-text-secondary);
}

.comment-action-btn {
    background: var(--yt-card-dark);
    border: none;
    color: var(--yt-text-secondary);
    padding: 6px 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.comment-action-btn:hover {
    background: var(--yt-border-dark);
    color: var(--yt-text-primary);
}


/* ===== SIDEBAR RECOMMENDATIONS ===== */
.recommendations-sidebar {
    position: sticky;
    top: 0px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 8px;
}

.recommendations-sidebar::-webkit-scrollbar {
    width: 8px;
}

.recommendations-sidebar::-webkit-scrollbar-track {
    background: var(--yt-card-dark);
    border-radius: 4px;
}

.recommendations-sidebar::-webkit-scrollbar-thumb {
    background: var(--yt-border-dark);
    border-radius: 4px;
}

.recommendations-sidebar::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

/* Recommendations Header */
.section-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--yt-text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--yt-border-dark);
}

/* Recommendation Item - YouTube Style */
.recommendation-item {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 8px;
    border-radius: 8px;
}

.recommendation-item:hover {
    background: var(--yt-card-dark);
}

.recommendation-item.active {
    background: var(--yt-card-dark);
    border-left: 3px solid var(--yt-red);
}

.recommendation-thumbnail {
    width: 168px;
    height: 94px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #000;
}

.recommendation-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Duration Badge */
.duration-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Live Badge */
.live-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--yt-red);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

/* Recommendation Info */
.recommendation-info {
    flex: 1;
    min-width: 0;
    padding: 2px 0;
}

.recommendation-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--yt-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-channel {
    font-size: 12px;
    color: var(--yt-text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recommendation-stats {
    font-size: 12px;
    color: var(--yt-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.recommendation-stats .dot {
    width: 3px;
    height: 3px;
    background: var(--yt-text-secondary);
    border-radius: 50%;
    margin: 0 4px;
}

/* Shorts Section */
.shorts-section {
    margin-top: 32px;
    border-top: 1px solid var(--yt-border-dark);
    padding-top: 20px;
}

.shorts-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.shorts-header i {
    color: var(--yt-red);
    font-size: 20px;
}

.shorts-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--yt-text-primary);
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.short-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.short-item:hover {
    transform: scale(1.02);
}

.short-thumbnail {
    width: 100%;
    aspect-ratio: 15/20;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #000;
}

.short-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.short-info h4 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
    color: var(--yt-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-info p {
    font-size: 12px;
    color: var(--yt-text-secondary);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--yt-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--yt-border-dark);
    border-top-color: var(--yt-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--yt-card-dark);
    color: var(--yt-text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    border-left: 4px solid var(--yt-red);
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification i {
    color: var(--yt-red);
    font-size: 18px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .recommendations-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .shorts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .video-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .video-actions {
        width: 100%;
        justify-content: space-between;
    }

    .shorts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .video-title {
        font-size: 18px;
        line-height: 24px;
    }

    .channel-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .shorts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /*.recommendation-item {*/
    /*    flex-direction: column;*/
    /*}*/

    .recommendation-thumbnail {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 576px) {
    .video-title {
        font-size: 16px;
    }

    .action-btn,
    .subscribe-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .shorts-grid {
        grid-template-columns: 1fr;
    }

    .recommendation-title {
        font-size: 13px;
    }

    .comments-sort {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ===== UTILITY CLASSES ===== */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 24px;
}

/* Add these styles for badges */
.image-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
}

.image-badge i {
    margin-right: 2px;
    font-size: 10px;
}

.live-badge i {
    margin-right: 2px;
    font-size: 8px;
    animation: pulse 1.5s infinite;
}

.comment-input-wrapper::placeholder {
    color: #fff!important;
}

/* 22-10  */
/* WRAPPER */
.feed-wrapper{
  /*height:calc(100vh - 100px);*/
  position:relative;
  display: flex;
}

/* ITEM */
.item{
  height:calc(100vh - 200px);
  display:none;
  align-items:center;
  justify-content:center;
  position:relative;
   margin-bottom: 10px;
}
.item.active{display:flex}

/* LANDSCAPE */
.landscape iframe{
  width:90%;
  height:90%;
  border-radius:16px;
  border:none;
}

/* VERTICAL (shorts / reels) */
.vertical iframe{
  width:360px;
  height:640px;
  border-radius:16px;
  border:none;
}

/* IMAGE */
.image img{
  width:90%;
  height:640px;
  object-fit:cover;
  border-radius:16px;
}

/* INFO */
.info{
  position:absolute;
  bottom:30px;
  left:30px;
}
.info h3{margin:0;font-size:18px}

/* ARROWS */
.arrow{
  /* position:absolute; */
  right:20px;
  width:44px;
  height:44px;
  border-radius:50%;
  border:none;
  background:rgba(0,0,0,.6);
  color:#fff;
  font-size:18px;
  cursor:pointer;
}
.arrow.up{top:42%}
.arrow.down{top:50%}

@media(max-width:768px){
  .vertical iframe,
  .image img{
    width:100%;
    height:100%;
    border-radius:0;
  }
}