/* --- 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;
    }
}

/* 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;
    }
}

:root {
    --primary-color: #00f3ff;
    --secondary-color: #bc13fe;
    --bg-dark: #09090b;
    --card-bg: #13131a;
    --text-color: #e0e0e0;
    --font-main: 'Segoe UI', sans-serif;
    --font-display: 'Montserrat', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: transparent;
    /* Changed from var(--bg-dark) to allow #particles-js to show */
    color: var(--text-color);
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Stays behind content */
    background: linear-gradient(to bottom, #020111 0%, #191b2e 100%);
    overflow: hidden;
    pointer-events: auto;
    /* Allow particles.js interaction if enabled */
}

/* Starry Night Animation - Background Layer */
#particles-js::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 10% 10%, white 1px, transparent 0),
        radial-gradient(1px 1px at 20% 20%, white 1px, transparent 0),
        radial-gradient(2px 2px at 30% 30%, white 1px, transparent 0),
        radial-gradient(1px 1px at 40% 40%, white 1px, transparent 0),
        radial-gradient(1px 1px at 50% 50%, white 1px, transparent 0),
        radial-gradient(2px 2px at 60% 60%, white 1px, transparent 0),
        radial-gradient(1px 1px at 70% 70%, white 1px, transparent 0),
        radial-gradient(1px 1px at 80% 80%, white 1px, transparent 0),
        radial-gradient(1px 1px at 90% 90%, white 1px, transparent 0);
    background-size: 550px 550px;
    opacity: 0.6;
    animation: starsMove 100s linear infinite;
}

/* Twinkling Stars - Foreground Layer */
#particles-js::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 15% 15%, white 1px, transparent 0),
        radial-gradient(1px 1px at 35% 35%, white 1px, transparent 0),
        radial-gradient(2px 2px at 55% 55%, white 1px, transparent 0),
        radial-gradient(1px 1px at 75% 75%, white 1px, transparent 0),
        radial-gradient(1px 1px at 95% 95%, white 1px, transparent 0);
    background-size: 350px 350px;
    opacity: 0.4;
    animation: starsTwinkle 4s ease-in-out infinite alternate;
}

@keyframes starsMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-550px);
    }
}

@keyframes starsTwinkle {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 0.9;
    }
}

[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

.title {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    margin-bottom: 20px;
    letter-spacing: 5px;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Hikaye Bölümü */
.story-section {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.glass-card {
    background: rgba(19, 19, 26, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    border-radius: 20px;
    padding: 50px;
    max-width: 800px;
    width: 100%;
    text-align: center;
    color: #fff;
    margin: 0 auto;
}

.story-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ddd;
    font-family: var(--font-main);
}

.glass-card h2 {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
    margin-bottom: 20px;
}

/* Sayaç */
.counter-section {
    padding: 60px 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: 30px;
    max-width: 900px;
    width: 100%;
}

.time-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 20px;
    min-width: 110px;
    flex: 1;
    max-width: 180px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.time-box span {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.time-box p {
    color: #aaa;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* Buton */
.heart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

.love-btn {
    background: transparent;
    color: white;
    font-size: 1.2rem;
    padding: 15px 50px;
    border: 2px solid var(--secondary-color);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 15px var(--secondary-color), inset 0 0 15px var(--secondary-color);
    text-shadow: 0 0 5px white;
    transition: all 0.3s;
    position: relative;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.love-btn:hover {
    background: var(--secondary-color);
    box-shadow: 0 0 30px var(--secondary-color);
}

/* Müzik Player */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
}

.vinyl-record {
    width: 60px;
    height: 60px;
    background: #000;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-color);
}

.vinyl-record i {
    color: var(--primary-color);
}

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

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

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* NEON TIMELINE */
.timeline-section {
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    box-shadow: 0 0 15px var(--secondary-color);
}

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

.left {
    left: 0;
}

.right {
    left: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -12px;
    background: #000;
    border: 3px solid var(--primary-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-color);
}

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

.timeline-content {
    padding: 20px;
    background: rgba(19, 19, 26, 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-content img {
    width: 100%;
    height: 200px !important;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    filter: brightness(0.8);
    display: block;
}

.timeline-content:hover img {
    filter: brightness(1.1);
}

.timeline-text h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.timeline-text p {
    margin: 0;
    color: #ccc;
    font-size: 0.95rem;
}

/* Video */
.video-wrapper {
    margin: 0 auto;
    max-width: 600px;
    padding: 30px;
    border: 1px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.8);
}

.video-wrapper video {
    width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 0 20px var(--primary-color);
    border: 1px solid var(--secondary-color);
    background: #000;
}

.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 20px var(--primary-color);
    border: 1px solid var(--secondary-color);
}

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

/* MOBİL UYUMLULUK */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

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

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

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

    .right {
        left: 0%;
    }

    .title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .glass-card {
        padding: 25px 15px;
    }

    .video-wrapper {
        padding: 15px;
    }

    /* Buton Küçültme */
    .love-btn {
        padding: 15px 30px;
        font-size: 1rem;
        width: 80%;
        max-width: 300px;
    }

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

    /* Müzik İkonu */
    .vinyl-record {
        width: 45px;
        height: 45px;
    }

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

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