/* --- UNIVERSAL MOBILE CENTER FIX: Counter Title + 2x2 Grid --- */
@media (max-width: 768px) {
    .counter-section {
        display: block !important;
    }

    .countdown-container,
    .counter-container,
    #countdown,
    .stats-container,
    .counter-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-items: center !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
    }

    .counter-section h2,
    .stats-container h2,
    .counter-wrapper h2 {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-self: center !important;
        text-align: center !important;
        margin: 0 0 12px 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .time-box,
    .counter-item,
    .counter-box,
    .countdown-item,
    .stat-item {
        width: 100% !important;
        max-width: 160px !important;
        min-width: 140px !important;
        min-height: 100px !important;
        padding: 12px !important;
        border-radius: 16px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .time-box span,
    .counter-value,
    .counter-number,
    .time-value,
    .stat-number {
        font-size: 2.2rem !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
    }

    .time-box p,
    .counter-label,
    .time-label,
    .stat-label,
    .label {
        font-size: 0.8rem !important;
        letter-spacing: 1px !important;
        text-transform: uppercase !important;
        opacity: 0.9 !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
}

/* --- GLOBAL MOBILE FIX: 2x2 Grid Layout (Forced Standard) --- */
@media (max-width: 768px) {

    /* 1. Force Container to 2-Column Grid */
    .counter-section,
    .counter-wrapper,
    .stats-container,
    #countdown,
    .countdown-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 Equal Columns */
        gap: 15px !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
        justify-content: center !important;
        height: auto !important;
        /* Allow height to grow */
    }

    /* 2. Standardize Box Sizing */
    .counter-box,
    .stat-item,
    .time-box,
    .countdown-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 5px !important;
        min-height: 100px !important;
        /* Standard height */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        border-radius: 15px !important;
        /* Soft corners */
    }

    /* 3. Typography: Big Numbers */
    .count,
    .number,
    .stat-number,
    .counter-number,
    .time-value {
        font-size: 2.2rem !important;
        line-height: 1 !important;
        margin-bottom: 5px !important;
        font-weight: 700 !important;
    }

    /* 4. Typography: Small Labels */
    .label,
    .stat-label,
    .counter-label,
    .time-label {
        font-size: 0.8rem !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        opacity: 0.9 !important;
        white-space: nowrap !important;
    }
}

/* ============================================
   AURORA THEME - Northern Lights Inspired
   ============================================ */

:root {
    /* Aurora Color Palette */
    --aurora-purple: #6B46C1;
    --aurora-teal: #14B8A6;
    --aurora-pink: #F472B6;
    --aurora-coral: #FB7185;
    --aurora-indigo: #4F46E5;
    --aurora-cyan: #06B6D4;

    /* Background Colors */
    --bg-dark: #0F172A;
    --bg-dark-secondary: #1E293B;
    --bg-dark-tertiary: #334155;

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-hover: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Text Colors */
    --text-light: #F8FAFC;
    --text-muted: #CBD5E1;
    --text-dark: #1E293B;

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --blur-amount: 20px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: transparent;
    /* Changed from gradient to allow #particles-js */
    background-attachment: fixed;
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    overflow: hidden;
}

/* 
   Minimal Aurora - Single Breathing Light
   No heavy blurs or transforms. Just opacity changes.
   Performance: Extremely High.
*/
#particles-js::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%,
            rgba(20, 184, 166, 0.15) 0%,
            /* Teal */
            rgba(107, 70, 193, 0.1) 30%,
            /* Purple */
            transparent 70%);
    animation: auroraBreathe 8s ease-in-out infinite alternate;
}

#particles-js::after {
    display: none;
    /* Removing second layer for performance */
}

@keyframes auroraBreathe {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 0.8;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
}

.title {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg,
            var(--aurora-purple) 0%,
            var(--aurora-teal) 50%,
            var(--aurora-pink) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease-in-out infinite, fadeInDown 1.5s ease;
    text-shadow: 0 0 40px rgba(107, 70, 193, 0.5);
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    animation: fadeInUp 1.5s ease 0.5s forwards;
    opacity: 0;
    letter-spacing: 0.5px;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    font-size: 2rem;
    color: var(--aurora-teal);
    animation: bounce 2s infinite;
    cursor: pointer;
    filter: drop-shadow(0 0 10px var(--aurora-teal));
}

/* ============================================
   GLASS CARD COMPONENTS
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 50px;
    max-width: 800px;
    width: 100%;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 0 40px rgba(107, 70, 193, 0.3);
    transform: translateY(-5px);
}

.glass-card h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   VIDEO SECTION - Cinema Mode
   ============================================ */

