/* --- ПЕРЕМЕННЫЕ (Material 3 Dark Palette) --- */
:root {
    --bg: #0f0e13; /* Глубокий темный фон */
    --surface: #1c1b1f; /* Поверхность карточек */
    --surface-variant: #2b2930; /* Вторичные элементы */
    --primary: #d0bcff; /* M3 Light Purple */
    --on-primary: #381e72;
    --secondary: #ccc2dc;
    --outline: #938f99;
    --text: #e6e1e5;
    --text-muted: #938f99;
    --border: rgba(255, 255, 255, 0.08);
    --danger: #f2b8b5;
    
    /* Градиент для акцентов (SERVANT, твои идеи и т.д.) */
    --grad: linear-gradient(135deg, #d0bcff 0%, #b69df8 50%, #7c4dff 100%);
    --grad-btn: linear-gradient(90deg, #d0bcff 0%, #be94f8 100%);
}

/* --- ОБЩИЕ СТИЛИ --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* Эффект свечения на фоне */
.aurora {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 5% 5%, rgba(208, 188, 255, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 95% 95%, rgba(124, 77, 255, 0.05) 0%, transparent 40%);
    z-index: -2;
    pointer-events: none;
}

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

/* --- ШАПКА (Material Top Bar) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 5%;
    background: rgba(15, 14, 19, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -1px;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-item {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 100px;
    transition: 0.3s cubic-bezier(0.2, 0, 0, 1);
    color: var(--text-muted);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.nav-item.active {
    background: var(--surface-variant);
    color: var(--primary);
}

/* --- ГЛАВНАЯ СТРАНИЦА: ФИКС ПЕРСОНАЖЕЙ --- */
.content-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    z-index: 1;
}

.hero {
    position: relative;
    z-index: 10; /* Контент выше скинов */
    text-align: center;
    padding: 40px 20px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 40px;
}

/* Скины персонажей - Раздвигаем по краям */
.side-skin {
    position: fixed; /* Фиксируем относительно экрана */
    bottom: -20px;
    z-index: -1; /* Уходим за текст */
    height: 80vh !important;
    width: auto;
    pointer-events: none; /* Не мешают кликам */
    filter: drop-shadow(0 0 40px rgba(0,0,0,0.6));
    opacity: 0.7;
    transition: 0.5s ease-in-out;
}

.skin-left {
    left: -50px;
    transform: rotate(5deg);
}

.skin-right {
    right: -50px;
    transform: rotate(-5deg);
}

/* --- КАРТОЧКИ (Material 3 Cards) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 30px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px; /* M3 Large Shape */
    padding: 35px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.card:hover {
    transform: translateY(-8px);
    background: #25232a;
    border-color: var(--primary);
}

.card img {
    height: 64px;
    width: 64px;
    object-fit: contain;
    margin: 0 auto 25px;
}

/* --- ГРАДИЕНТНЫЙ ТЕКСТ (Для всех ключевых слов) --- */
.gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* --- КНОПКИ (Material 3 Pill Buttons) --- */
.btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-p {
    padding: 16px 32px;
    border-radius: 100px; /* Pill shape */
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.2, 0, 0, 1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-main {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-main:hover {
    filter: brightness(1.1);
    box-shadow: 0 8px 24px rgba(208, 188, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--surface-variant);
    color: var(--primary);
    border: 1px solid var(--outline);
}

.btn-secondary:hover {
    background: #3b383e;
}

.btn-danger {
    background: rgba(242, 184, 181, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* --- МАГАЗИН: HERO БЛОК --- */
.shop-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(208, 188, 255, 0.05) 0%, rgba(28, 27, 31, 1) 100%);
    border: 1px solid var(--primary);
    border-radius: 32px;
    padding: 50px 60px;
    margin: 40px 0;
    gap: 30px;
}

.hero-img-fix {
    max-width: 240px;
    filter: drop-shadow(0 0 30px rgba(208, 188, 255, 0.3));
}

/* --- ФОРМЫ (Material 3 Inputs) --- */
input, select, textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--surface-variant);
    border: 1px solid var(--outline);
    border-radius: 16px;
    color: white;
    outline: none;
    transition: 0.2s;
    font-size: 1rem;
}

input:focus {
    border-color: var(--primary);
    border-width: 2px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 8px;
    margin-left: 4px;
}

/* --- ПРОГРЕСС-БАР --- */
.progress-container {
    width: 100%;
    height: 12px;
    background: var(--surface-variant);
    border-radius: 100px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: var(--grad-btn);
    box-shadow: 0 0 20px rgba(208, 188, 255, 0.5);
}

/* --- ФУТЕР --- */
footer {
    padding: 80px 0 40px;
    margin-top: auto;
    background: #000;
    border-top: 1px solid var(--border);
    text-align: center;
    position: relative;
    z-index: 100; /* Поверх скинов */
}

footer a {
    margin: 0 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: 0.3s;
}

footer a:hover {
    color: var(--primary);
}

footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 25px;
    opacity: 0.6;
}

/* --- АНИМАЦИЯ ПЕРЕХОДА --- */
.page-fade {
    animation: m3Fade 0.6s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes m3Fade {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 1100px) {
    .skin-left { left: -150px; opacity: 0.4; }
    .skin-right { right: -150px; opacity: 0.4; }
}

@media (max-width: 900px) {
    .shop-hero { flex-direction: column; text-align: center; padding: 40px; }
    .hero-img-fix { max-width: 180px; }
}

@media (max-width: 768px) {
    .side-skin { display: none; } /* Скрываем скины на телефонах */
    .grid { grid-template-columns: 1fr; }
    .btn-group { flex-direction: column; }
    .navbar { flex-direction: column; gap: 15px; }
    .nav-links { display: none; } /* Можно заменить на бургер-меню */
}