

:root {
    
    --fs-display: clamp(2rem, 5vw, 4.5rem);
    --fs-hero: clamp(1.5rem, 4vw, 3.5rem);
    --fs-heading: clamp(1.25rem, 3vw, 2rem);
    --fs-subheading: clamp(1.125rem, 2.5vw, 1.5rem);
    --fs-body: clamp(0.875rem, 2vw, 1rem);
    --fs-small: clamp(0.75rem, 1.5vw, 0.875rem);

    --space-xs: clamp(0.25rem, 1vw, 0.5rem);
    --space-sm: clamp(0.5rem, 2vw, 1rem);
    --space-md: clamp(1rem, 3vw, 1.5rem);
    --space-lg: clamp(1.5rem, 4vw, 2rem);
    --space-xl: clamp(2rem, 5vw, 3rem);
    --space-2xl: clamp(3rem, 6vw, 4rem);
    --space-3xl: clamp(4rem, 7vw, 5rem);

   
    --container-padding: clamp(1rem, 5vw, 2rem);

  
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

   
    --rudolf-sky: #00e5ff;
    --rudolf-sky-light: #66ffff;
    --rudolf-sky-dark: #0099cc;
    --rudolf-cosmic: #001e3c;
    --rudolf-cosmic-dark: #000814;
    --rudolf-nebula: #0a2540;
    --rudolf-aurora: #00ffcc;
    --rudolf-plasma: #ff00ff;
    --rudolf-solar: #ffaa00;
}


.container-responsive {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}


.container-responsive {
    max-width: 100%;
}

@media (min-width: 640px) {
    .container-responsive { max-width: 640px; }
}

@media (min-width: 768px) {
    .container-responsive { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container-responsive { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container-responsive { max-width: 1280px; }
}

@media (min-width: 1536px) {
    .container-responsive { max-width: 1400px; }
}


.nav-responsive {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: var(--space-sm);
    backdrop-filter: blur(20px);
    background: rgba(10, 37, 64, 0.8);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
}


.nav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}


.nav-center {
    display: none;
    flex: 1;
    justify-content: center;
}

@media (min-width: 768px) {
    .nav-center {
        display: flex;
    }
}


.nav-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: var(--fs-heading);
    font-weight: 900;
    background: linear-gradient(135deg, var(--rudolf-sky), var(--rudolf-aurora));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: var(--fs-body);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--rudolf-sky);
}


.nav-user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.nav-username {
    display: none;
    color: var(--rudolf-sky);
    font-weight: 600;
    font-size: var(--fs-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

@media (min-width: 768px) {
    .nav-username {
        display: block;
    }
}


.search-responsive {
    display: none !important;
}


.nav-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--rudolf-sky);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--space-xs);
    transition: all 0.3s ease;
}

.nav-menu-toggle:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: scale(1.1);
}

@media (min-width: 768px) {
    .nav-menu-toggle {
        display: none;
    }
}


@media (min-width: 768px) {
    .nav-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: var(--space-lg);
    }

    .nav-main {
        grid-column: 1;
        justify-content: flex-start;
    }

    .nav-center {
        grid-column: 2;
    }

    .nav-user-menu {
        grid-column: 3;
        justify-content: flex-end;
    }
}


.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--rudolf-cosmic);
    backdrop-filter: blur(20px);
    transition: left 0.3s ease;
    z-index: 100;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--rudolf-sky);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--space-xs);
}

.mobile-menu-links {
    padding: var(--space-lg);
}

.mobile-menu-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: var(--space-md) 0;
    font-size: var(--fs-body);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    transition: color 0.3s ease;
}

.mobile-menu-link:hover {
    color: var(--rudolf-sky);
}


