/* ===== База ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #070a12;
    --bg-soft: #0b1020;
    --card: #0f1526;
    --border: rgba(255, 255, 255, 0.08);
    --text: #eef2ff;
    --muted: #94a0bd;
    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --lime: #b6ff3b;

    --font-emoji: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, var(--font-emoji);
    --font-display: 'Unbounded', var(--font-body);

    --transition: 0.2s ease;
    --header-height: 60px;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

a {
    color: inherit;
}

svg {
    display: block;
}

.container {
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    scroll-margin-top: var(--header-height);
}

/* ===== Шапка ===== */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(7, 10, 18, 0.85);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 940px;
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 10px 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent-2), var(--lime));
    color: #070a12;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.logo-domain {
    color: var(--muted);
}

.nav-link {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-link:hover {
    color: var(--text);
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.12);
}

/* ===== Короткий hero ===== */
.hero {
    position: relative;
    padding: 56px 0 44px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% -30%, rgba(139, 92, 246, 0.28), transparent 60%),
        radial-gradient(ellipse at 85% 120%, rgba(34, 211, 238, 0.1), transparent 55%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 5px 13px;
    margin-bottom: 14px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
    color: #d8ccff;
    font-size: 0.72rem;
    font-weight: 500;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    animation: fade-up 0.6s ease both;
}

.hero h1 .grad {
    background: linear-gradient(120deg, var(--accent-2), var(--accent) 60%, #ff4d8d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero p {
    max-width: 520px;
    margin: 12px auto 22px;
    color: var(--muted);
    font-size: 0.92rem;
    animation: fade-up 0.6s 0.06s ease both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--accent), #a855f7 45%, var(--accent-2) 130%);
    color: #fff;
    font-size: 0.87rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fade-up 0.6s 0.12s ease both;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.45);
}

/* ===== Игры ===== */
.games {
    padding: 32px 0 52px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.section-head span {
    color: var(--muted);
    font-size: 0.76rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.game-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    text-decoration: none;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.game-card:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.game-cover {
    position: relative;
    display: grid;
    place-items: center;
    height: 104px;
    isolation: isolate;
}

.game-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 12px);
    z-index: 1;
}

.game-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 130%, rgba(255, 255, 255, 0.2), transparent 60%);
    z-index: 1;
}

.cover-tractor { background: linear-gradient(135deg, #14532d, #22c55e 55%, #a3e635); }
.cover-race    { background: linear-gradient(135deg, #1e1b4b, #4f46e5 55%, #38bdf8); }
.cover-race3d  { background: linear-gradient(135deg, #7c2d12, #f97316 55%, #fbbf24); }

.game-emoji {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition);
}

.game-card:hover .game-emoji {
    transform: scale(1.1) translateY(-2px);
}

.game-badge,
.game-3d {
    position: absolute;
    top: 8px;
    z-index: 3;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.game-badge {
    left: 8px;
    background: var(--lime);
    color: #070a12;
}

.game-3d {
    right: 8px;
    border: 1px solid rgba(34, 211, 238, 0.6);
    background: rgba(7, 10, 18, 0.55);
    color: #a5f3fc;
}

.game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
}

.game-cat {
    display: block;
    margin-bottom: 1px;
    color: var(--accent-2);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.game-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.game-play {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #fff;
    transition: transform var(--transition), filter var(--transition);
}

.game-card:hover .game-play {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* ===== Подвал ===== */
footer {
    padding: 18px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #68738f;
    font-size: 0.76rem;
}

.footer-inner a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-inner a:hover {
    color: var(--accent-2);
}

/* ===== Анимация ===== */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Адаптивность ===== */
@media (max-width: 700px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-card:nth-child(3):last-child {
        grid-column: 1 / -1;
    }

    .game-cover {
        height: 92px;
    }

    .game-emoji {
        font-size: 2.1rem;
    }

    .game-info {
        padding: 9px 10px;
    }

    .game-info h3 {
        font-size: 0.82rem;
    }

    .game-play {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .container,
    .navbar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero {
        padding: 40px 0 34px;
    }

    .hero p {
        font-size: 0.85rem;
    }

    .games {
        padding: 26px 0 40px;
    }

    .section-head {
        margin-bottom: 14px;
    }

    .section-head h2 {
        font-size: 1.05rem;
    }

    .footer-inner {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
