:root {
    --primary-color: #e50914;
    --primary-rgb: 229, 9, 20;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

* {
    box-sizing: border-box;
}

html, body, .episode-player-container, .player-wrapper {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0;
    left: 0;
    background: #000 !important;
    box-sizing: border-box;
}


.player-embed {
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    display: block !important;
    position: static !important;
}


.episode-player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.player-embed {
    width: 100%;
    height: 100%;
    border: none;
    max-width: 100%;
    max-height: 100%;
}

@media (max-aspect-ratio: 16/9) {
    .player-embed {
        width: 100%;
        height: 56.25vw;
        max-height: 100vh;
    }
}

@media (min-aspect-ratio: 16/9) {
    .player-embed {
        height: 100%;
        width: 177.78vh;
        max-width: 100vw;
    }
}

.back-to-series-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.back-to-series-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.back-to-series-btn:hover::before {
    left: 100%;
}

.back-to-series-btn:hover {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(229, 9, 20, 0.2);
    color: white;
    text-decoration: none;
}

.back-to-series-btn:active {
    transform: translateY(0);
}

.back-to-series-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.back-to-series-btn:hover svg {
    transform: translateX(-2px) scale(1.1);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.back-to-series-btn span {
    font-weight: 600;
    transition: color 0.3s ease;
}

.episode-header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.episode-info-display {
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 16px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 280px;
    max-width: 400px;
    flex: 1;
}

.episode-info-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.episode-info-display:hover::before {
    left: 100%;
}

.episode-info-display:hover {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(229, 9, 20, 0.2);
}

.episode-info-content {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.episode-info-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
    animation: pulse-glow 2s ease-in-out infinite;
}

.episode-info-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.5));
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.5));
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(229, 9, 20, 0.8));
    }
}

.episode-info-text-wrapper {
    flex: 1;
    min-width: 0;
}

