:root {
    --bg: #05060f;
    --bg-2: #0a0d1f;
    --panel: rgba(15, 18, 40, 0.7);
    --border: rgba(0, 229, 255, 0.18);
    --text: #e6f7ff;
    --muted: #8aa0c0;
    --cyan: #00e5ff;
    --pink: #ff3ea5;
    --purple: #8a2be2;
    --gold: #ffd166;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(138, 43, 226, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 30%, rgba(0, 229, 255, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 0% 70%, rgba(255, 62, 165, 0.10) 0%, transparent 60%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.site-header {
    padding: 28px 0 14px;
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.brand {
    font-size: clamp(22px, 3.5vw, 28px);
    font-weight: 900;
    letter-spacing: 1.5px;
    text-decoration: none;
    color: var(--text);
}
.brand .pt-1 { color: var(--cyan); text-shadow: 0 0 12px rgba(0, 229, 255, 0.6); }
.brand .pt-2 { color: var(--pink); text-shadow: 0 0 12px rgba(255, 62, 165, 0.6); margin-left: 4px; }

.nav {
    display: flex;
    gap: 22px;
    align-items: center;
}
.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.15s;
}
.nav a:hover { color: var(--cyan); }

/* === HERO === */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(34px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}
.hero h1 span { color: var(--cyan); text-shadow: 0 0 18px rgba(0, 229, 255, 0.6); }
.hero p {
    font-size: clamp(15px, 2vw, 19px);
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}
.hero .stats {
    display: flex;
    gap: 36px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.stat .num {
    font-size: 28px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.4);
}
.stat .label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* === GAMES GRID === */
.games-section {
    padding: 30px 0 60px;
}
.section-title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
}
.section-title span { color: var(--pink); }

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.game-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--cyan);
    box-shadow: 0 8px 30px rgba(0, 229, 255, 0.18);
}

.game-card .cover {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
    overflow: hidden;
}
.game-card .cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(5, 6, 15, 0.5) 100%);
}
.game-card .cover-emoji { position: relative; z-index: 1; filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.4)); }

.cover-boris      { background: linear-gradient(135deg, #4a1010 0%, #8b1a1a 100%); }
.cover-star       { background: linear-gradient(135deg, #1a1040 0%, #4a2080 100%); }
.cover-space      { background: linear-gradient(135deg, #05060f 0%, #1a3a8a 100%); }
.cover-beyblade   { background: linear-gradient(135deg, #4a2810 0%, #d97020 100%); }
.cover-mech       { background: linear-gradient(135deg, #102d1a 0%, #20a850 100%); }
.cover-babka      { background: linear-gradient(135deg, #4a1040 0%, #d040a0 100%); }
.cover-puzzle     { background: linear-gradient(135deg, #4a3010 0%, #f0a030 100%); }
.cover-chase      { background: linear-gradient(135deg, #4a4010 0%, #f0c020 100%); }

.game-card .body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.game-card h3 {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}
.game-card .desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
}
.game-card .play {
    margin-top: 10px;
    align-self: flex-start;
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.game-card:hover .play { color: var(--pink); }

/* === ABOUT === */
.about-section {
    padding: 40px 0 60px;
    border-top: 1px solid var(--border);
}
.about-section h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    margin-bottom: 16px;
    text-align: center;
}
.about-section p {
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto 12px;
    line-height: 1.6;
    text-align: center;
    font-size: 15px;
}
.about-section a { color: var(--cyan); text-decoration: none; }
.about-section a:hover { text-decoration: underline; }

/* === FOOTER === */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 26px 0;
    color: var(--muted);
    font-size: 13px;
}
.site-footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* === GAME PAGE === */
.game-page {
    padding: 20px 0;
}
.game-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
}
.game-back:hover { color: var(--cyan); }

.game-frame-wrap {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    width: 100%;
    margin-bottom: 16px;
    position: relative;
}
.game-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 700px) {
    .game-frame-wrap { aspect-ratio: 9 / 16; max-height: 80vh; }
    .nav { gap: 14px; }
    .nav a { font-size: 13px; }
}

.game-meta h1 {
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 900;
    margin-bottom: 8px;
}
.game-meta .desc {
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 14px;
}
.fullscreen-btn {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: #fff;
    border: 0;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}
.fullscreen-btn:hover { box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); }
