/*
Theme Name: Themify Ultra Child
Description: A child theme of Themify Ultra - Mobile Optimized
Template: themify-ultra
Author: admin (sxodstudios@gmail.com)
*/

/* Import Bebas Neue font */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue:wght@400&display=swap');

@font-face {
    font-family: 'Krisha';
    src: url('./fonts/Krisha-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Reset and base styles - Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    color: #fff;
    line-height: 1.6;
}

.site-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Hero Section - Mobile First */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: #1a1a1a;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    color: white !important;
    margin-bottom: 2rem;
    line-height: 0.9;
    z-index: 2;
    position: relative;
}

.hero-img {
    width: min(300px, 80vw);
    height: auto;
    margin: 1rem 0;
    z-index: 1;
    position: relative;
}

.watch-btn {
    background: white;
    color: #1a1a1a;
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    z-index: 2;
    position: relative;
    min-height: 44px;
    min-width: 200px;
}

.watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.watch-btn:active {
    transform: translateY(0);
}

/* Video Player Section */
.video-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem 0;
    padding: 0 1rem;
}

.responsive-iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 8px;
    min-height: 300px;
}

/* Controls Section */
.controls-container {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.controls-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-family: "Bebas Neue", cursive;
    text-transform: uppercase;
    color: white !important;
    text-align: center;
    margin-bottom: 2rem;
}

/* Season Buttons */
.seasons-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.season-btn {
    padding: 0.75rem 1.5rem;
    background: #333;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 100px;
}

.season-btn:hover {
    background: #444;
    transform: translateY(-1px);
}

.season-btn.active {
    background: #fff !important;
    color: #1a1a1a !important;
    border-color: #fff;
}

/* Episode Grid */
.episodes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.episode-btn {
    aspect-ratio: 1;
    min-height: 44px;
    background: #333;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.episode-btn:hover {
    background: #555;
    border-color: #fff;
    transform: scale(1.05);
}

.episode-btn:active {
    transform: scale(0.95);
}

/* Legacy support for existing elements */
#seasons, #episodes {
    margin: 10px 0;
}

#seasons button,
#episodes button {
    margin: 4px;
    padding: 10px 15px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

#seasons button.active {
    background: #fbfbfb !important;
    color: #222 !important;
}

iframe {
    margin-top: 20px;
    border: none;
    margin-bottom: 20px;
}

/* Override legacy styles */
h1.text-4xl.md\:text-6xl.font-bold.mb-6 {
    font-family: 'Bebas Neue', cursive !important;
    font-size: clamp(4rem, 12vw, 8rem) !important;
    color: white !important;
    line-height: 0.9 !important;
}

.bg-gray-100 {
    background: #1a1a1a !important;
}

button.px-6.py-3.bg-blue-600.text-white.text-lg.rounded-lg.hover\:bg-blue-700.transition {
    background: white !important;
    color: #1a1a1a !important;
    font-family: 'Bebas Neue', cursive !important;
    font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
    z-index: 9;
    min-height: 44px !important;
    border-radius: 50px !important;
    padding: 1rem 2rem !important;
}

h2.heading-two {
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
    font-family: "Bebas Neue", cursive !important;
    text-transform: uppercase;
    color: white !important;
    text-align: center;
}

/* Tablet Styles */
@media screen and (min-width: 768px) {
    .hero-section {
        padding: 3rem 2rem;
    }

    .hero-title {
        font-size: clamp(6rem, 15vw, 12rem) !important;
        margin-bottom: 3rem;
    }

    .hero-img {
        width: min(400px, 50vw);
    }

    .watch-btn {
        font-size: 2rem !important;
        padding: 1.25rem 2.5rem !important;
    }

    .episodes-container {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 0.75rem;
        max-width: 800px;
    }

    .episode-btn {
        min-height: 50px;
        font-size: 1.1rem;
    }

    .responsive-iframe {
        min-height: 400px;
    }

    /* Legacy button overrides for tablets */
    button.px-6.py-3.bg-blue-600.text-white.text-lg.rounded-lg.hover\:bg-blue-700.transition {
        font-size: 2rem !important;
        padding: 1.25rem 2.5rem !important;
    }

    h1.text-4xl.md\:text-6xl.font-bold.mb-6 {
        font-size: clamp(6rem, 15vw, 12rem) !important;
    }
}