.episode-info-text {
    color: white;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.episode-info-display:hover .episode-info-text {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.episode-info-progress {
    margin-top: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.episode-info-display:hover .episode-info-progress {
    opacity: 1;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff1a1a 100%);
    border-radius: 2px;
    position: relative;
    animation: progress-glow 2s ease-in-out infinite;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(229, 9, 20, 0.5);
    }
    50% { 
        box-shadow: 0 0 15px rgba(229, 9, 20, 0.8);
    }
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.episodes-menu {
    position: relative;
    z-index: 1;
}

.episodes-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.episodes-menu-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.episodes-menu-toggle:hover::before {
    left: 100%;
}

.episodes-menu-toggle:hover {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(229, 9, 20, 0.2);
}

.episodes-menu-toggle:active {
    transform: translateY(0);
}

.episodes-menu-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.episodes-menu-toggle:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.episodes-menu-toggle-fullscreen {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    display: none;
    width: 56px;
    height: 56px;
    background: rgba(15, 15, 15, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    opacity: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.episodes-menu-toggle-fullscreen:hover {
    background: rgba(25, 25, 25, 0.95);
    border-color: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.3);
}

.episodes-menu-toggle-fullscreen svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.episodes-menu-toggle-fullscreen:hover svg {
    transform: scale(1.1);
}

.episodes-list {
    position: fixed;
    top: 0;
    left: -420px;
    width: 420px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    backdrop-filter: blur(25px);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.6);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1002;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.episodes-list.active {
    left: 0;
}

.episodes-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    z-index: 10;
    backdrop-filter: blur(25px);
}

.episodes-list-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.episodes-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.episodes-close:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.episodes-content {
    padding: 20px 24px;
}

.season-episodes {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.season-episodes.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.episode-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.episode-item:hover::before {
    left: 100%;
}

.episode-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(6px) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.episode-item.current {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(229, 9, 20, 0.08) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.2);
    transform: translateX(4px);
}

.episode-item.current::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, #ff1a1a 100%);
    border-radius: 0 2px 2px 0;
}

.episode-thumbnail {
    position: relative;
    width: 80px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.episode-item:hover .episode-thumbnail {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.episode-item.current .episode-thumbnail {
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.episode-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.episode-item:hover .episode-image {
    transform: scale(1.1);
}

.episode-number-overlay {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.episode-playing-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: pulse 2s infinite;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.episode-playing-overlay svg {
    width: 12px;
    height: 12px;
    margin-left: 1px;
}

.episode-info {
    flex: 1;
    min-width: 0;
}

.episode-name {
    color: white;
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-item:hover .episode-name {
    color: #f0f0f0;
}

.episode-duration {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.episode-duration::before {
    content: '⏱';
    font-size: 11px;
}

.episode-playing {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 9, 20, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(229, 9, 20, 0.2);
}

.episode-playing svg {
    width: 18px;
    height: 18px;
}

@keyframes pulse {
    0% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(229, 9, 20, 0);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
    }
}

.rotate-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    color: white;
    z-index: 2000;
    display: none;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.rotate-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    animation: rotate-hint 2s ease-in-out infinite;
}

@keyframes rotate-hint {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.rotate-message p {
    margin: 0;
    font-size: 16px;
}

@media screen and (max-width: 768px) and (orientation: portrait) {
    .episode-player-container {
        position: relative;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
    }
    
    .player-wrapper {
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .player-embed {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
        object-fit: contain;
        max-width: 100%;
        max-height: 100%;
    }

    .episode-header {
        position: absolute;
        top: calc(10px + var(--safe-area-top));
        left: calc(10px + var(--safe-area-left));
        right: calc(10px + var(--safe-area-right));
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .back-to-series-btn {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 16px;
        align-self: flex-start;
    }
    
    .back-to-series-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .episodes-menu {
        align-self: flex-start;
    }
    
    .episode-info-display {
        min-width: auto;
        max-width: none;
        padding: 12px 16px;
        border-radius: 16px;
        align-self: stretch;
    }
    
    .episode-info-content {
        gap: 10px;
    }
    
    .episode-info-icon {
        width: 20px;
        height: 20px;
    }
    
    .episode-info-text {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .episode-info-progress {
        margin-top: 6px;
    }
    
    .progress-bar {
        height: 2px;
    }
    
    .episodes-menu-toggle {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 16px;
    }
    
    .episodes-menu-toggle span {
        display: none;
    }
    
    .episodes-menu-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .episodes-list {
        width: 100%;
        left: -100%;
        height: 100vh;
        height: 100dvh;
    }
    
    .episodes-menu-toggle-fullscreen {
        bottom: calc(30px + var(--safe-area-bottom));
        right: calc(30px + var(--safe-area-right));
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .episode-info-fullscreen {
        top: calc(20px + var(--safe-area-top));
        left: calc(20px + var(--safe-area-left));
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 16px;
    }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    .episode-player-container {
        position: relative;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
    }
    
    .player-wrapper {
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .player-embed {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
        object-fit: contain;
        max-width: 100%;
        max-height: 100%;
    }

    .episode-header {
        position: absolute;
        top: calc(8px + var(--safe-area-top));
        left: calc(8px + var(--safe-area-left));
        right: calc(8px + var(--safe-area-right));
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .back-to-series-btn {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 14px;
        white-space: nowrap;
        align-self: flex-start;
    }
    
    .back-to-series-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .back-to-series-btn span {
        display: none;
    }
    
    .episodes-menu {
        align-self: flex-start;
    }
    
    .episode-info-display {
        min-width: auto;
        max-width: none;
        padding: 10px 14px;
        border-radius: 14px;
        align-self: stretch;
    }
    
    .episode-info-content {
        gap: 8px;
    }
    
    .episode-info-icon {
        width: 18px;
        height: 18px;
    }
    
    .episode-info-text {
        font-size: 12px;
        line-height: 1.2;
    }
    
    .episode-info-progress {
        margin-top: 4px;
    }
    
    .progress-bar {
        height: 2px;
    }
    
    .episodes-menu-toggle {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 14px;
        white-space: nowrap;
    }
    
    .episodes-menu-toggle span {
        display: none;
    }
    
    .episodes-menu-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .episodes-list {
        width: 100%;
        left: -100%;
        height: 100vh;
        height: 100dvh;
    }
    
    .episodes-menu-toggle-fullscreen {
        bottom: calc(30px + var(--safe-area-bottom));
        right: calc(30px + var(--safe-area-right));
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .episode-info-fullscreen {
        top: calc(20px + var(--safe-area-top));
        left: calc(20px + var(--safe-area-left));
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 14px;
    }
}

:-webkit-full-screen .episode-header,
:-moz-full-screen .episode-header,
:-ms-fullscreen .episode-header,
:fullscreen .episode-header {
    display: none;
}

:-webkit-full-screen .back-to-series-btn,
:-moz-full-screen .back-to-series-btn,
:-ms-fullscreen .back-to-series-btn,
:fullscreen .back-to-series-btn {
    display: none;
}

:-webkit-full-screen .episodes-menu,
:-moz-full-screen .episodes-menu,
:-ms-fullscreen .episodes-menu,
:fullscreen .episodes-menu {
    display: none;
}

:-webkit-full-screen .episode-info-display,
:-moz-full-screen .episode-info-display,
:-ms-fullscreen .episode-info-display,
:fullscreen .episode-info-display {
    display: none;
}

:-webkit-full-screen .episodes-menu-toggle-fullscreen,
:-moz-full-screen .episodes-menu-toggle-fullscreen,
:-ms-fullscreen .episodes-menu-toggle-fullscreen,
:fullscreen .episodes-menu-toggle-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

:-webkit-full-screen .episodes-menu-toggle-fullscreen:hover,
:-moz-full-screen .episodes-menu-toggle-fullscreen:hover,
:-ms-fullscreen .episodes-menu-toggle-fullscreen:hover,
:fullscreen .episodes-menu-toggle-fullscreen:hover {
    opacity: 1;
}

:-webkit-full-screen .episode-info-fullscreen,
:-moz-full-screen .episode-info-fullscreen,
:-ms-fullscreen .episode-info-fullscreen,
:fullscreen .episode-info-fullscreen {
    display: block;
    opacity: 0.8;
}

@supports not (height: 100dvh) {
    @media screen and (max-width: 768px) {
        .episode-player-container {
            height: 100vh;
        }
        
        .episodes-list {
            height: 100vh;
        }
    }
}

@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        .player-wrapper {
            -webkit-transform: translate3d(0, 0, 0);
        }
        
        .player-embed {
            -webkit-transform: translate3d(0, 0, 0);
        }
    }
}

@supports (padding: max(0px)) {
    @media screen and (max-width: 768px) {
        .episode-player-container {
            padding-top: max(0px, var(--safe-area-top));
            padding-bottom: max(0px, var(--safe-area-bottom));
            padding-left: max(0px, var(--safe-area-left));
            padding-right: max(0px, var(--safe-area-right));
        }
    }
}

.seasons-dropdown {
    position: relative;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 84px;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    z-index: 9;
    backdrop-filter: blur(25px);
}

.seasons-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.seasons-dropdown-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.seasons-dropdown-toggle:hover::before {
    left: 100%;
}

.seasons-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.seasons-dropdown-toggle.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff1a1a 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.3);
}

.dropdown-text {
    font-weight: 600;
}

.dropdown-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.seasons-dropdown-toggle.active .dropdown-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.seasons-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.98) 0%, rgba(25, 25, 25, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(25px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.seasons-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.seasons-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.seasons-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.seasons-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.season-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.season-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.4s ease;
}

.season-dropdown-item:hover::before {
    left: 100%;
}

.season-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.season-dropdown-item.active {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(229, 9, 20, 0.08) 100%);
    color: white;
}

.season-dropdown-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, #ff1a1a 100%);
}

.season-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.season-number {
    font-weight: 600;
    font-size: 13px;
}

.episode-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.check-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.season-dropdown-item.active .check-icon {
    opacity: 1;
}

.episode-info-fullscreen {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 16px 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(20px);
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    backdrop-filter: blur(25px);
    z-index: 1000;
}

.error-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: errorFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes errorFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--primary-color);
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.3));
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(229, 9, 20, 0.6));
    }
}

.error-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px rgba(229, 9, 20, 0.5));
}