.video-section {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.video-wrapper {
    overflow: hidden;
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
    padding: 30px;
}

.video-wrapper h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.video-wrapper h2 i {
    -webkit-text-fill-color: var(--aurora-teal);
}

.video-wrapper video {
    width: 100%;
    max-height: 400px;
    height: auto;
    border-radius: 15px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(107, 70, 193, 0.3), 0 0 60px rgba(20, 184, 166, 0.1);
    background: #000;
    transition: all 0.4s ease;
}

.video-wrapper video:hover {
    box-shadow: 0 12px 48px rgba(107, 70, 193, 0.4), 0 0 80px rgba(20, 184, 166, 0.2);
    transform: scale(1.02);
}

.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(107, 70, 193, 0.3), 0 0 60px rgba(20, 184, 166, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */

.counter-section {
    padding: 80px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.time-box {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    padding: 30px 25px;
    border-radius: 20px;
    min-width: 120px;
    flex: 1;
    max-width: 180px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(107, 70, 193, 0.2);
    transition: var(--transition-smooth);
}

.time-box:hover {
    transform: translateY(-10px);
    background: var(--glass-bg-hover);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(20, 184, 166, 0.4);
}

.time-box span {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}

.time-box p {
    margin: 15px 0 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.time-box:last-child {
    animation: secondsPulse 1.5s ease-in-out infinite;
}

@keyframes secondsPulse {

    0%,
    100% {
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(107, 70, 193, 0.2);
    }

    50% {
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 0 40px rgba(244, 114, 182, 0.6);
    }
}

/* ============================================
   LOVE BUTTON
   ============================================ */

.heart-container {
    text-align: center;
    padding: 80px 20px;
    position: relative;
    z-index: 10;
}

.love-btn {
    padding: 20px 60px;
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--aurora-pink), var(--aurora-coral));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    box-shadow:
        0 10px 40px rgba(244, 114, 182, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 100;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.love-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.love-btn:hover::before {
    width: 300px;
    height: 300px;
}

.love-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 15px 50px rgba(244, 114, 182, 0.6),
        0 0 60px rgba(251, 113, 133, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.love-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* ============================================
   STORY SECTION
   ============================================ */

.story-section {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline-section {
    padding: 80px 20px;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(180deg,
            var(--aurora-purple) 0%,
            var(--aurora-teal) 50%,
            var(--aurora-pink) 100%);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.5);
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
    box-sizing: border-box;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    right: -16px;
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-teal));
    border: 3px solid var(--bg-dark);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.6);
    transition: var(--transition-smooth);
}

.right::after {
    left: -16px;
}

.timeline-container:hover::after {
    transform: scale(1.4);
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.8);
}

.timeline-content {
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    background: var(--glass-bg-hover);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(107, 70, 193, 0.3);
    transform: translateY(-5px);
}

.timeline-content img {
    width: 100%;
    max-height: 180px;
    /* Reduced for compactness */
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.timeline-text h3 {
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, var(--aurora-pink), var(--aurora-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-family: var(--font-display);
}

.timeline-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================
   MUSIC PLAYER
   ============================================ */

.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.music-player:hover {
    transform: scale(1.1);
}

.vinyl-record {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--bg-dark-tertiary) 30%, var(--bg-dark) 100%);
    border-radius: 50%;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(107, 70, 193, 0.4);
}

.vinyl-record::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aurora-purple), var(--aurora-teal), var(--aurora-pink));
    z-index: -1;
    animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
    100% {
        transform: rotate(360deg);
    }
}

.vinyl-record i {
    color: var(--text-light);
    font-size: 20px;
}

.rotating {
    animation: spin 5s linear infinite;
    /* GPU Acceleration */
    will-change: transform;
    transform-origin: center center;
    backface-visibility: hidden;
}

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

/* ============================================
   FOOTER
   ============================================ */

footer {
    padding: 30px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* ============================================
   MOBILE OPTIMIZATION (Timeline Specific)
   ============================================ */
@media (max-width: 768px) {

    /* Slow down card appearance and transitions */
    .timeline-content {
        transition-duration: 1.2s !important;
        transform: none !important;
        /* Stop movement on mobile */
    }

    .timeline-content:hover {
        transform: none !important;
        /* Stop hover jump */
        box-shadow: none !important;
        /* Stop shadow jump */
    }

    /* Slow down image transitions */
    .timeline-content img {
        transition-duration: 1.2s !important;
    }
}



/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .glass-card {
        padding: 30px 20px;
    }

    .glass-card h2 {
        font-size: 2rem;
    }

    .story-text {
        font-size: 1.1rem;
    }

    .time-box {
        min-width: 90px;
        padding: 20px 15px;
    }

    .time-box span {
        font-size: 2.5rem;
    }

    .countdown-container {
        gap: 15px;
    }

    .love-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
        width: 85%;
        max-width: 320px;
    }

    .heart-container {
        padding: 50px 20px;
    }

    /* Timeline Mobile */
    .timeline::after {
        left: 31px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }

    .timeline-container::after {
        left: 18px;
        right: auto;
    }

    .left::after,
    .right::after {
        left: 18px;
    }

    .right {
        left: 0%;
    }

    .vinyl-record {
        width: 50px;
        height: 50px;
    }

    .vinyl-record i {
        font-size: 18px;
    }

    .music-player {
        bottom: 20px;
        right: 20px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.love-btn:focus,
.music-player:focus {
    outline: 3px solid var(--aurora-teal);
    outline-offset: 4px;
}

/* Mobile grid title span fix */
@media (max-width: 768px) {

    .counter-section h2,
    .stats-container h2,
    .counter-wrapper h2 {
        grid-column: 1 / -1 !important;
        justify-self: center !important;
        text-align: center !important;
        margin-bottom: 12px !important;
    }
}