/* =========================================
   1. БАЗА И АТМОСФЕРА
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Inter:wght@300;400;600&display=swap');

:root {
    --c-gold: #ffd700;
    --c-gold-dark: #b8860b;
    --c-bg: #050403;
    --c-panel: rgba(18, 14, 11, 0.92);
    --c-text: #e0e0e0;
}

body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Эффект зернистости (Noise) - делает сайт похожим на кино/старую бумагу */
#grain-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 900; opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

/* Типографика */
h1, h2, h3, h4, .cinzel {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.text-gradient-gold {
    background: linear-gradient(180deg, #ffd700 20%, #b8860b 80%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3));
}

/* Скроллбар */
::-webkit-scrollbar { width: 8px; background: #0b0a09; }
::-webkit-scrollbar-thumb { background: linear-gradient(#b8860b, #6b4c1e); border-radius: 4px; border: 1px solid #000; }

/* =========================================
   2. НОВАЯ КНОПКА: ROYAL SEAL (КОРОЛЕВСКАЯ ПЕЧАТЬ)
   ========================================= */
.btn-royal-wrapper {
    position: relative;
    display: inline-block;
    padding: 10px; /* Место для расширения рамки */
    z-index: 10;
}

.btn-royal {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 22px 55px;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    color: #e0e0e0;
    
    /* Фон: Темная сталь */
    background: linear-gradient(180deg, #2b2b2b 0%, #121212 100%);
    /* Граница: Темное золото */
    border: 1px solid #755c26;
    
    /* Форма: Срезанные углы */
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

/* Эффект: Внутреннее золотое свечение при наведении */
.btn-royal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: 0.4s;
}

/* Декоративные уголки (золотые скобы) */
.btn-corner {
    position: absolute;
    width: 10px; height: 10px;
    border: 2px solid #ffd700;
    transition: 0.4s;
    opacity: 0.5;
}
.c-tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.c-tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.c-bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.c-br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

/* Ховер эффекты */
.btn-royal-wrapper:hover .btn-royal {
    transform: translateY(-4px);
    border-color: #ffd700;
    color: #fff;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.9), 
        0 0 20px rgba(255, 215, 0, 0.15); /* Внешнее свечение */
    background: linear-gradient(180deg, #3d3d3d 0%, #1a1a1a 100%);
}

.btn-royal-wrapper:hover .btn-royal::before { opacity: 1; }

.btn-royal-wrapper:hover .btn-corner {
    width: 100%; height: 100%; /* Уголки замыкаются в рамку */
    opacity: 1;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Текст кнопки */
.btn-royal-title {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(180deg, #fff 20%, #ffd700 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8));
}
.btn-royal-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: -2px;
}

/* Анимация иконки */
.btn-icon-box {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid #755c26;
    transform: rotate(45deg);
    transition: 0.4s;
}
.btn-icon-box i { transform: rotate(-45deg); color: #ffd700; }

.btn-royal-wrapper:hover .btn-icon-box {
    background: #ffd700;
    border-color: #fff;
    transform: rotate(225deg); /* Вращение ромба */
}
.btn-royal-wrapper:hover .btn-icon-box i {
    color: #000;
    transform: rotate(-225deg); /* Компенсация вращения для иконки */
}

/* Анимация левитации */
.animate-float { animation: float 4s ease-in-out infinite; }
@keyframes float { 0% {transform: translateY(0);} 50% {transform: translateY(-6px);} 100% {transform: translateY(0);} }

/* =========================================
   3. КОМПОНЕНТЫ (Панели, Навбар, Футер)
   ========================================= */
.glass-panel, .card, .navbar, .footer {
    background: var(--c-panel);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-bottom: 2px solid rgba(255, 215, 0, 0.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

/* Навбар */
.navbar { padding: 15px 0; }
.nav-link { 
    color: #aaa !important; font-weight: 700; transition: 0.3s; 
    text-transform: uppercase; font-family: 'Cinzel', serif; 
}
.nav-link:hover, .nav-link.active { color: #ffd700 !important; text-shadow: 0 0 12px rgba(255, 215, 0, 0.4); }

.dropdown-menu {
    background: rgba(10, 8, 6, 0.98); border: 1px solid #b8860b;
    border-radius: 0; box-shadow: 0 15px 40px rgba(0,0,0,0.9);
}
.dropdown-item { color: #ccc; transition: 0.2s; padding: 8px 20px; }
.dropdown-item:hover { background: rgba(184, 134, 11, 0.2); color: #ffd700; padding-left: 25px; }

/* Карточки рас */
.path-container { display: flex; height: 400px; gap: 8px; width: 100%; }
.path-card {
    flex: 1; position: relative; background-size: cover; background-position: center top;
    border: 1px solid #444; transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    filter: grayscale(100%) brightness(0.5); cursor: default;
}
.path-card:hover {
    flex: 4; filter: grayscale(0%) brightness(1.1);
    border-color: #ffd700; box-shadow: 0 0 50px rgba(0,0,0,0.8); z-index: 5;
}
.path-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, #000 0%, transparent 100%);
    opacity: 0; transform: translateY(20px); transition: 0.4s 0.1s;
}
.path-card:hover .path-content { opacity: 1; transform: translateY(0); }

/* Частицы */
#particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iNDAwIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSIxIiBmaWxsPSJyZ2JhKDI1NSwyMTUsMCwwLjIpIi8+PC9zdmc+');
    opacity: 0.3; animation: particleMove 100s linear infinite;
}
@keyframes particleMove { from { background-position: 0 0; } to { background-position: 500px 500px; } }

/* Адаптив */
@media (max-width: 768px) {
    .path-container { flex-direction: column; height: auto; }
    .path-card { height: 200px; width: 100%; margin-bottom: 5px; }
    .path-content { opacity: 1; transform: translateY(0); padding: 15px; }
    .btn-royal { padding: 15px 30px; }
}