:root {
    --bg-main: #f6f8fc;
    --text-main: #2d3142;
    --text-muted: #9094a6;
    --accent: #ff8fa3;
    --accent-hover: #ff758f;
    --card-bg: #ffffff;
    
    /* Дорогие пастельные градиенты для категорий */
    --grad-pop-it: linear-gradient(135deg, #ffcfe3 0%, #ffecd2 100%);
    --grad-slime: linear-gradient(135deg, #c2e9fb 0%, #aeedd4 100%);
    --grad-asmr: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    --grad-soap: linear-gradient(135deg, #fddb92 0%, #d1f7ff 100%);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body { 
    background: var(--bg-main); 
    color: var(--text-main); 
    overflow-x: hidden;
}

/* Шапка сайта */
.site-header { 
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.header-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 14px 24px; 
}
.logo { 
    font-size: 1.4rem; 
    font-weight: 800; 
    text-decoration: none; 
    color: var(--text-main); 
    letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.nav-menu a { 
    margin: 0 16px; 
    text-decoration: none; 
    color: var(--text-main); 
    font-weight: 600; 
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-menu a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Кнопки */
.btn-install, .btn-shortcut { 
    background: var(--accent); 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 20px; 
    font-weight: 600; 
    font-size: 0.9rem;
    cursor: pointer; 
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 143, 163, 0.3);
}
.btn-install:hover, .btn-shortcut:hover { 
    background: var(--accent-hover); 
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 143, 163, 0.4);
}
.lang-switcher { 
    padding: 8px 12px; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    background: white; 
    font-weight: 600; 
    color: var(--text-main);
    cursor: pointer;
}

/* Блок Hero */
.hero-section { 
    text-align: center; 
    padding: 60px 20px; 
    max-width: 800px; 
    margin: 0 auto; 
}
.hero-section h1 { 
    font-size: 2.8rem; 
    font-weight: 800; 
    letter-spacing: -1px; 
    margin-bottom: 16px;
    background: linear-gradient(45deg, #2d3142, #ff758f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-section p { font-size: 1.2rem; color: var(--text-muted); font-weight: 400; }

/* Сетка карточек */
.grid-section { max-width: 1200px; margin: 40px auto; padding: 0 24px; }
.grid-section h2 { font-size: 1.7rem; font-weight: 700; margin-bottom: 24px; letter-spacing: -0.5px; }

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

/* Карточки */
.card { 
    background: var(--card-bg); 
    border-radius: 24px; 
    padding: 16px; 
    text-decoration: none; 
    color: inherit; 
    box-shadow: 0 10px 30px rgba(160, 175, 195, 0.12); 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.8);
}
.card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 20px 40px rgba(160, 175, 195, 0.22); 
}

/* Изображения в карточках */
.card-cat[href*="pop-it"] .card-img-placeholder { background: var(--grad-pop-it); }
.card-cat[href*="slime"] .card-img-placeholder { background: var(--grad-slime); }
.card-cat[href*="asmr-slicing"] .card-img-placeholder { background: var(--grad-asmr); }
.card-cat[href*="soap-crushing"] .card-img-placeholder { background: var(--grad-soap); }

.card-game .card-img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    position: relative;
}
/* Псевдоиконка для игры, пока нет постера */
.card-game .card-img-placeholder::after {
    content: "🎮";
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
}

.card-img-placeholder { 
    height: 180px; 
    border-radius: 18px; 
    margin-bottom: 16px; 
}
.card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.rating { 
    font-weight: 700; 
    color: #ffb703; 
    font-size: 0.9rem; 
    background: #fff9db;
    padding: 4px 10px;
    border-radius: 10px;
    width: max-content;
}

/* SEO текст */
.seo-text-block { 
    max-width: 1200px; 
    margin: 60px auto; 
    padding: 32px; 
    background: #fff; 
    border-radius: 28px; 
    box-shadow: 0 10px 30px rgba(160, 175, 195, 0.06);
}
.seo-text-block h2 { margin-bottom: 14px; font-size: 1.5rem; }
.seo-text-block p { color: var(--text-muted); line-height: 1.7; }

/* Страница игры (Интеграция баннера без полос прокрутки) */
.game-page-wrapper { 
    display: flex; 
    flex-direction: column; 
    height: calc(100vh - 73px); /* Вычитаем высоту шапки */
}
.game-top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 24px; 
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
.game-top-bar h1 { font-size: 1.4rem; font-weight: 700; }
.game-container { 
    flex: 1; 
    position: relative; 
    width: 100%; 
    background: #111; 
}
#game-frame { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    border: none; 
}

/* Рекламный адаптивный блок */
.ad-wrapper { 
    width: 100%; 
    background: #ffffff; 
    border-top: 1px solid #e2e8f0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 6px 0;
}
.ad-container-slot { 
    width: 728px; 
    height: 90px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.ad-placeholder { 
    width: 100%; 
    height: 100%; 
    background: #f8fafc; 
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-weight: bold;
    letter-spacing: 1px; 
}

/* Подвал */
.site-footer { background: #fff; padding: 30px 20px; border-top: 1px solid #e2e8f0; margin-top: auto;}
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.9rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin-left: 20px; }
.footer-links a:hover { color: var(--accent); }

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .nav-menu { display: none; } /* Скрываем десктопное меню на телефонах */
    .hero-section h1 { font-size: 2rem; }
    .categories-grid, .games-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0; }
    .card { padding: 12px; border-radius: 18px; }
    .card-img-placeholder { height: 120px; border-radius: 12px; }
    .ad-container-slot { width: 320px; height: 50px; }
    .game-top-bar h1 { font-size: 1.1rem; }
    .btn-shortcut { padding: 6px 12px; font-size: 0.8rem; }
    .footer-container { flex-direction: column; text-align: center; gap: 10px; }
    .footer-links a { margin: 0 10px; }
}