/* Shorts Container */
.shorts-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

@media (min-width: 769px) {
    .shorts-container {
        left: 240px;
    }
}

@media (max-width: 768px) {
    .shorts-container {
        top: 60px;
    }
}

/* Shorts Player */
.shorts-player {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Video Container */
.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.video-container::-webkit-scrollbar {
    display: none;
}

/* Narrower video layout */
.video-item {
    width: 70%;
    max-width: 400px;
    margin: 0 auto;
    height: 100%;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.video-description {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.video-description.hidden {
    display: none;
}

.video-channel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

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

/* YouTube Player Wrapper */
.youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* lower than info */
    pointer-events: auto;
}
.youtube-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Overlay (non-interactive) */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.5) 100%);
    pointer-events: none; /* allow clicks to pass through to player */
}

/* Video Info (interactive) */
.video-info {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 16px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    z-index: 12; /* above overlay but below mute/action buttons */
    pointer-events: auto; /* needed for clicks */
}

/* Action Buttons */
.action-buttons {
    position: absolute;
    right: 12px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 13; /* topmost */
    pointer-events: auto;
}

/* Mute Button */
.mute-btn {
    z-index: 13;
    pointer-events: auto;
}


.channel-name {
    font-size: 13px;
    font-weight: 500;
}

.subscribe-btn {
    margin-left: auto;
    background: white;
    color: black;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.subscribe-btn:hover {
    background: #f0f0f0;
}

.video-hashtags {
    font-size: 13px;
    color: #3ea6ff;
    font-weight: 500;
}
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}
.action-btn:hover { transform: scale(1.1); }
.action-btn i { font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.action-btn span { font-size: 12px; font-weight: 500; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.action-btn.liked i { color: #ff0000; }
.action-btn.disliked i { color: #ff0000; }

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 22;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}
.nav-arrow:hover { background: rgba(255,255,255,0.3); transform: translateX(-50%) scale(1.1); }
.nav-arrow-up { top: 20px; }
.nav-arrow-down { bottom: 20px; }
.nav-arrow i { font-size: 20px; }

/* Mute Button */
.mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 22;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}
.mute-btn:hover { background: rgba(0,0,0,0.7); }
.mute-btn i { font-size: 18px; }

/* Hide controls on small screens */
@media (max-width: 640px) {
    .video-info { right: 70px; padding: 16px; }
    .action-buttons { right: 8px; bottom: 60px; gap: 16px; }
    .action-btn i { font-size: 24px; }
    .action-btn span { font-size: 11px; }
    .nav-arrow { width: 40px; height: 40px; }
    .nav-arrow i { font-size: 18px; }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .video-title { font-size: 13px; }
    .channel-avatar { width: 28px; height: 28px; font-size: 12px; }
    .channel-name { font-size: 12px; }
    .subscribe-btn { padding: 6px 12px; font-size: 12px; }
    .video-description { font-size: 12px; }
}
