        /* Шрифты подключаются локально в layout перед этим файлом. */

        :root {
            --gold: #c9a45c;
            --gold-hover: #e0be7b;
            --dark-bg: #0a0a0c;
            --text-main: #b0b0b0;
            --text-light: #ffffff;
            --panel-bg: rgba(15, 15, 18, 0.85);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: var(--dark-bg);
            color: var(--text-main);
            font-family: 'Montserrat', sans-serif;
            line-height: 1.7;
            overflow-x: hidden;
        }

        .fog {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image:
                radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.55), transparent 55%),
                radial-gradient(1px 1px at 70% 65%, rgba(201, 164, 92, 0.45), transparent 55%),
                radial-gradient(1.5px 1.5px at 45% 80%, rgba(255, 255, 255, 0.35), transparent 55%),
                radial-gradient(1px 1px at 85% 15%, rgba(255, 255, 255, 0.4), transparent 55%);
            background-size: 240px 240px;
            opacity: 0.3;
            pointer-events: none;
            z-index: 0;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            position: relative;
            z-index: 2;
        }

        /* --- Главный экран с ФОНОМ ---
           Стили привязаны к .destiny-hero, а не к тегу header:
           иначе любой <header> внутри контента (например, шапка статьи Wiki)
           получал полноэкранный фон и затемняющий слой поверх текста. */
        .destiny-hero {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 100px 20px 50px;
            position: relative;
            
            /* НАСТРОЙКА ФОНОВОЙ КАРТИНКИ */
            /* Убедитесь, что картинка лежит в той же папке и называется bg.png */
            background-image: url('../img/bg.png'); 
            background-size: cover;
            background-position: center top;
            background-attachment: fixed; /* Эффект параллакса */
        }

        /* Затемняющий слой поверх картинки, чтобы текст читался */
        .destiny-hero::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(to bottom, rgba(10, 10, 12, 0.4) 0%, rgba(10, 10, 12, 0.8) 60%, rgba(10, 10, 12, 1) 100%);
            z-index: 1;
        }

        .hero-title {
            font-family: 'Cinzel', serif;
            font-size: clamp(3rem, 8vw, 7rem);
            font-weight: 900;
            color: var(--text-light);
            letter-spacing: 0.1em;
            text-transform: uppercase;
            text-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(201, 164, 92, 0.5);
            margin-bottom: 20px;
            position: relative;
            z-index: 2;
            animation: fadeInDown 1.5s ease-out;
        }
		
		        /* Контейнер для логотипа */
        .hero-logo-container {
            margin-bottom: 20px;
            position: relative;
            z-index: 2;
            animation: fadeInDown 1.5s ease-out;
        }

        /* Сама картинка логотипа */
        .hero-logo {
            max-width: 100%;
            height: auto;
            width: 700px; /* Максимальная ширина на больших экранах */
            display: block;
            margin: 0 auto;
            /* Тень, чтобы логотип не сливался с фоном */
            filter: drop-shadow(0px 10px 20px rgba(0, 0, 0, 0.8)) drop-shadow(0px 0px 15px rgba(201, 164, 92, 0.4));
        }

        /* На мобильных устройствах делаем логотип чуть меньше */
        @media (max-width: 768px) {
            .hero-logo {
                width: 90%; 
            }
        }

        .hero-subtitle {
            font-size: clamp(1rem, 2vw, 1.2rem);
            text-transform: uppercase;
            letter-spacing: 3px;
            color: var(--gold);
            margin-bottom: 20px;
            position: relative;
            z-index: 2;
            text-shadow: 0 2px 4px rgba(0,0,0,0.8);
            animation: fadeInUp 1.5s ease-out 0.5s both;
        }

        .hero-desc {
            max-width: 800px;
            color: var(--text-main);
            font-size: 1.1rem;
            margin-bottom: 50px;
            position: relative;
            z-index: 2;
            text-shadow: 0 2px 4px rgba(0,0,0,0.8);
            animation: fadeInUp 1.5s ease-out 0.8s both;
        }

        .btn {
            display: inline-block;
            padding: 15px 40px;
            font-family: 'Cinzel', serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--dark-bg);
            background-color: var(--gold);
            text-decoration: none;
            border: none;
            border-radius: 2px;
            text-transform: uppercase;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            z-index: 2;
            animation: fadeInUp 1.5s ease-out 1s both;
        }

        .btn:hover {
            background-color: var(--gold-hover);
            box-shadow: 0 0 25px rgba(201, 164, 92, 0.8);
            transform: translateY(-2px);
        }
		
		        /* Контейнер для кнопок */
        .hero-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
            position: relative;
            z-index: 2;
            animation: fadeInUp 1.5s ease-out 1s both;
        }

        /* Стиль для второй (прозрачной) кнопки */
        .btn-outline {
            background-color: transparent;
            color: var(--gold);
            border: 1px solid var(--gold);
            animation: none; /* Отключаем анимацию, так как она уже есть у контейнера */
        }

        .btn-outline:hover {
            background-color: var(--gold);
            color: var(--dark-bg);
        }

        /* --- Секция с табами --- */
        .lore-section {
            padding: 80px 0 100px;
            background-color: var(--dark-bg); /* Чтобы перекрыть фон при скролле */
            position: relative;
            z-index: 2;
        }

        .tabs-nav {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 40px;
            border-bottom: 1px solid rgba(201, 164, 92, 0.2);
            padding-bottom: 20px;
        }

        .tab-btn {
            background: transparent;
            border: 1px solid rgba(201, 164, 92, 0.3);
            color: var(--text-main);
            padding: 10px 20px;
            font-family: 'Cinzel', serif;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .tab-btn:hover {
            border-color: var(--gold);
            color: var(--gold);
        }

        .tab-btn.active {
            background-color: var(--gold);
            color: var(--dark-bg);
            border-color: var(--gold);
            font-weight: 700;
        }

        .tab-content {
            display: none;
            animation: fadeIn 0.5s ease;
            background: var(--panel-bg);
            padding: 40px;
            border: 1px solid rgba(201, 164, 92, 0.2);
            border-radius: 4px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            backdrop-filter: blur(5px); /* Легкое размытие заднего фона */
        }

        .tab-content.active {
            display: block;
        }

        /* ... ОСТАЛЬНЫЕ СТИЛИ (Заголовки, списки, карточки) ... */
        .tab-content h2 {
            font-family: 'Cinzel', serif;
            color: var(--gold);
            font-size: 2rem;
            margin-bottom: 25px;
            text-align: center;
        }

        .tab-content h3 {
            font-family: 'Cinzel', serif;
            color: var(--text-light);
            font-size: 1.4rem;
            margin: 30px 0 15px 0;
            border-bottom: 1px solid rgba(201, 164, 92, 0.2);
            padding-bottom: 5px;
        }

        .tab-content p {
            margin-bottom: 15px;
        }

        .tab-content ul {
            list-style-type: none;
            margin-bottom: 20px;
        }

        .tab-content ul li {
            position: relative;
            padding-left: 20px;
            margin-bottom: 10px;
        }

        .tab-content ul li::before {
            content: "✦";
            color: var(--gold);
            position: absolute;
            left: 0;
            font-size: 0.9rem;
        }

        .highlight {
            color: var(--text-light);
            font-weight: 600;
        }

        .lore-quote {
            font-style: italic;
            border-left: 3px solid var(--gold);
            padding-left: 15px;
            margin: 20px 0;
            color: #d1d1d1;
            background: rgba(201, 164, 92, 0.05);
            padding: 15px;
        }

        .grid-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .card {
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(201, 164, 92, 0.1);
            padding: 20px;
            border-radius: 4px;
            transition: border-color 0.3s;
        }
        
        .card:hover {
            border-color: var(--gold);
        }

        .card h4 {
            font-family: 'Cinzel', serif;
            color: var(--gold);
            margin-bottom: 10px;
            font-size: 1.2rem;
        }

        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .dn-footer {
            padding: 30px 0;
            text-align: center;
            color: #555;
            font-size: 0.9rem;
            border-top: 1px solid rgba(201, 164, 92, 0.1);
            background-color: var(--dark-bg);
            position: relative;
            z-index: 2;
        }

        /* --- Layout CMS: общие блоки страниц Destiny --- */
        .hero-logo-link {
            display: block;
            line-height: 0;
        }

        .destiny-hero--compact {
            min-height: 40vh;
            padding-top: 70px;
        }

        .destiny-hero--compact .hero-logo {
            width: 420px;
        }

        .destiny-content {
            padding-top: 60px;
            padding-bottom: 60px;
        }

        .destiny-content h1,
        .destiny-content h2,
        .destiny-content h3 {
            font-family: 'Cinzel', serif;
            color: var(--text-light);
            margin: 0 0 18px;
        }

        .destiny-content a {
            color: var(--gold);
        }

        /* Витрины главной: последние темы форума и товары магазина. */
        .destiny-widget {
            margin-top: 48px;
        }

        .destiny-widget:first-child {
            margin-top: 0;
        }

        .destiny-widget .community-head {
            margin-bottom: 20px;
        }

        .destiny-widget .community-head h2 {
            margin-bottom: 6px;
        }

        .destiny-widget__list {
            margin: 0;
        }

        .destiny-widget__grid {
            margin-top: 20px;
        }

        .destiny-widget .shop-card h3 {
            font-size: 20px;
        }

        .destiny-widget .shop-card h3 a {
            text-decoration: none;
        }

        .lore-note {
            margin-top: 20px;
        }

        @media (max-width: 768px) {
            .tab-btn { width: 100%; text-align: center; }
            .tab-content { padding: 20px; }
            .destiny-hero { background-attachment: scroll; } /* Отключаем фиксацию на мобильных для лучшей производительности */
            .destiny-hero--compact .hero-logo { width: 90%; }
        }

        /* --- Единая навигация Destiny (форум, магазин, аккаунт) --- */
        .dn-nav {
            position: relative;
            z-index: 50;
            background: rgba(10, 10, 12, 0.96);
            border-bottom: 1px solid rgba(201, 164, 92, 0.25);
            backdrop-filter: blur(6px);
        }

        .dn-nav__inner {
            display: flex;
            align-items: center;
            gap: 24px;
            min-height: 64px;
            flex-wrap: wrap;
        }

        .dn-nav__brand {
            font-family: 'Cinzel', serif;
            font-weight: 900;
            letter-spacing: 0.18em;
            color: var(--gold);
            text-decoration: none;
            font-size: 1.05rem;
        }

        .dn-nav__links {
            display: flex;
            gap: 22px;
            list-style: none;
            margin: 0;
            padding: 0;
            flex-wrap: wrap;
        }

        .dn-nav__links a {
            color: var(--text-main);
            text-decoration: none;
            font-size: 0.95rem;
            letter-spacing: 0.04em;
            padding: 6px 0;
            border-bottom: 2px solid transparent;
            transition: color 0.2s ease, border-color 0.2s ease;
        }

        .dn-nav__links a:hover,
        .dn-nav__links a.is-active {
            color: var(--gold-hover);
            border-bottom-color: var(--gold);
        }

        .dn-nav__actions {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 0.9rem;
        }

        .dn-nav__actions a {
            color: var(--text-light);
            text-decoration: none;
        }

        .dn-nav__actions a:hover {
            color: var(--gold-hover);
        }

        .dn-nav__cart {
            position: relative;
        }

        .dn-nav__badge {
            display: inline-block;
            min-width: 18px;
            padding: 0 5px;
            border-radius: 9px;
            background: var(--gold);
            color: var(--dark-bg);
            font-size: 0.75rem;
            font-weight: 700;
            text-align: center;
            line-height: 18px;
        }

        .dn-nav__account {
    border: 1px solid rgba(201, 164, 92, 0.45);
    border-radius: 4px;
    padding: 5px 12px;
}

.dn-nav__account--user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dn-nav__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(201, 164, 92, 0.55);
    background: #15151a;
}

@media (max-width: 768px) {
    .dn-nav__inner {
        gap: 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .dn-nav__links {
        gap: 14px;
        order: 3;
        width: 100%;
    }
    .dn-nav__actions {
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

