:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --emerald-600: #059669;
    --emerald-300: #6ee7b7;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --bg-glass: rgba(15, 23, 42, 0.6);
    --border-glass: rgba(51, 65, 85, 0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--slate-950);
    color: var(--slate-200);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

body::-webkit-scrollbar { width: 8px; background: var(--slate-950); }
body::-webkit-scrollbar-thumb { background: var(--slate-700); border-radius: 4px; }
body::-webkit-scrollbar-track { background: var(--slate-900); }

.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: blobFloat 20s ease-in-out infinite alternate;
}

.bg-blob--1 { width: 600px; height: 600px; background: var(--emerald-500); top: -10%; left: -5%; animation-duration: 22s; }
.bg-blob--2 { width: 500px; height: 500px; background: var(--sky-400); bottom: -15%; right: -5%; animation-duration: 26s; animation-delay: -5s; }
.bg-blob--3 { width: 400px; height: 400px; background: var(--emerald-400); top: 40%; left: 50%; opacity: 0.06; animation-duration: 18s; animation-delay: -10s; }

@keyframes blobFloat {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -40px) scale(1.05); }
    66%  { transform: translate(-20px, 20px) scale(0.95); }
    100% { transform: translate(15px, -15px) scale(1.02); }
}

.bg-dots {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

.header-glass {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
}

.header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--slate-100);
}

.logo-box {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box img {
    width: 2.5rem;
    height: 2.5rem;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--slate-100); }

.landing {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 1rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--slate-100);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.section-desc {
    font-size: 1rem;
    color: var(--slate-500);
    max-width: 32rem;
    margin: 0 auto;
}

.hero {
    padding: 6rem 0 2rem;
    text-align: center;
    animation: fadeSlideUp 0.6s ease-out both;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-accent {
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--slate-500);
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--slate-200);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    padding: 2.5rem 1.75rem 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s ease;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--emerald-400), transparent);
    opacity: 0;
    transition: opacity 0.4s ease, width 0.4s ease;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px -8px rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.25);
}

.game-card:hover::before { opacity: 1; width: 80%; }

.game-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    z-index: 2;
}

.game-status--active { background: rgba(52, 211, 153, 0.12); color: var(--emerald-400); border: 1px solid rgba(52, 211, 153, 0.2); }

.game-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--slate-700);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.game-card:hover .game-icon {
    border-color: rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 16px -4px rgba(52, 211, 153, 0.15);
}

.game-name { font-size: 1.375rem; font-weight: 700; color: var(--slate-100); letter-spacing: -0.02em; margin-bottom: 0.375rem; }
.game-desc { font-size: 0.875rem; color: var(--slate-500); line-height: 1.5; margin-bottom: 1.5rem; flex-grow: 1; }

.game-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: var(--emerald-400);
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.25s ease;
}

.game-cta svg { width: 0.875rem; height: 0.875rem; transition: transform 0.25s ease; }
.game-card:hover .game-cta { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.4); }
.game-card:hover .game-cta svg { transform: translateX(3px); }

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.glossary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--slate-200);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.glossary-card:hover {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.glossary-icon {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--slate-700);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-400);
}

.glossary-icon svg { width: 1.25rem; height: 1.25rem; }

.glossary-info { min-width: 0; }

.glossary-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--slate-100);
    margin-bottom: 0.125rem;
}

.glossary-desc {
    font-size: 0.8125rem;
    color: var(--slate-500);
}

.tg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tg-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--slate-200);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.tg-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.tg-icon {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sky-400);
}

.tg-icon svg { width: 1.25rem; height: 1.25rem; }

.tg-info { min-width: 0; }

.tg-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--slate-100);
    margin-bottom: 0.125rem;
}

.tg-desc {
    font-size: 0.8125rem;
    color: var(--slate-500);
}

.tg-arrow {
    margin-left: auto;
    color: var(--slate-600);
    transition: color 0.2s, transform 0.2s;
}

.tg-arrow svg { width: 1rem; height: 1rem; }
.tg-card:hover .tg-arrow { color: var(--sky-400); transform: translateX(3px); }

.landing-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-glass);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 72rem;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate-600);
    font-size: 0.8125rem;
}

.footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--slate-700);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--slate-500);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.footer-link:hover { color: var(--emerald-400); }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-card:nth-child(1) { animation: cardIn 0.5s ease-out 0.1s both; }
.game-card:nth-child(2) { animation: cardIn 0.5s ease-out 0.2s both; }
.game-card:nth-child(3) { animation: cardIn 0.5s ease-out 0.3s both; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.75rem; }
    .hero-subtitle { font-size: 1.0625rem; }
    .section { padding: 3.5rem 0; }
    .section-title { font-size: 1.5rem; }

    .games-grid,
    .glossary-grid,
    .tg-grid {
        grid-template-columns: 1fr;
    }

    .nav-links { display: none; }

    .landing-footer { flex-direction: column; text-align: center; }
	
	.btn-ghost {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero { padding: 4rem 0 0rem; }
    .hero-title { font-size: 2.25rem; }
    .game-icon { width: 3.5rem; height: 3.5rem; }
	
	.btn-ghost {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .bg-blob { animation: none; }
}

.btn-ghost {
    background: transparent;
    color: var(--slate-400);
    border: 1px solid var(--slate-700);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-ghost:hover { background: var(--slate-800); color: white; }