/* FENOGRAM Watch Page - Final Clean Design */

:root {
    --black: #0a0a0a;
    --dark: #1a1a1a;
    --gray: #2a2a2a;
    --yellow: #FFFF8A;
    --white: #f5f5f5;
    --text: #b3b3b3;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.watch-page {
    font-family: 'Poppins', sans-serif;
    background: var(--black);
    color: var(--white);
    overflow: hidden;
}

@media (max-width: 1200px) {
    body.watch-page {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

.back-btn:hover {
    background: rgba(255,255,138,0.2);
    border-color: var(--yellow);
    color: var(--yellow);
    transform: scale(1.05);
}

.watch-container {
    display: flex;
    height: 100vh;
}

.player-section {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--black);
}

.player-box {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-js {
    width: 100%;
    height: 100%;
}

.vjs-big-play-button, .video-js .vjs-control-bar {
    display: none !important;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    z-index: 10;
}

.play-btn:hover {
    background: rgba(255,255,138,0.15);
    border-color: var(--yellow);
    transform: translate(-50%, -50%) scale(1.08);
}

.play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-btn img {
    width: 32px;
    filter: brightness(0) invert(1);
}

.seek-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s var(--ease);
    z-index: 9;
    color: white;
}

.seek-btn:hover {
    background: rgba(0,0,0,0.6);
    transform: translateY(-50%) scale(1.1);
}

.player-box:hover .seek-btn {
    opacity: 1;
}

.seek-btn.left {
    left: 40px;
}

.seek-btn.right {
    right: 40px;
}

.seek-btn span {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 8;
}

.controls.active {
    opacity: 1;
}

.controls > * {
    pointer-events: auto;
}

.top-bar {
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    padding: 70px 25px 50px;
}

.title {
    font-size: 17px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.bottom-bar {
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
    padding: 15px 25px 20px;
}

.progress {
    padding: 0 0 10px;
    cursor: pointer;
}

.track {
    position: relative;
    height: 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
}

.fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--yellow);
    border-radius: 3px;
    width: 0%;
}

.handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress:hover .handle {
    opacity: 1;
}

.buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.left-btns, .right-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.btn:hover {
    background: rgba(255,255,138,0.2);
    border-color: var(--yellow);
    transform: scale(1.05);
}

/* Volume Control - Same as Progress Bar */
.volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider-wrapper {
    position: relative;
    width: 80px;
    height: 5px;
    cursor: pointer;
}

.volume-track {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    position: relative;
}

.volume-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--yellow);
    border-radius: 3px;
    width: 100%;
}

