:root {
    --bg-main: #050608;
    --bg-panel: #101217;
    --bg-panel-alt: #151822;
    --accent-red: #c0161f;
    --accent-red-soft: #7a1016;
    --accent-gold: #c9a34a;
    --text-main: #e5e5e5;
    --text-muted: #8b8f99;
    --border-soft: #262a33;
    --glow-red: 0 0 18px rgba(192, 22, 31, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1a1c24 0, #050608 55%, #000000 100%);
    color: var(--text-main);
    min-height: 100vh;
}

/* Gothic headings */
.gothic {
    font-family: 'IM Fell English SC', serif;
    letter-spacing: 0.06em;
}

/* Фоновая сетка */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.35;
    pointer-events: none;
    animation: gridMove 40s linear infinite;
    z-index: 0;
}

@keyframes gridMove {
    from { transform: translate3d(0,0,0); }
    to { transform: translate3d(-80px,-80px,0); }
}

/* Водяной знак — старая печать */
.watermark {
    position: fixed;
    inset: 0;
    background: url("inquisition_old.svg") center/45% no-repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Основной контейнер */
.app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header + навигация */

header {
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(to right, #050608 0, #101217 40%, #050608 100%);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--glow-red);
    background: radial-gradient(circle, #2a0a0d 0, #050608 70%);
    overflow: hidden;
}

.logo-mark::before {
    content: "";
    position: absolute;
    width: 120%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    animation: scanLine 2.8s linear infinite;
    opacity: 0.8;
}

@keyframes scanLine {
    0% { transform: translateY(-18px); }
    100% { transform: translateY(18px); }
}

.logo-mark span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 2px;
}

.logo-text-main {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.logo-text-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
    transition: width 0.25s ease;
}

nav a:hover {
    color: var(--accent-gold);
    transform: translateY(-1px);
}

nav a:hover::after {
    width: 100%;
}

nav a.active {
    color: var(--accent-gold);
}

nav a.active::after {
    width: 100%;
}

.user-block {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1dd15f;
    box-shadow: 0 0 8px rgba(29, 209, 95, 0.8);
}

.user-name {
    text-transform: uppercase;
    letter-spacing: 0.16em;
}
/* Layout */

main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
    gap: 24px;
    padding: 24px 32px 32px;
}

/* Hero + 3D‑фон + печать */

.hero {
    background: radial-gradient(circle at top left, #2a0a0d 0, #101217 40%, #050608 100%);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    padding: 24px 26px 26px;
    position: relative;
    overflow: hidden;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.hero-title-block h1 {
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hero-title-block h1 span {
    color: var(--accent-red);
}

.hero-subtitle {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 520px;
}

.hero-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.4);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-top: 10px;
}

/* Консоль */

.hero-console {
    background: rgba(5, 6, 8, 0.85);
    border-radius: 12px;
    border: 1px solid #2b303b;
    padding: 14px 14px 12px;
    position: relative;
    overflow: hidden;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.console-header span {
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.console-dots {
    display: flex;
    gap: 6px;
}

.console-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a3f4a;
}

.console-dot:nth-child(1) { background: #c0161f; }
.console-dot:nth-child(2) { background: #c9a34a; }
.console-dot:nth-child(3) { background: #1dd15f; }

.console-body {
    font-family: "SF Mono", "JetBrains Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #c9d1e3;
    max-height: 160px;
    overflow: hidden;
    position: relative;
}

.console-line {
    display: block;
    margin-bottom: 2px;
}

.console-line span {
    color: var(--accent-red);
}

.console-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at bottom right, rgba(192,22,31,0.25), transparent 60%);
    pointer-events: none;
}

/* 3D‑печать / кольца */

.hero-3d {
    position: relative;
    background: radial-gradient(circle at center, #2a0a0d 0, #050608 70%);
    border-radius: 12px;
    border: 1px solid #2b303b;
    padding: 14px;
    overflow: hidden;
}

.ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(192,22,31,0.6);
    box-shadow: var(--glow-red);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(60deg);
    opacity: 0.7;
}

.ring::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1px dashed rgba(201,163,74,0.7);
}

.ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border-top: 2px solid var(--accent-red);
    border-bottom: 2px solid transparent;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    animation: ringSpin 8s linear infinite;
}

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.seal {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #3a0f12 0, #050608 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-red);
}

.seal span {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.18em;
}

.hero-3d-caption {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}

.hero-3d-caption span {
    color: var(--accent-red);
}

/* Карточки разделов */

.sections {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.section-card {
    background: var(--bg-panel);
    border-radius: 12px;
    border: 1px solid #262a33;
    padding: 12px 12px 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.section-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(192,22,31,0.18), transparent 60%);
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 24px rgba(192,22,31,0.45);
    border-color: var(--accent-red);
    background: var(--bg-panel-alt);
}

.section-card:hover::before {
    opacity: 1;
}

.section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 6px;
}

.section-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.section-meta span {
    color: var(--accent-red);
}

.section-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.section-footer span {
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.section-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.section-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1dd15f;
    box-shadow: 0 0 8px rgba(29,209,95,0.8);
}
/* Правая колонка */

.right-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel {
    background: var(--bg-panel);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    padding: 14px 14px 12px;
    box-shadow: 0 0 24px rgba(0,0,0,0.7);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.panel-header span {
    color: var(--accent-red);
}

.panel-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Живой график */

.graph {
    margin-top: 8px;
    height: 120px;
    position: relative;
    overflow: hidden;
}

.graph-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.4;
}

.graph-line {
    position: absolute;
    left: 0;
    bottom: 10px;
    width: 200%;
    height: 80px;
    border-radius: 999px;
    border: 2px solid var(--accent-red);
    box-shadow: var(--glow-red);
    transform: translateX(-50%);
    animation: graphMove 12s linear infinite;
}

@keyframes graphMove {
    from { transform: translateX(-10%); }
    to { transform: translateX(-90%); }
}

.graph-pulse {
    position: absolute;
    right: 16px;
    bottom: 22px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 12px rgba(192,22,31,0.9);
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

.graph-legend {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* Диаграмма угроз */

.threat-panel {
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    padding: 16px 16px 14px;
    box-shadow: 0 0 26px rgba(0,0,0,0.8);
}

.threat-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 8px;
}

.threat-header span {
    color: var(--accent-red);
}

.threat-chart {
    position: relative;
    height: 180px;
    margin-top: 6px;
}

.threat-ring {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid var(--accent-red);
    box-shadow: var(--glow-red);
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: threatSpin 10s linear infinite;
}

@keyframes threatSpin {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

.threat-sector {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: conic-gradient(
        rgba(192,22,31,0.4) 0deg 60deg,
        transparent 60deg 360deg
    );
}

.threat-bars {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.threat-bar {
    width: 10px;
    height: 40px;
    background: var(--accent-red);
    box-shadow: var(--glow-red);
    animation: threatBars 1.6s ease-in-out infinite;
}

.threat-bar:nth-child(2) {
    animation-delay: 0.3s;
}

.threat-bar:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes threatBars {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.6); }
    100% { transform: scaleY(1); }
}

.threat-labels {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Терминал */

.terminal-panel {
    background: var(--bg-panel);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    padding: 14px 14px 12px;
    box-shadow: 0 0 24px rgba(0,0,0,0.7);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 10px;
}

.terminal-body {
    background: #0a0c10;
    border-radius: 8px;
    border: 1px solid #1a1d24;
    padding: 10px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    color: #c9d1e3;
    margin-bottom: 10px;
}

.terminal-line span {
    color: var(--accent-red);
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-prompt {
    font-family: "JetBrains Mono", monospace;
    color: var(--accent-red);
}

.terminal-input {
    flex: 1;
    background: #0a0c10;
    border: 1px solid #1a1d24;
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text-main);
    font-family: "JetBrains Mono", monospace;
}

.terminal-hint {
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
/* Страницы разделов */

.section-page {
    background: var(--bg-panel);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 24px 26px 26px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.section-header {
    margin-bottom: 20px;
}

.section-header-title {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.section-header-title span {
    color: var(--accent-red);
}

.section-header-sub {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.section-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.section-item {
    background: var(--bg-panel-alt);
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 14px 14px 12px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.section-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 24px rgba(192,22,31,0.45);
    border-color: var(--accent-red);
}

.section-item-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 6px;
}

.section-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* System Map */

.system-map-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    padding: 24px 32px 32px;
}

.system-map-panel {
    background: var(--bg-panel);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 24px 26px 26px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.system-map-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.system-map-title span {
    color: var(--accent-red);
}

.system-map-sub {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.map-scene {
    margin-top: 20px;
    height: 260px;
    position: relative;
    background: radial-gradient(circle at center, #2a0a0d 0, #050608 70%);
    border-radius: 16px;
    border: 1px solid #2b303b;
    overflow: hidden;
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
}

.map-node {
    position: absolute;
    width: 60px;
    height: 60px;
    transform-style: preserve-3d;
    animation: nodeSpin 8s linear infinite;
}

@keyframes nodeSpin {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.map-face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(192,22,31,0.2);
    border: 1px solid var(--accent-red);
}

.map-face.front  { transform: translateZ(30px); }
.map-face.back   { transform: rotateY(180deg) translateZ(30px); }
.map-face.right  { transform: rotateY(90deg) translateZ(30px); }
.map-face.left   { transform: rotateY(-90deg) translateZ(30px); }
.map-face.top    { transform: rotateX(90deg) translateZ(30px); }
.map-face.bottom { transform: rotateX(-90deg) translateZ(30px); }

.map-node-label {
    position: absolute;
    top: 70px;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* Node positions */

.node-terra {
    top: 40px;
    left: 60px;
}

.node-mars {
    top: 120px;
    left: 160px;
}

.node-ophelia {
    top: 60px;
    left: 260px;
}

.system-map-legend {
    margin-top: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.system-map-legend span {
    color: var(--accent-red);
}

/* Footer */

footer {
    border-top: 1px solid var(--border-soft);
    background: #050608;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* Login Page */

.login-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px;
}

.login-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 32px 36px;
    width: 380px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    text-align: center;
}

.login-header h1 {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-top: 12px;
}

.login-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.16em;
    margin-top: 4px;
}

.login-seal {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    background: radial-gradient(circle, #3a0f12 0, #050608 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-red);
}

.login-seal span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.18em;
}

.login-form {
    margin-top: 24px;
    text-align: left;
}

.login-form label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.login-form input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #0a0c10;
    border: 1px solid #1a1d24;
    border-radius: 6px;
    color: var(--text-main);
    font-family: "JetBrains Mono", monospace;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-red);
    border: none;
    border-radius: 6px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    background: #e01c26;
    box-shadow: var(--glow-red);
}

.login-hint {
    margin-top: 14px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.14em;
}

/* Gothic Animated Headings */
.gothic {
    font-family: 'IM Fell English SC', serif;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    text-shadow:
        0 0 6px rgba(201,163,74,0.6),
        0 0 12px rgba(201,163,74,0.4),
        0 0 24px rgba(201,163,74,0.2);
    animation: gothicGlow 4s ease-in-out infinite;
}

@keyframes gothicGlow {
    0% {
        text-shadow:
            0 0 4px rgba(201,163,74,0.4),
            0 0 10px rgba(201,163,74,0.3),
            0 0 18px rgba(201,163,74,0.2);
        transform: scale(1);
    }
    50% {
        text-shadow:
            0 0 10px rgba(255,215,120,0.8),
            0 0 20px rgba(255,215,120,0.6),
            0 0 40px rgba(255,215,120,0.4);
        transform: scale(1.03);
    }
    100% {
        text-shadow:
            0 0 4px rgba(201,163,74,0.4),
            0 0 10px rgba(201,163,74,0.3),
            0 0 18px rgba(201,163,74,0.2);
        transform: scale(1);
    }
}

.gothic-animated {
    position: relative;
    display: inline-block;
    color: var(--accent-gold);
    text-shadow:
        0 0 6px rgba(201,163,74,0.6),
        0 0 14px rgba(201,163,74,0.4),
        0 0 26px rgba(201,163,74,0.2);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    animation:
        gothicFadeIn 1.6s ease-out forwards,
        gothicHoloShift 6s linear infinite 1.6s;
}

/* Появление из тьмы */
@keyframes gothicFadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.94);
        text-shadow: none;
    }
    40% {
        opacity: 0.4;
        transform: translateY(4px) scale(0.98);
        text-shadow:
            0 0 4px rgba(201,163,74,0.3),
            0 0 10px rgba(201,163,74,0.2);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        text-shadow:
            0 0 6px rgba(201,163,74,0.6),
            0 0 14px rgba(201,163,74,0.4),
            0 0 26px rgba(201,163,74,0.2);
    }
}

/* Голографический перелив золота */
@keyframes gothicHoloShift {
    0% {
        color: #c9a34a;
        text-shadow:
            0 0 6px rgba(201,163,74,0.6),
            0 0 14px rgba(201,163,74,0.4),
            0 0 26px rgba(201,163,74,0.2);
    }
    25% {
        color: #ffd778;
        text-shadow:
            0 0 10px rgba(255,215,120,0.8),
            0 0 22px rgba(255,215,120,0.6),
            0 0 40px rgba(255,215,120,0.4);
    }
    50% {
        color: #e3c05f;
        text-shadow:
            0 0 8px rgba(227,192,95,0.7),
            0 0 18px rgba(227,192,95,0.5),
            0 0 32px rgba(227,192,95,0.3);
    }
    75% {
        color: #f5e3a0;
        text-shadow:
            0 0 12px rgba(245,227,160,0.9),
            0 0 26px rgba(245,227,160,0.7),
            0 0 46px rgba(245,227,160,0.5);
    }
    100% {
        color: #c9a34a;
        text-shadow:
            0 0 6px rgba(201,163,74,0.6),
            0 0 14px rgba(201,163,74,0.4),
            0 0 26px rgba(201,163,74,0.2);
    }
}

/* Адаптив */

@media (max-width: 1100px) {
    main {
        grid-template-columns: 1fr;
    }
    .system-map-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    nav {
        flex-wrap: wrap;
        gap: 12px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .sections {
        grid-template-columns: 1fr;
    }
    .section-grid {
        grid-template-columns: 1fr;
    }
}