.error-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.error-message {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 32px;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.error-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.error-button:hover::before {
    left: 100%;
}

.error-button.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff1a1a 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.3);
}

.error-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(229, 9, 20, 0.4);
}

.error-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.error-button.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.error-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.error-button:hover svg {
    transform: scale(1.1);
}

@media screen and (max-width: 768px) {
    .error-content {
        max-width: 90%;
        padding: 30px 24px;
        margin: 20px;
    }
    
    .error-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .error-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .error-message {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .error-button {
        padding: 12px 20px;
        font-size: 14px;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .error-content {
        padding: 24px 20px;
    }
    
    .error-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 16px;
    }
    
    .error-title {
        font-size: 20px;
    }
    
    .error-message {
        font-size: 13px;
    }
}

.error-episodes-section {
    margin: 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.error-episodes-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0 0 20px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-seasons-dropdown {
    position: relative;
    margin-bottom: 20px;
}

.error-seasons-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.error-seasons-dropdown-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.error-seasons-dropdown-toggle:hover::before {
    left: 100%;
}

.error-seasons-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.error-seasons-dropdown-toggle.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff1a1a 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.3);
}

.error-dropdown-text {
    font-weight: 600;
}

.error-dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.error-seasons-dropdown-toggle.active .error-dropdown-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.error-seasons-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.98) 0%, rgba(25, 25, 25, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(25px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.error-seasons-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.error-season-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.error-season-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.4s ease;
}

.error-season-dropdown-item:hover::before {
    left: 100%;
}

.error-season-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.error-season-dropdown-item.active {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(229, 9, 20, 0.08) 100%);
    color: white;
}

