/* Base styles for smallest screens (352px and up) */
@media screen and (min-width: 352px) {
    .container {
        width: 100%;
        padding: 0 15px;
        margin: 0 auto;
    }

    .header-container {
        padding: 0 15px;
    }

    .logo img {
        height: 32px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .mobile-menu {
        width: 85%;
        max-width: 300px;
    }

    .hero {
        min-height: 600px;
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero h2 {
        font-size: 1.3rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .hero-buttons {
        padding: 0 15px;
    }

    .countdown-container {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
    }

    .countdown-item {
        min-width: 80px;
        padding: 15px 10px;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .timeline-container {
        padding: 10px 5px;
    }

    .timeline-content {
        width: 90%;
    }

    .timeline-item {
        margin-bottom: 15px;
    }
}

/* Small mobiles (375px) */
@media screen and (min-width: 375px) {
    .container {
        padding: 0 20px;
    }

    .logo img {
        height: 36px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .countdown-item {
        min-width: 90px;
    }
}

/* Medium mobiles (390px - OnePlus territory) */
@media screen and (min-width: 390px) {
    .header-container {
        padding: 0 20px;
    }

    .logo img {
        height: 38px;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .countdown-item {
        min-width: 100px;
    }
}

/* Large mobiles (412px - OnePlus 12R) */
@media screen and (min-width: 412px) {
    .container {
        padding: 0 24px;
    }

    .logo img {
        height: 40px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .countdown-item {
        min-width: 110px;
    }
}

/* Extra large mobiles (428px+) */
@media screen and (min-width: 428px) {
    .container {
        padding: 0 30px;
    }

    .logo img {
        height: 42px;
    }

    .logo-text {
        font-size: 1.6rem;
    }

    .hero h1 {
        font-size: 2.6rem;
    }
}

/* High DPI Screens (like OnePlus 12R) */
@media screen and (-webkit-min-device-pixel-ratio: 2.5),
       screen and (min-resolution: 360dpi) {
    html {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        font-size: 16px;
        line-height: 1.6;
    }

    .container {
        max-width: 100%;
    }

    /* Sharper text rendering */
    .hero h1,
    .hero h2,
    .section-title h2,
    .logo-text {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }

    /* Adjust shadows for high DPI */
    .card,
    .timeline-content,
    .countdown-item {
        box-shadow: 0 1px 3px rgba(139, 92, 246, 0.12),
                    0 1px 2px rgba(10, 10, 10, 0.24);
    }

    /* Improved button appearance */
    .btn,
    .cta-button {
        border-radius: 50px;
        box-shadow: 0 2px 4px rgba(139, 92, 246, 0.16);
    }

    /* Enhanced visual hierarchy */
    .timeline-content {
        border: 0.5px solid rgba(139, 92, 246, 0.1);
    }

    /* Smoother animations */
    * {
        transition-duration: 0.2s;
    }
}

/* Landscape orientation fixes */
@media screen and (max-height: 720px) and (orientation: landscape) {
    .hero {
        min-height: 500px;
    }

    .hero-content {
        padding-top: 80px;
    }

    .countdown-container {
        margin: 20px 0;
    }

    .countdown-item {
        padding: 10px;
    }
}

/* Fix for devices with notches */
@supports (padding: max(0px)) {
    .header-container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}

/* Override hero sizing for extra-small screens to avoid scroll */
@media screen and (max-width: 480px) {
    .hero {
        height: calc(100vh - 65px);
        min-height: calc(100vh - 65px);
        padding-top: 0;
        padding-bottom: 0;
    }

    .hero-video-container {
        height: 100%;
        min-height: 100%;
    }

    .hero-video {
        object-fit: contain;
        object-position: center center;
    }
}
