/* === Сброс и базовые настройки === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #d35400;
    --primary-light: #e67e22;
    --secondary: #f39c12;
    --success: #27ae60;
    --info: #3498db;
    --danger: #e74c3c;
    --dark-bg: #0a0a0f;
    --card-bg: rgba(25, 25, 35, 0.85);
    --text: #ecf0f1;
    --text-muted: #95a5a6;
    --border: #333;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Шрифты === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;500;700&display=swap');

/* === Общие компоненты === */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--secondary);
}

a {
    color: var(--info);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--success);
    color: white;
}

.btn-primary:hover {
    background: #219653;
    text-decoration: none;
}

.btn-secondary {
    background: var(--info);
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
    text-decoration: none;
}

.btn-donate {
    background: var(--primary-light);
    color: white;
}

.btn-donate:hover {
    background: var(--primary);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    text-decoration: none;
}

/* === Шапка === */
.site-header {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(4px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.logo-sub {
    font-size: 1.2rem;
    color: var(--secondary);
    font-weight: 500;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav .active-link {
    color: var(--secondary);
}

/* Мобильное меню */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(6px);
    padding: 15px 0;
    border-top: 1px solid var(--border);
    z-index: 999;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 8px 20px;
    width: 100%;
    text-align: center;
}

.mobile-menu a:hover {
    color: var(--secondary);
    background: rgba(52, 73, 94, 0.3);
}

/* === Главная страница === */
.home {
    background: url('../img/bg.jpg') center/cover no-repeat fixed;
    color: var(--text);
}

.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.ip-box {
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 1.2rem;
}

.ip-box .label {
    color: var(--secondary);
    margin-right: 10px;
}

.spawn-note {
    color: var(--danger);
    font-weight: bold;
    margin-top: 10px;
    font-size: 1.1rem;
}

.cta-buttons {
    margin-top: 30px;
}

/* === Общие секции === */
.lore-section, .how-to-join, .rules-page, .news-page, .donate-page {
    padding: 60px 20px;
    background: var(--card-bg);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--secondary);
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* === Правила === */
.rules-page .rule-section {
    background: rgba(30, 30, 40, 0.6);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid var(--secondary);
}

.rules-page .rule-section h2 {
    color: var(--secondary);
    margin-top: 0;
    font-size: 1.8rem;
}

.rules-page .rule-section h3 {
    color: var(--success);
    margin: 20px 0 15px;
}

.rules-page .rule-section ul {
    padding-left: 20px;
    line-height: 1.7;
}

.rules-page .rule-section li {
    margin-bottom: 10px;
}

.rules-page .rule-section li strong {
    color: var(--secondary);
}

.faction-list {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.note, .final-note {
    background: rgba(231, 76, 60, 0.15);
    border-left: 4px solid var(--danger);
    padding: 15px;
    border-radius: 0 6px 6px 0;
    margin-top: 15px;
}

.rules-footer-note {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-style: italic;
}

code {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* === Новости === */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-preview {
    background: rgba(30, 30, 35, 0.7);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s;
}

.news-preview:hover {
    transform: translateY(-3px);
}

.news-preview-meta time {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.news-preview h2 {
    margin: 12px 0;
    font-size: 1.6rem;
}

.news-preview h2 a {
    color: var(--secondary);
    text-decoration: none;
}

.news-preview h2 a:hover {
    text-decoration: underline;
}

.news-preview-text {
    color: var(--text);
    line-height: 1.6;
    margin: 15px 0;
}

.read-more {
    display: inline-block;
    color: var(--info);
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
}

.read-more:hover {
    text-decoration: underline;
}

.news-single {
    background: rgba(20, 20, 25, 0.85);
    border-radius: 10px;
    padding: 30px;
    margin-top: 20px;
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: var(--info);
}

.no-news {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* === Донат === */
.donate-content {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 25px;
    color: #eee;
    line-height: 1.6;
}

.donate-content h2, .donate-content h3 {
    color: var(--secondary);
}

.donate-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-light);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.donate-btn:hover {
    background: var(--primary);
    text-decoration: none;
}

/* === Как зайти === */
.how-to-join ol.steps {
    counter-reset: step-counter;
    list-style: none;
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.how-to-join ol.steps li {
    position: relative;
    padding-left: 60px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.how-to-join ol.steps li:before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #2c3e50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.warning-box {
    background: rgba(231, 76, 60, 0.15);
    border-left: 4px solid var(--danger);
    padding: 15px;
    margin-top: 30px;
    border-radius: 0 6px 6px 0;
}

/* === Футер === */
.site-footer {
    background: rgba(10, 10, 15, 0.95);
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.site-footer .container {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === Админка === */
.admin-page h1,
.admin-news h1,
.admin-dashboard h1 {
    color: var(--secondary);
    margin-bottom: 20px;
}

.alert {
    padding: 12px;
    margin: 20px 0;
    border-radius: 6px;
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.alert-error {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
    border: 1px solid #c0392b;
}

/* === Адаптив === */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .btn {
        display: block;
        margin: 10px auto;
        width: 90%;
    }

    .ip-box {
        padding: 10px;
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .steps li {
        padding-left: 50px;
    }

    .steps li:before {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

/* === Прочее === */
main {
    flex: 1;
}