/* --- ЛОКАЛЬНЫЕ ШРИФТЫ (PSI Optimization) --- */
@font-face {
    font-family: 'Cinzel';
    src: url('../fonts/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap; /* Текст виден сразу */
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/8vIJ7ww63mVu7gt79mT7.woff2') format('woff2');
    font-weight: 300 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(212, 175, 55, 0.3);
}

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

body, html {
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    overflow: hidden;
    user-select: none;
}

html {
    background-color: #050505;
}

/* --- ФОН --- */
.bg-wood {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Путь исправлен на относительный от папки styles */
    background: url('../files/wood-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: brightness(1.0) contrast(1.1); 
    z-index: -2;
    transition: filter 1s ease;
    will-change: filter; /* Подсказка браузеру */
}

.vignette {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000 120%);
    z-index: -1;
    pointer-events: none;
}

#particles-js { position: fixed; width: 100%; height: 100%; z-index: 0; }

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.glass-card {
    width: 100%;
    max-width: 500px;
    padding: 60px 40px;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeUp 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.3s;
    transition: border-color 0.5s, box-shadow 0.5s;
    will-change: opacity, transform;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 2px;
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
    transition: width 0.5s ease, box-shadow 0.5s ease;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--gold);
    margin-bottom: 5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: text-shadow 0.3s;
}

h1:active {
    transform: scale(0.98);
}

.subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 300;
}

.secret-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 1s ease;
    margin-bottom: 30px;
    color: var(--gold-light);
    font-style: italic;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
}

.glass-card.unlocked .secret-content {
    max-height: 100px;
    opacity: 1;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.glass-card.unlocked {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.glass-card.unlocked::before {
    width: 100%;
    box-shadow: 0 0 25px var(--gold);
}

.links-wrapper { display: flex; flex-direction: column; gap: 15px; }

.link-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 25px; text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--glass-border);
    transition: all 0.4s ease;
}
.link-text { color: #fff; font-size: 1rem; letter-spacing: 1px; }
.link-tag { font-size: 0.8rem; color: var(--gold); opacity: 0.6; transition: opacity 0.3s; }
.link-item:hover {
    background: rgba(212, 175, 55, 0.08); border-color: var(--gold);
    transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.link-item:hover .link-tag { opacity: 1; }
.main-project { background: rgba(212, 175, 55, 0.1); border: 1px solid var(--glass-border); }
.divider { height: 1px; width: 100px; background: rgba(255,255,255,0.1); margin: 20px auto; }

.secret-link {
    display: none;
    text-align: center;
    margin-top: 15px;
    color: var(--gold);
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeIn 1s forwards;
}
.glass-card.unlocked .secret-link { display: block; }

.music-toggle {
    position: fixed; bottom: 40px; right: 40px; z-index: 100;
    width: 50px; height: 50px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0,0,0,0.5); color: var(--gold);
    font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; backdrop-filter: blur(5px);
}
.music-toggle:hover { border-color: var(--gold); box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); transform: scale(1.1); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes flash { 0% { background-color: transparent; } 50% { background-color: rgba(212, 175, 55, 0.2); } 100% { background-color: transparent; } }

.flash-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 999;
    animation: flash 0.5s ease-out forwards;
    display: none;
}

/* --- INTRO OVERLAY --- */
.intro-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000;
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 1; transition: opacity 0.8s ease;
}

.intro-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 40px 60px;
    text-align: center;
    border-radius: 2px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    transform: scale(1); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intro-modal h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 400;
    letter-spacing: 2px;
}

.intro-buttons {
    display: flex; gap: 20px; justify-content: center;
}

.intro-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 10px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.intro-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.intro-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-overlay.hidden .intro-modal {
    transform: scale(0.9);
}

@media (max-width: 600px) { h1 { font-size: 2.2rem; } .glass-card { padding: 40px 20px; width: 90%; } .intro-modal { padding: 30px; width: 90%; } }