.volume-handle {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.volume-slider-wrapper:hover .volume-handle {
    opacity: 1;
}

.time {
    font-size: 14px;
    font-weight: 500;
    padding: 0 8px;
    white-space: nowrap;
}

.dropdown {
    position: relative;
}

.menu {
    position: absolute;
    bottom: 48px;
    right: 0;
    min-width: 160px;
    background: rgba(26,26,26,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s var(--ease);
    z-index: 100;
    pointer-events: none;
}

.menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.item {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.item:hover {
    background: rgba(255,255,138,0.1);
    color: var(--yellow);
}

.item.active {
    background: rgba(255,255,138,0.15);
    color: var(--yellow);
    padding-left: 36px;
    position: relative;
}

.item.active::before {
    content: '✓';
    position: absolute;
    left: 16px;
    font-weight: 700;
}

.sidebar {
    width: 400px;
    background: var(--dark);
    border-left: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.info {
    padding: 35px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.info h1 {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
}

.meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.highlight {
    color: var(--yellow);
    font-weight: 600;
}

.info p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
}

.seasons {
    display: flex;
    gap: 10px;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow-x: auto;
}

.seasons::-webkit-scrollbar {
    height: 4px;
}

.seasons::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.seasons::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.season-btn {
    flex-shrink: 0;
    min-width: 80px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    padding: 0 16px;
}

.season-btn:hover {
    background: rgba(255,255,255,0.08);
}

.season-btn.active {
    background: rgba(255,255,138,0.12);
    border-color: var(--yellow);
    color: var(--yellow);
}

.season-btn.short {
    min-width: 50px;
    padding: 0 12px;
}

.episodes {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    max-height: calc(100vh - 580px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.episodes::-webkit-scrollbar {
    width: 0;
    display: none;
}

.episodes {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.ep-item {
    display: flex;
    gap: 12px;
    padding: 10px 30px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border-left: 3px solid transparent;
    border-radius: 3px;
}

.ep-item:hover {
    background: rgba(255,255,255,0.03);
}

.ep-item.active {
    background: rgba(255,255,138,0.08);
    border-left-color: var(--yellow);
}

.ep-thumb {
    position: relative;
    width: 120px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: var(--gray);
}

.ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease);
}

.ep-item:hover .ep-thumb img {
    transform: scale(1.05);
}

/* Play Icon - Content Detail Style */
.ep-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s;
}

.ep-item:hover .ep-play {
    opacity: 1;
}

.ep-play img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.ep-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.ep-details {
    flex: 1;
    min-width: 0;
}

.ep-num {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ep-item.active .ep-num {
    color: var(--yellow);
}

.ep-name {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-dur {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    margin-left: 8px;
}

.next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 55px;
    margin: 20px 30px;
    background: rgba(255,255,138,0.08);
    border-left: 6px solid var(--yellow);
    border-radius: 4px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--ease);
}

.next-btn:hover {
    background: rgba(255,255,138,0.15);
}

.next-btn img {
    width: 18px;
}

@media (max-width: 1200px) {
    .watch-container {
        flex-direction: column;
        height: auto;
    }
    
    .player-section {
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
    }
    
    .episodes {
        max-height: none;
        overflow-y: visible;
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .back-btn {
        width: 36px;
        height: 36px;
        top: 12px;
        left: 12px;
    }
    
    .back-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .player-section {
        padding: 0;
    }
    
    .player-box {
        width: 100%;
        padding-bottom: 56.25%;
    }
    
    .seek-btn {
        width: 60px;
        height: 60px;
    }
    
    .seek-btn.left {
        left: 15px;
    }
    
    .seek-btn.right {
        right: 15px;
    }
    
    .seek-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .seek-btn span {
        font-size: 11px;
    }
    
    .play-btn {
        width: 65px;
        height: 65px;
    }
    
    .play-btn img {
        width: 26px;
    }
    
    .sidebar {
        order: 2;
    }
    
    .next-btn {
        order: 1;
        margin: 15px 20px;
        height: 48px;
        font-size: 14px;
    }
    
    .next-btn img {
        width: 16px;
    }
    
    .info {
        padding: 20px;
        order: 3;
    }
    
    .info h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .meta {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .info p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .seasons {
        padding: 15px 20px;
        gap: 8px;
        order: 4;
    }
    
    .season-btn {
        height: 36px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .season-btn.short {
        min-width: 42px;
        padding: 0 10px;
    }
    
    .episodes {
        padding: 5px 0;
        order: 5;
    }
    
    .ep-item {
        padding: 8px 20px;
        margin: 0 8px;
    }
    
    .ep-thumb {
        width: 100px;
        height: 56px;
    }
    
    .ep-play {
        width: 42px;
        height: 30px;
    }
    
    .ep-play img {
        width: 14px;
        height: 14px;
    }
    
    .ep-num {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .ep-name {
        font-size: 12px;
    }
    
    .ep-dur {
        font-size: 11px;
    }
    
    .volume {
        display: none;
    }
    
    .controls {
        font-size: 14px;
    }
    
    .top-bar {
        padding: 50px 15px 35px;
    }
    
    .title {
        font-size: 14px;
    }
    
    .bottom-bar {
        padding: 10px 15px 15px;
    }
    
    .btn {
        width: 34px;
        height: 34px;
    }
    
    .btn svg {
        width: 16px;
        height: 16px;
    }
    
    .time {
        font-size: 12px;
        padding: 0 5px;
    }
    
    .left-btns, .right-btns {
        gap: 6px;
    }
}