/* Desktop Styles */
@media screen and (min-width: 1024px) {
    .hero-section {
        padding: 4rem 2rem;
    }

    .hero-title {
        font-size: clamp(8rem, 18vw, 16rem) !important;
    }

    .hero-img {
        width: min(450px, 40vw);
    }

    .watch-btn {
        font-size: 2.2rem !important;
        padding: 1.5rem 3rem !important;
    }

    .episodes-container {
        grid-template-columns: repeat(12, 1fr);
        max-width: 1000px;
    }

    .responsive-iframe {
        min-height: 500px;
    }

    /* Legacy overrides for desktop */
    button.px-6.py-3.bg-blue-600.text-white.text-lg.rounded-lg.hover\:bg-blue-700.transition {
        font-size: 2.2rem !important;
        padding: 1.5rem 3rem !important;
    }

    h1.text-4xl.md\:text-6xl.font-bold.mb-6 {
        font-size: clamp(8rem, 18vw, 16rem) !important;
    }
}

/* Large Desktop */
@media screen and (min-width: 1440px) {
    .hero-title {
        font-size: 20rem !important;
    }

    .responsive-iframe {
        min-height: 600px;
    }

    h1.text-4xl.md\:text-6xl.font-bold.mb-6 {
        font-size: 20rem !important;
    }

    button.px-6.py-3.bg-blue-600.text-white.text-lg.rounded-lg.hover\:bg-blue-700.transition {
        font-size: 2.5rem !important;
        width: auto !important;
        height: auto !important;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .season-btn, .episode-btn, .watch-btn {
        min-height: 48px !important;
    }

    .episodes-container {
        gap: 0.75rem;
    }

    #seasons button,
    #episodes button {
        min-height: 48px !important;
        min-width: 48px !important;
        padding: 12px 18px !important;
    }

    button.px-6.py-3.bg-blue-600.text-white.text-lg.rounded-lg.hover\:bg-blue-700.transition {
        min-height: 48px !important;
        padding: 1.2rem 2.4rem !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .hero-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Remove old problematic mobile styles */
@media screen and (max-width: 768px) {
    /* Override old styles that caused issues */
    .btn-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 1200px !important;
        scale: 1 !important;
        margin-bottom: 30px !important;
    }
    
    #seasons, #episodes {
        margin: 20px 20px !important;
        width: 100% !important;
        max-width: 600px !important;
    }
    
    .responsive-iframe {
        width: 95% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
        min-height: 250px !important;
    }

    img.hero-img {
        width: min(300px, 80vw) !important;
        position: relative !important;
        top: auto !important;
    }
}

/* Remove the problematic iPhone-specific styles */
@media only screen and (min-device-width: 390px) and (max-device-width: 430px) and (orientation: portrait) {
    /* Reset all the problematic scaling */
    .btn-container {
        width: 100% !important;
        scale: 1 !important;
        max-width: 1200px !important;
    }
    
    button.px-6.py-3.bg-blue-600.text-white.text-lg.rounded-lg.hover\:bg-blue-700.transition {
        font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
        width: auto !important;
        height: auto !important;
        padding: 1rem 2rem !important;
    }

    img.hero-img {
        width: min(300px, 80vw) !important;
        position: relative !important;
        top: auto !important;
    }

    .responsive-iframe {
        width: 95% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }

    h2.heading-two {
        margin-top: 2rem !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .season-btn, .episode-btn, .watch-btn {
        transition: none;
    }
    
    .watch-btn:hover {
        transform: none;
    }
    
    .episode-btn:hover {
        transform: none;
    }
}

/* Focus states for keyboard navigation */
.season-btn:focus,
.episode-btn:focus,
.watch-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading states */
.responsive-iframe[src=""] {
    background: #333;
    position: relative;
}

.responsive-iframe[src=""]:before {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
}