/* ========================================
   Valentine Website - Responsive v2
   Mobile-First, Premium Experience 💕
   ======================================== */

/* ========================================
   Base Mobile Styles (< 480px)
   ======================================== */
@media screen and (max-width: 480px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 3rem;
    }

    .section {
        padding: var(--space-md) var(--space-sm);
    }

    /* Hero */
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: var(--space-sm);
    }

    /* Scroll Indicator - Fixed for mobile */
    .scroll-indicator {
        bottom: 25px;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0 auto;
    }

    .scroll-indicator span {
        font-size: 0.8rem;
    }

    /* Envelope */
    .message-container {
        max-width: 320px;
    }

    .letter-greeting {
        font-size: 1.3rem;
    }

    .chat-message {
        font-size: 0.85rem;
    }

    .letter-signature {
        font-size: 1.2rem;
    }

    .envelope-hint {
        font-size: 0.85rem;
    }

    /* Question */
    .question-title {
        font-size: 1.8rem;
    }

    .heartbeat {
        font-size: 3rem;
    }

    .heartbeat-container {
        margin-bottom: var(--space-sm);
    }

    /* Buttons */
    .buttons-container {
        gap: var(--space-sm);
    }

    .answer-btn {
        font-size: 1.1rem;
        padding: 12px 28px;
    }

    .tease-message {
        font-size: 0.95rem;
        padding: 10px 18px;
    }

    /* Celebration */
    .celebration-title {
        font-size: 2rem;
    }

    .celebration-message {
        font-size: 1rem;
    }

    .celebration-heart {
        font-size: 3rem;
    }

    /* Loading */
    .loading-heart {
        font-size: 3rem;
    }

    .loading-text {
        font-size: 1.4rem;
    }

    .loading-bar {
        width: 200px;
    }

    /* Watermark - Smaller on mobile */
    .watermark-layer-1,
    .watermark-layer-2,
    .watermark-layer-3 {
        font-size: 0.9rem;
    }
}

/* ========================================
   Small Tablets (481px - 768px)
   ======================================== */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .hero-title {
        font-size: 5rem;
    }

    .message-container {
        max-width: 350px;
    }

    .question-title {
        font-size: 2.2rem;
    }

    .answer-btn {
        font-size: 1.2rem;
        padding: 14px 32px;
    }
}

/* ========================================
   Tablets (769px - 1024px)
   ======================================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 7rem;
    }

    .message-container {
        max-width: 400px;
    }

    .question-title {
        font-size: 2.8rem;
    }
}

/* ========================================
   Desktop (1025px+)
   ======================================== */
@media screen and (min-width: 1025px) {
    .section {
        padding: var(--space-xl) var(--space-lg);
    }

    .buttons-container {
        gap: 2.5rem;
    }

    .answer-btn {
        font-size: 1.5rem;
        padding: 16px 40px;
    }

    .envelope:hover {
        transform: translateY(-10px);
        animation: envelopeFloat 3s ease-in-out infinite;
    }
}

/* ========================================
   Large Desktop (1440px+)
   ======================================== */
@media screen and (min-width: 1440px) {
    html {
        font-size: 18px;
    }

    .hero-title {
        font-size: 10rem;
    }

    .message-container {
        max-width: 450px;
    }
}

/* ========================================
   Height Adjustments - Short Screens
   ======================================== */
@media screen and (max-height: 650px) {
    .section {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .heartbeat-container {
        margin-bottom: 0.5rem;
    }

    .heartbeat {
        font-size: 2.5rem;
    }

    .question-title {
        margin-bottom: 1.5rem;
    }

    .scroll-indicator {
        position: relative;
        bottom: auto;
        margin-top: 1.5rem;
    }
}

/* ========================================
   Landscape Mobile
   ======================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .section {
        min-height: auto;
        padding: 1.5rem 1rem;
    }

    .question-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .heartbeat-container {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .heartbeat {
        font-size: 2rem;
    }

    .question-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .answer-btn {
        min-height: 50px;
        min-width: 120px;
    }

    .envelope {
        cursor: pointer;
    }

    /* Remove hover animations on touch */
    .envelope:hover {
        transform: none;
        animation: none;
    }

    .envelope:active {
        transform: scale(0.98);
    }

    .yes-btn:hover {
        transform: none;
    }

    .yes-btn:active {
        transform: scale(1.05);
    }
}

/* ========================================
   Reduced Motion - Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.2s !important;
    }

    html {
        scroll-behavior: auto;
    }

    .particle,
    .watermark-layer {
        display: none;
    }
}

/* ========================================
   Safe Area - iPhone Notch Support
   ======================================== */
@supports (padding: max(0px)) {
    .section {
        padding-left: max(var(--space-md), env(safe-area-inset-left));
        padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    .scroll-indicator {
        bottom: max(30px, env(safe-area-inset-bottom));
    }

    .celebration-content {
        padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
    }
}

/* ========================================
   Fullscreen Button - All Sizes
   ======================================== */
.yes-btn.fullscreen {
    font-size: clamp(1.8rem, 5vw, 3.5rem) !important;
}

@media screen and (max-width: 480px) {
    .yes-btn.fullscreen {
        font-size: 1.8rem !important;
    }

    .yes-btn.fullscreen small {
        font-size: 0.8rem;
    }
}

/* ========================================
   Video Scaling - All Aspect Ratios
   ======================================== */
/* Portrait phones */
@media (max-aspect-ratio: 9/16) {
    .video-container video {
        width: auto;
        height: 100%;
        min-width: 100%;
    }
}

/* Standard phones */
@media (min-aspect-ratio: 9/16) and (max-aspect-ratio: 3/4) {
    .video-container video {
        width: 100%;
        height: auto;
        min-height: 100%;
    }
}

/* Tablets and desktop */
@media (min-aspect-ratio: 3/4) {
    .video-container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {

    .loading-screen,
    #particles-container,
    #confetti-container,
    #fireworks-container,
    .watermark-container,
    .scroll-indicator {
        display: none !important;
    }

    body {
        background: white;
        color: #333;
    }

    .section {
        min-height: auto;
        page-break-inside: avoid;
        padding: 1rem;
    }
}