* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Переменные для фонов. Значения по умолчанию — на случай,
   если JS ещё не успел выполниться. Реальные пути задаёт
   ui.js из CONFIG.images. */
:root {
    --bg-main: url('../img/bg_main.png');
    --bg-top:  url('../img/bg_top.png');
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #e8e8e8;

    /* ФОН — прямой путь, без переменных */
    background-image: url('../img/bg_main.png');
    background-repeat: repeat;
    background-position: 0 0;
    background-size: auto;
}

a { color: #fff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== ВЕРХНИЙ БАР ===== */
.top-bar {
    /* ФОН МЕНЮ — прямой путь */
    background-image: url('../img/bg_top.png');
    background-repeat: repeat;
    background-position: 0 0;
    background-size: auto;

/*    border-bottom: 3px solid #1a1208; */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.147);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 48px;              /* ← высота меню = высота картинки */
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo { display: flex; align-items: center; text-decoration: none !important; }
.logo img { display: block; filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.6)); max-height: 40px; }

.top-nav { display: flex; gap: 24px; }

.top-nav a {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.6);
}
.top-nav a.active { color: #f5a623; }

.login-link {
    margin-left: auto;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.6);
}

/* ===== КОНТЕЙНЕР ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; }

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

/* ===== ВИДЕО ===== */
.hero-video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid #000;
    overflow: hidden;
    margin-bottom: 24px;
}
.hero-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.achievement-float {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 80%;
    max-width: 560px;
    pointer-events: none;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(20, 20, 20, 0.92);
    border: 3px solid #555;
    border-top-color: #888;
    border-left-color: #888;
    border-radius: 6px;
    padding: 14px 22px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

.achievement-icon { font-size: 34px; }

.achievement-title {
    color: #ffff55;
    font-size: 22px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000;
    line-height: 1.2;
}
.achievement-sub {
    color: #fff;
    font-size: 22px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000;
    line-height: 1.2;
}

/* ===== ТЕКСТ ===== */
.intro { font-size: 16px; color: #d8d8d8; margin-bottom: 28px; }

.section-heading {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 32px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
}

.more-link {
    display: inline-block;
    margin-top: 12px;
    color: #f5a623;
    font-weight: bold;
    font-size: 15px;
}

.steps-list { margin: 12px 0 0 20px; color: #c8c8c8; }
.steps-list li { margin-bottom: 6px; }

code {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 2px 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #7ec850;
    border-radius: 2px;
}

/* ===== НОВОСТИ ===== */
.news-item {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #333;
}
.news-item:last-child { border-bottom: none; }
.news-item h3 { font-size: 18px; color: #fff; margin-bottom: 4px; }

.news-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.news-tag {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 1px 8px;
    border-radius: 2px;
    color: #f5a623;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-item p { color: #c8c8c8; }

.news-full-body {
    margin-top: 10px;
    color: #b8b8b8;
    font-size: 15px;
    line-height: 1.6;
}

.muted { color: #777; font-size: 14px; }

/* ===== ПРАВИЛА ===== */
.rules-list { margin: 12px 0 0 20px; color: #c8c8c8; }
.rules-list li { margin-bottom: 6px; }

.rules-detailed { margin: 0 0 0 24px; color: #c8c8c8; }
.rules-detailed li { margin-bottom: 10px; }

.rules-note {
    margin-top: 30px;
    padding: 14px 18px;
    background: #222;
    border-left: 4px solid #f5a623;
    color: #b8b8b8;
    font-size: 15px;
    font-style: italic;
}

/* ===== САЙДБАР ===== */
.sidebar { font-size: 15px; }
.sidebar-hero { text-align: center; margin-bottom: 20px; }

.sidebar-art {
    display: block;
    margin: 0 auto 8px;
    image-rendering: pixelated;
    max-width: 100%;
    height: auto;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 14px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.btn-orange {
    display: inline-block;
    background: #f5a623;
    color: #1a1a1a !important;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 28px;
    border: 2px solid #b8781a;
    border-radius: 3px;
    box-shadow: 0 2px 0 #8a5810;
    text-shadow: none;
    text-decoration: none !important;
    transition: all 0.1s;
}
.btn-orange:hover { background: #ffb733; }
.btn-orange:active { box-shadow: 0 0 0 #8a5810; transform: translateY(2px); }

.dashed { border: none; border-top: 1px dashed #444; margin: 20px 0; }

.server-info { color: #d8d8d8; }
.server-info strong { color: #fff; }
.version-tag { color: #888; font-size: 14px; }

.copy-btn {
    margin-top: 10px;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 2px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.copy-btn:hover { background: #3a3a3a; border-color: #777; }
.copy-btn:active { transform: translateY(1px); }

.status-block { display: flex; align-items: flex-start; gap: 12px; }

.status-dot {
    width: 10px;
    height: 10px;
    background: #888;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
}
.status-dot.online  { background: #5dff5d; box-shadow: 0 0 8px #5dff5d; animation: pulse 2s infinite; }
.status-dot.offline { background: #ff5555; box-shadow: 0 0 8px #ff5555; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-line { color: #d8d8d8; line-height: 1.4; }
.status-line.muted { color: #777; font-size: 13px; }

.sidebar-links { display: flex; flex-direction: column; gap: 8px; }
.sidebar-links a { color: #d8d8d8; font-size: 15px; padding: 4px 0; }
.sidebar-links a:hover { color: #fff; }

/* ===== ФУТЕР ===== */
.footer {
    border-top: 1px solid #2a2a2a;
    margin-top: 40px;
    padding: 24px 20px;
    text-align: center;
    font-size: 14px;
    color: #888;
    background: #141414;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer .muted { color: #555; font-size: 13px; margin-top: 4px; }

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #2a2a2a;
    color: #fff;
    padding: 12px 24px;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 15px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 40px; }
    .top-bar-inner { gap: 16px; height: auto; padding: 12px 20px; flex-wrap: wrap; }
    .top-nav { gap: 16px; flex-wrap: wrap; }
    .login-link { width: 100%; }
    .achievement { padding: 10px 14px; }
    .achievement-title, .achievement-sub { font-size: 16px; }
    .achievement-float { width: 90%; top: 10px; }
    .page-title { font-size: 22px; }
}