/* ============================================
   VIBE CODE COUNTDOWN - STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --card-bg: #0a0a0f;
    --card-border: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --accent: #4285f4;
    --accent2: #34a853;
    --accent3: #fbbc04;
    --accent4: #ea4335;
    --glass: rgba(10, 10, 20, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius: 16px;
    --glow: 0 0 80px rgba(66, 133, 244, 0.15), 0 0 160px rgba(66, 133, 244, 0.05);
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text);
    cursor: default;
}

/* ---- 3D GRID ---- */
#grid-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    overflow: hidden;
}

#grid-inner {
    display: grid;
    grid-template-columns: repeat(5, 280px);
    grid-template-rows: repeat(4, 220px);
    gap: 20px;
    transform-style: preserve-3d;
    transition: transform 0.05s linear;
    will-change: transform;
    padding: 40px;
}

.grid-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-card:hover {
    transform: translateZ(20px) scale(1.03);
    box-shadow: var(--glow);
    border-color: rgba(255, 255, 255, 0.15);
}

.grid-card canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 11px;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-label .card-tags {
    display: flex;
    gap: 6px;
}

.card-label .tag {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
}

/* ---- VIGNETTE ---- */
#vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 5;
}

/* ---- MODAL ---- */
#modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#modal-overlay.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

#modal {
    width: 400px;
    max-width: 90vw;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

#modal-overlay.modal-visible #modal {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    padding: 32px 32px 24px;
}

.modal-eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #fff;
}

.modal-content {
    padding: 0 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.modal-body a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.modal-body a:hover {
    color: #fff;
}

.cta-button {
    width: 100%;
    padding: 13px;
    background: #fff;
    border: none;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.3px;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.85);
}

.modal-footer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

.modal-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.modal-footer a:hover {
    color: #fff;
}

/* ---- INFO BUTTON ---- */
.info-button {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.info-button.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1400px) {
    #grid-inner {
        grid-template-columns: repeat(4, 260px);
        grid-template-rows: repeat(5, 200px);
    }
}

@media (max-width: 1100px) {
    #grid-inner {
        grid-template-columns: repeat(3, 240px);
        gap: 16px;
    }

    .title-line {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    #grid-inner {
        grid-template-columns: repeat(2, 200px);
        grid-template-rows: repeat(5, 180px);
        gap: 12px;
    }

    #modal {
        padding: 32px 24px;
    }

    .title-line {
        font-size: 32px;
    }

    .modal-body {
        font-size: 15px;
    }
}