.nav-user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-username {
    display: none;
    color: var(--rudolf-sky);
    font-weight: 600;
    font-size: var(--fs-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

@media (min-width: 768px) {
    .nav-username {
        display: block;
    }
}


.hero-responsive {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--container-padding);
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Bebas Neue', cursive;
    font-size: var(--fs-display);
    color: white;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: var(--fs-heading);
    color: var(--rudolf-sky-light);
    margin-bottom: var(--space-xl);
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

@media (min-width: 768px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}


.grid-responsive {
    display: grid;
    gap: var(--space-md);
}


.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}


.card-responsive {
    background: rgba(10, 37, 64, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: clamp(0.75rem, 2vw, 1rem);
    padding: var(--space-lg);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-responsive:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 229, 255, 0.2);
    border-color: rgba(0, 229, 255, 0.4);
}


.anime-grid-responsive {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

@media (max-width: 480px) {
    .anime-grid-responsive {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-sm);
    }
}

@media (min-width: 768px) {
    .anime-grid-responsive {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (min-width: 1024px) {
    .anime-grid-responsive {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}


.btn-responsive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    border: none;
    border-radius: clamp(1.5rem, 4vw, 3rem);
    font-size: var(--fs-body);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    min-height: clamp(2.5rem, 6vw, 3rem);
}

.btn-cosmic-responsive {
    background: linear-gradient(135deg, var(--rudolf-sky), var(--rudolf-sky-dark));
    color: var(--rudolf-cosmic-dark);
    position: relative;
    overflow: hidden;
}

.btn-cosmic-responsive:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.4);
}

.btn-outline-responsive {
    background: transparent;
    border: 2px solid var(--rudolf-sky);
    color: var(--rudolf-sky);
}

.btn-outline-responsive:hover {
    background: var(--rudolf-sky);
    color: var(--rudolf-cosmic-dark);
}


.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: clamp(0.5rem, 1.5vw, 0.75rem);
}


.aspect-16-9 {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.aspect-4-3 {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
}

.aspect-2-3 {
    aspect-ratio: 2/3;
    position: relative;
    overflow: hidden;
}


.video-player-responsive {
    position: relative;
    width: 100%;
    border-radius: clamp(0.75rem, 2vw, 1rem);
    overflow: hidden;
    background: #000;
}

.video-wrapper-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-element-responsive {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.modal-responsive {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: 1000;
}

.modal-content-responsive {
    background: var(--rudolf-cosmic);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: clamp(1rem, 3vw, 1.5rem);
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    width: min(600px, 100%);
    padding: var(--space-xl);
    backdrop-filter: blur(20px);
}


.form-group-responsive {
    margin-bottom: var(--space-lg);
}

.form-label-responsive {
    display: block;
    color: var(--rudolf-sky);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    font-size: var(--fs-body);
}

.form-input-responsive {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem);
    background: var(--rudolf-nebula);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: clamp(0.5rem, 1.5vw, 0.75rem);
    color: white;
    font-size: var(--fs-body);
    transition: all 0.3s ease;
}

.form-input-responsive:focus {
    outline: none;
    border-color: var(--rudolf-sky);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}


.text-display-responsive {
    font-size: var(--fs-display);
    line-height: 1.1;
}

.text-hero-responsive {
    font-size: var(--fs-hero);
    line-height: 1.2;
}

.text-heading-responsive {
    font-size: var(--fs-heading);
    line-height: 1.3;
}

.text-body-responsive {
    font-size: var(--fs-body);
    line-height: 1.6;
}

.text-small-responsive {
    font-size: var(--fs-small);
    line-height: 1.5;
}


.search-responsive {
    position: relative;
    width: 100%;
    max-width: min(400px, 100%);
}

.search-input-responsive {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    padding-right: clamp(2.5rem, 5vw, 3rem);
    background: rgba(10, 37, 64, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: clamp(1.5rem, 4vw, 3rem);
    color: white;
    font-size: var(--fs-body);
}

.search-icon-responsive {
    position: absolute;
    right: clamp(0.75rem, 2vw, 1rem);
    top: 50%;
    transform: translateY(-50%);
    color: var(--rudolf-sky);
}


.user-menu-responsive {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
}

.user-avatar-responsive {
    width: clamp(2rem, 5vw, 2.5rem);
    height: clamp(2rem, 5vw, 2.5rem);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rudolf-sky), var(--rudolf-aurora));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rudolf-cosmic-dark);
    flex-shrink: 0;
}

.user-dropdown-responsive {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: clamp(150px, 30vw, 200px);
    background: var(--rudolf-cosmic);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: clamp(0.5rem, 1.5vw, 0.75rem);
    overflow: hidden;
    z-index: 1000;
}


