/* ========================================
   Valentine Website - Responsive Styles
   Mobile-first approach 💕
   ======================================== */

/* ========================================
   Mobile First (< 480px)
   ======================================== */
@media screen and (max-width: 480px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 4rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .envelope {
        max-width: 300px;
    }

    .letter-greeting {
        font-size: 1.4rem;
    }

    .letter-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .letter-signature {
        font-size: 1.2rem;
    }

    .question-title {
        font-size: 1.8rem;
    }

    .heartbeat {
        font-size: 3.5rem;
    }

    .answer-btn {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
        min-width: 120px;
    }

    .buttons-container {
        gap: 1rem;
    }

    .tease-message {
        font-size: 1rem;
    }

    .celebration-title {
        font-size: 2rem;
    }

    .celebration-message {
        font-size: 1rem;
    }

    .celebration-heart {
        font-size: 3rem;
    }

    .scroll-indicator {
        bottom: 2rem;
    }

    .loading-heart {
        font-size: 3rem;
    }

    .loading-text {
        font-size: 1.5rem;
    }
}

/* ========================================
   Small Tablets (481px - 768px)
   ======================================== */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .hero-title {
        font-size: 5rem;
    }

    .envelope {
        max-width: 350px;
    }

    .question-title {
        font-size: 2.5rem;
    }

    .answer-btn {
        font-size: 1.3rem;
        padding: 1rem 2rem;
    }
}

/* ========================================
   Tablets (769px - 1024px)
   ======================================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 7rem;
    }

    .envelope {
        max-width: 400px;
    }

    .question-title {
        font-size: 3rem;
    }
}

/* ========================================
   Desktop (1025px+)
   ======================================== */
@media screen and (min-width: 1025px) {
    .section {
        padding: var(--space-xl) var(--space-lg);
    }

    .buttons-container {
        gap: 3rem;
    }

    .answer-btn {
        font-size: 1.8rem;
        padding: 1.2rem 3rem;
        min-width: 180px;
    }
}

/* ========================================
   Large Desktop (1440px+)
   ======================================== */
@media screen and (min-width: 1440px) {
    html {
        font-size: 18px;
    }

    .hero-title {
        font-size: 12rem;
    }
}

/* ========================================
   Height-based adjustments
   ======================================== */
@media screen and (max-height: 600px) {
    .section {
        min-height: auto;
        padding: 2rem 1rem;
    }

    .hero-content {
        padding: 2rem 0;
    }

    .heartbeat-container {
        margin-bottom: 1rem;
    }

    .heartbeat {
        font-size: 3rem;
    }

    .scroll-indicator {
        position: relative;
        bottom: auto;
        margin-top: 2rem;
    }
}

/* ========================================
   Landscape Mobile
   ======================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        margin-bottom: 1rem;
    }

    .question-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .heartbeat-container {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .question-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        width: 100%;
    }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .answer-btn {
        min-height: 50px;
    }

    .envelope {
        /* Remove hover effects, rely on tap */
    }

    .envelope:hover {
        transform: none;
    }

    .envelope:active {
        transform: scale(0.98);
    }

    /* Remove animated hover states for performance */
    .answer-btn::before {
        display: none;
    }
}

/* ========================================
   Reduced Motion Preferences
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .particle {
        display: none;
    }
}

/* ========================================
   Dark Mode Support (already dark, but for system)
   ======================================== */
@media (prefers-color-scheme: light) {
    /* Keep dark theme regardless - Valentine themed */
}

/* ========================================
   Print Styles (just in case!)
   ======================================== */
@media print {
    body {
        background: white;
        color: black;
    }

    .loading-screen,
    .particles-container,
    #confetti-container,
    #fireworks-container,
    .scroll-indicator {
        display: none !important;
    }

    .section {
        min-height: auto;
        page-break-inside: avoid;
        padding: 2rem;
    }

    .hero-title {
        color: #C41E3A;
        text-shadow: none;
    }

    .answer-btn {
        border: 2px solid #C41E3A;
        background: white;
        color: #C41E3A;
        box-shadow: none;
    }
}

/* ========================================
   Fullscreen Button Responsive
   ======================================== */
.yes-btn.fullscreen {
    font-size: clamp(2rem, 5vw, 4rem);
}

@media screen and (max-width: 480px) {
    .yes-btn.fullscreen {
        font-size: 2rem;
    }
}