/* ========================================
   Mergify Blocks Puzzle — Support Site
   Design: Cosmic Dark Theme (matching game)
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #0A0D1A;
    --bg-dark: #0F1225;
    --bg-card: rgba(20, 25, 55, 0.75);
    --bg-card-hover: rgba(25, 32, 68, 0.85);
    --border-subtle: rgba(102, 126, 234, 0.15);
    --border-glow: rgba(102, 126, 234, 0.3);
    --text-primary: #E8ECF4;
    --text-secondary: #9CA3BD;
    --text-muted: #6B7294;
    --accent-blue: #667EEA;
    --accent-purple: #9F7AEA;
    --accent-cyan: #06B6D4;
    --accent-green: #22C55E;
    --accent-orange: #F97316;
    --accent-red: #EF4444;
    --gradient-cosmic: linear-gradient(135deg, #667EEA 0%, #9F7AEA 50%, #764BA2 100%);
    --gradient-card: linear-gradient(145deg, rgba(20, 25, 55, 0.8), rgba(15, 18, 37, 0.9));
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.1);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-purple);
}

/* --- Cosmic Background --- */
.cosmic-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(159, 122, 234, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 100%, rgba(118, 75, 162, 0.05) 0%, transparent 40%),
                var(--bg-deep);
}

.star {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: twinkle var(--dur, 3s) ease-in-out infinite alternate;
}

.star-1 { width: 2px; height: 2px; top: 10%; left: 15%; --dur: 2.5s; }
.star-2 { width: 3px; height: 3px; top: 20%; left: 75%; --dur: 3.5s; animation-delay: 0.5s; }
.star-3 { width: 2px; height: 2px; top: 35%; left: 40%; --dur: 2.8s; animation-delay: 1s; }
.star-4 { width: 1px; height: 1px; top: 55%; left: 85%; --dur: 4s; animation-delay: 0.3s; }
.star-5 { width: 2px; height: 2px; top: 70%; left: 25%; --dur: 3.2s; animation-delay: 1.5s; }
.star-6 { width: 3px; height: 3px; top: 15%; left: 55%; --dur: 2.2s; animation-delay: 0.8s; }
.star-7 { width: 1px; height: 1px; top: 80%; left: 60%; --dur: 3.8s; animation-delay: 2s; }
.star-8 { width: 2px; height: 2px; top: 45%; left: 10%; --dur: 3s; animation-delay: 0.6s; }

@keyframes twinkle {
    0% { opacity: 0.2; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.5); }
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s ease-in-out infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.12), transparent);
}

.blob-2 {
    width: 350px;
    height: 350px;
    bottom: -50px;
    left: -80px;
    background: radial-gradient(circle, rgba(159, 122, 234, 0.1), transparent);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}

/* --- Layout --- */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.container-narrow {
    max-width: 720px;
}

/* --- Navigation --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
}

.nav-emoji {
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
}

.nav-link.active {
    color: var(--accent-blue);
    background: rgba(102, 126, 234, 0.12);
}

/* --- Hero --- */
.hero {
    padding: 80px 0 48px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-small {
    padding: 60px 0 36px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.25);
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: var(--gradient-cosmic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Cards --- */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-glow);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--accent-blue);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.75;
}

.card ul {
    padding-left: 24px;
    margin-bottom: 12px;
}

.card li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.7;
}

.card li strong {
    color: var(--text-primary);
}

.legal-card {
    padding: 28px 28px;
}

.legal-card h2 {
    font-size: 1.2rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

/* --- Feature Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.feature {
    background: rgba(15, 18, 37, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all var(--transition-smooth);
}

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.feature h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.feature p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* --- FAQ --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: rgba(15, 18, 37, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-smooth);
}

.faq-item:hover {
    border-color: var(--border-glow);
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background var(--transition-fast);
}

.faq-item summary:hover {
    background: rgba(102, 126, 234, 0.05);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--accent-blue);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding: 0 20px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* --- Contact Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 20px;
    background: rgba(15, 18, 37, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-smooth);
}

.contact-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    font-size: 1.8rem;
}

.contact-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.contact-value {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Info Table --- */
.info-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(15, 18, 37, 0.4);
    border-radius: var(--radius-sm);
}

.info-row:nth-child(odd) {
    background: rgba(20, 25, 55, 0.4);
}

.info-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

/* --- Footer --- */
.footer {
    margin-top: 48px;
    padding: 32px 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-sep {
    color: var(--text-muted);
    opacity: 0.4;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* --- Section Entrance Animation --- */
.card {
    animation: fadeUp 0.6s ease-out both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }
.card:nth-child(9) { animation-delay: 0.9s; }
.card:nth-child(10) { animation-delay: 1.0s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-title {
        display: none;
    }

    .hero {
        padding: 60px 0 32px;
    }

    .hero-small {
        padding: 48px 0 24px;
    }

    .container {
        padding: 0 16px;
    }

    .card {
        padding: 24px 20px;
    }

    .legal-card {
        padding: 20px 18px;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-value {
        text-align: left;
    }

    .faq-item summary {
        font-size: 0.9rem;
        padding: 14px 16px;
    }
}

@media (max-width: 400px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
