:root {
    --surface-0: #05070C;
    --surface-1: #0A0D12;
    --surface-2: #0F131C;
    --surface-3: #161D2B;
    --surface-4: #1E2636;
    --accent: #38BDF8;
    --accent-muted: #1E3A5F;
    --text-primary: #E8EDF4;
    --text-secondary: #9BA8B8;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-full: 999px;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--surface-0);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(110, 231, 183, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(59, 109, 255, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite; pointer-events: none; z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -50px) rotate(120deg); }
    66% { transform: translate(-20px, 30px) rotate(240deg); }
}

/* ОБНОВЛЕННАЯ ШАПКА И ЛОГОТИП */
header { background: var(--surface-2); border-bottom: 1px solid var(--surface-3); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }

.header-logo { font-size: 1.5rem; font-weight: 900; color: var(--text-primary); text-decoration: none; letter-spacing: 2px; transition: color 0.3s, text-shadow 0.3s; }
.header-logo:hover { color: var(--accent); text-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }

.nav-menu { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; justify-content: center; align-items: center; }
.nav-menu a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; font-weight: 500; }
.nav-menu a:hover { color: var(--accent); }

/* РАЗДЕЛЕННЫЙ ЛОГОТИП (BALB + GIF + ESKA) НА ГЛАВНОЙ */
.hero-logo-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem 1rem;
    min-height: 350px;
    overflow: hidden;
}

.split-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
}

.bg-text-part {
    font-size: clamp(3rem, 10vw, 12rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px rgba(56, 189, 248, 0.15);
    text-shadow: 0 0 40px rgba(56, 189, 248, 0.05);
    letter-spacing: 0.05em;
    z-index: 0;
    white-space: nowrap;
    user-select: none;
}

.hero-gif-link {
    position: relative;
    z-index: 1;
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
    flex-shrink: 0;
}

.hero-gif-link:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.4));
}

.hero-gif-link img {
    max-width: 100%;
    width: 280px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ОСТАЛЬНЫЕ БЛОКИ */
.hero { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem 3rem; text-align: center; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 1rem; background: linear-gradient(135deg, var(--text-primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--text-secondary); }

.categories, .catalog, .category, .developers, .reviews-section { max-width: 1200px; margin: 3rem auto; padding: 0 1.5rem; }
.categories h2, .catalog h1, .category h1, .developers h2, .reviews-section h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2rem; text-align: center; }

/* === ИЗМЕНЕНИЯ ДЛЯ ВЫРАВНИВАНИЯ КАРТОЧЕК === */
.developers-grid, .reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

.category-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.5rem; 
}

/* Жестко заставляем карточки вставать по 4 в ряд на компах */
@media (min-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.category-card { 
    background: var(--surface-2); 
    padding: 1.5rem; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--surface-3); 
    transition: transform 0.2s, border-color 0.2s; 
    display: flex; 
    flex-direction: column; 
}
.category-card:hover { transform: translateY(-4px); border-color: var(--accent-muted); }
.category-card h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--accent); }
/* Заставляем текст занимать всё свободное место, чтобы кнопки прижались ко дну */
.category-card p { color: var(--text-secondary); margin-bottom: 1.5rem; flex-grow: 1; }

.btn { display: inline-block; padding: 0.75rem 1.5rem; background: var(--accent); color: var(--surface-0); text-decoration: none; border-radius: var(--radius-full); font-weight: 600; transition: background 0.2s; text-align: center; align-self: flex-start; }
.btn:hover { background: #60CEF8; }

.developers { background: var(--surface-1); border-radius: var(--radius-md); padding: 2.5rem 1.5rem; margin-top: 4rem; }
.developer-card { background: var(--surface-2); padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--surface-3); text-align: center; transition: transform 0.2s, border-color 0.2s; }
.developer-card:hover { transform: translateY(-4px); border-color: var(--accent-muted); }
.developer-avatar { width: 100px; height: 100px; margin: 0 auto 1rem; border-radius: 50%; overflow: hidden; border: 3px solid var(--accent); }
.developer-avatar.helper { border-color: var(--text-secondary); width: 80px; height: 80px; }
.developer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.developer-card h3 { font-size: 1.2rem; margin-bottom: 0.25rem; color: var(--text-primary); }
.developer-role { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; font-style: italic; }
.telegram-link { display: inline-block; padding: 0.5rem 1.25rem; background: var(--accent); color: var(--surface-0); text-decoration: none; border-radius: var(--radius-full); font-weight: 600; font-size: 0.85rem; transition: background 0.2s; }

.review-card { background: var(--surface-2); padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--surface-3); display: flex; flex-direction: column; }
.review-rating { color: #FBBF24; font-size: 1.2rem; margin-bottom: 0.5rem; }
.review-text { color: var(--text-primary); font-style: italic; margin-bottom: 1rem; flex-grow: 1; }
.review-author { color: var(--accent); font-weight: 600; font-size: 0.9rem; text-align: right; }

footer { background: var(--surface-2); border-top: 1px solid var(--surface-3); padding: 1.5rem; text-align: center; color: var(--text-secondary); margin-top: 4rem; font-size: 0.9rem; }

/* АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНОВ */
@media (max-width: 768px) {
    .nav-container { padding: 1rem; gap: 1rem; flex-direction: column; }
    .nav-menu { gap: 0.75rem; justify-content: center; }
    .nav-menu a { font-size: 0.85rem; padding: 0.25rem 0.5rem; }
    .hero { padding: 1rem 1rem 2rem; }
    
    .split-logo-container { gap: 0.5rem; }
    .bg-text-part { font-size: clamp(2rem, 8vw, 4rem); letter-spacing: 0; }
    .hero-gif-link img { width: 140px; }
    
    .game-section iframe { height: 350px; }
    .btn { width: 100%; display: block; box-sizing: border-box; }
}