.notification-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: rgba(0, 229, 255, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-badge {
    background: var(--rudolf-aurora);
    color: var(--rudolf-cosmic-dark);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 9999px;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}


.toast-notification {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
}

@media (max-width: 640px) {
    .toast-notification {
        right: 0.5rem;
        left: 0.5rem;
        min-width: auto;
        max-width: none;
    }

    #notifications-dropdown {
        width: calc(100vw - 2rem);
        max-width: 320px;
        right: -0.5rem;
    }
}


#notifications-dropdown {
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--rudolf-sky) var(--rudolf-nebula);
}

#notifications-dropdown::-webkit-scrollbar {
    width: 6px;
}

#notifications-dropdown::-webkit-scrollbar-track {
    background: var(--rudolf-nebula);
}

#notifications-dropdown::-webkit-scrollbar-thumb {
    background: var(--rudolf-sky);
    border-radius: 3px;
}

#notifications-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--rudolf-sky-light);
}


.episode-grid-responsive {
    display: grid;
    gap: var(--space-md);
}

@media (max-width: 640px) {
    .episode-grid-responsive {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .episode-grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .episode-grid-responsive {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}


.comments-responsive {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

@media (min-width: 1024px) {
    .comments-responsive {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: var(--space-xl);
    }
}


@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


@media (prefers-contrast: high) {
    :root {
        --rudolf-sky: #00ccff;
        --rudolf-aurora: #00ff99;
        --rudolf-solar: #ff9900;
    }

    .glass-card {
        background: rgba(10, 37, 64, 0.9);
        border: 2px solid var(--rudolf-sky);
    }
}

@media print {
    .nav-responsive,
    .hero-responsive,
    .modal-responsive,
    .user-menu-responsive {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .glass-card {
        background: white !important;
        border: 1px solid black !important;
        color: black !important;
        backdrop-filter: none !important;
    }
}

/* ===========================================
   MOBIL VIDEO LEJÁTSZÁS OPTIMALIZÁLÁS
   =========================================== */

/* Video konténer mobil optimalizáció */
.video-wrapper-responsive,
.relative.w-full.bg-black {
    position: relative;
    overflow: hidden;
    background: #000;
}

/* Iframe teljesítmény javítás */
.video-iframe,
.video-element-responsive,
iframe[src*="vimeo"],
iframe[src*="drive.google"] {
    width: 100%;
    height: 100%;
}

/* Mobil-specifikus video stílusok */
@media (max-width: 768px) {
    .relative.w-full.bg-black,
    .video-wrapper-responsive {
        touch-action: manipulation;
    }
    
    .video-iframe {
        pointer-events: auto;
    }
    
    .glass-card {
        backdrop-filter: none !important; /* Kikapcsoljuk mobilon - nagyon lassú */
        -webkit-backdrop-filter: none !important;
        background: rgba(10, 37, 64, 0.9) !important;
    }
    
    /* Nav backdrop-filter is kikapcsol mobilon */
    .nav-responsive,
    nav.fixed {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(0, 8, 20, 0.98) !important;
    }
    
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto; /* smooth scroll lassú lehet mobilon */
    }
    
    .overflow-y-auto[style*="max-height: 600px"] {
        max-height: 50vh !important;
    }
    
    /* Animációk kikapcsolása mobilon */
    .cosmic-gradient::before {
        display: none !important;
    }
    
    .text-gradient-animated {
        animation: none !important;
    }
}

/* Kisebb mobil eszközök (telefon) */
@media (max-width: 480px) {
    /* Videó teljes szélesség */
    .lg\\:col-span-2 {
        padding: 0;
    }
    
    .glass-card.rounded-xl.overflow-hidden {
        border-radius: 0;
    }
    
    /* Epizód lista kompaktabb */
    .overflow-y-auto[style*="max-height: 600px"] {
        max-height: 40vh !important;
    }
    
    /* Gyorsabb animációk kis képernyőn */
    * {
        transition-duration: 0.15s !important;
    }
}

/* Alacsony teljesítményű eszközök - csökkentett effektek */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .cosmic-gradient::before {
        animation: none;
        opacity: 0.2;
    }
    
    .text-gradient-animated {
        animation: none;
        background-position: 0% center;
    }
}

/* Video loading állapot */
.video-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.video-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 229, 255, 0.3);
    border-top-color: var(--rudolf-sky);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 896px) and (orientation: landscape) {
    .cosmic-gradient.min-h-screen {
        min-height: auto;
    }
    
    .pt-24 {
        padding-top: 4rem;
    }
}