.error-season-dropdown-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, #ff1a1a 100%);
}

.error-season-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.error-season-number {
    font-weight: 600;
    font-size: 13px;
}

.error-episode-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.error-check-icon {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.error-season-dropdown-item.active .error-check-icon {
    opacity: 1;
}

.error-episodes-content {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.error-episodes-content::-webkit-scrollbar {
    width: 6px;
}

.error-episodes-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.error-episodes-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.error-season-episodes {
    display: none;
    animation: errorFadeInUp 0.4s ease-out;
}

.error-season-episodes.active {
    display: block;
}

@keyframes errorFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-episode-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.error-episode-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.error-episode-item:hover::before {
    left: 100%;
}

.error-episode-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px) translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.error-episode-item.current {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(229, 9, 20, 0.08) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.2);
    transform: translateX(2px);
}

.error-episode-item.current::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, #ff1a1a 100%);
    border-radius: 0 2px 2px 0;
}

.error-episode-thumbnail {
    position: relative;
    width: 60px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.error-episode-item:hover .error-episode-thumbnail {
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.error-episode-item.current .error-episode-thumbnail {
    box-shadow: 0 3px 12px rgba(229, 9, 20, 0.3);
}

.error-episode-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.error-episode-item:hover .error-episode-image {
    transform: scale(1.1);
}

.error-episode-number-overlay {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.error-episode-unavailable {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.error-episode-unavailable svg {
    width: 8px;
    height: 8px;
}

.error-episode-info {
    flex: 1;
    min-width: 0;
}

.error-episode-name {
    color: white;
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.error-episode-item:hover .error-episode-name {
    color: #f0f0f0;
}

.error-episode-duration {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.error-episode-duration::before {
    content: '⏱';
    font-size: 10px;
}

.error-episode-status {
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
}

@media screen and (max-width: 768px) {
    .error-episodes-section {
        margin: 24px 0;
        padding-top: 20px;
    }
    
    .error-episodes-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .error-episodes-content {
        max-height: 250px;
    }
    
    .error-episode-item {
        padding: 10px;
        margin: 6px;
        gap: 10px;
    }
    
    .error-episode-thumbnail {
        width: 50px;
        height: 28px;
    }
    
    .error-episode-name {
        font-size: 12px;
    }
    
    .error-episode-duration {
        font-size: 10px;
    }
    
    .error-episode-status {
        font-size: 9px;
    }
}

@media screen and (max-width: 480px) {
    .error-episodes-content {
        max-height: 200px;
    }
    
    .error-episode-item {
        padding: 8px;
        margin: 4px;
        gap: 8px;
    }
    
    .error-episode-thumbnail {
        width: 45px;
        height: 25px;
    }
    
    .error-episode-name {
        font-size: 11px;
    }
}

.episode-player-container:not(.controls-visible):not(.paused):not(.settings-active) .episode-header,
.episode-player-container:not(.controls-visible):not(.paused):not(.settings-active) .back-to-series-btn,
.episode-player-container:not(.controls-visible):not(.paused):not(.settings-active) .episodes-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}
.episode-player-container.controls-visible .episode-header,
.episode-player-container.paused .episode-header,
.episode-player-container.settings-active .episode-header,
.episode-player-container.controls-visible .back-to-series-btn,
.episode-player-container.paused .back-to-series-btn,
.episode-player-container.settings-active .back-to-series-btn,
.episode-player-container.controls-visible .episodes-menu,
.episode-player-container.paused .episodes-menu,
.episode-player-container.settings-active .episodes-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s, visibility 0.3s;
}