/* ПОДКЛЮЧЕНИЕ ШРИФТА */
@font-face {
    font-family: 'Make Things';
    src: url('MakeThings.ttf');
}

/* ПЛАВНОЕ ЛИСТАНИЕ */
html {
    scroll-behavior: smooth;
}

/* Переменные темы — Белая по умолчанию */
:root {
    --bg-color: #faf6fc; 
    --text-main: #2a1933;
    --text-sub: #6c5678;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --card-bg: #ffffff;
    --card-border: rgba(156, 93, 181, 0.18);
    --modal-bg: #ffffff; 
    --btn-bg: linear-gradient(90deg, #ebd0f7, #532463, #ebd0f7);
    --bg-opacity: 0.15;
    --code-bg: rgba(156, 93, 181, 0.12);
    --accent-color: #9c5db5; 
    --danger-color: #ff5572;
    /* Картинка для белой темы */
    --bg-image: url('https://i.ibb.co/KpDx0rv3/Gemini-Generated-Image-s5ophds5ophds5op.png');
}

/* Темная тема активируется при клике */
body.dark-theme {
    --bg-color: #1a111f; 
    --text-main: #ffffff;
    --text-sub: #dccce3; 
    --nav-bg: rgba(36, 23, 43, 0.96); 
    --card-bg: rgba(156, 93, 181, 0.05); 
    --card-border: rgba(156, 93, 181, 0.25); 
    --modal-bg: rgba(30, 19, 36, 0.99); 
    --btn-bg: linear-gradient(90deg, #743e8a, #e9beff, #743e8a); 
    --bg-opacity: 0.3; 
    --code-bg: rgba(0, 0, 0, 0.45);
    /* Старая картинка для темной темы */
    --bg-image: url('https://i.ibb.co/Mqyw29G/Gemini-Generated-Image-z96nrgz96nrgz96n-1-1.png');
}

/* Базовые стили */
body {
    margin: 0; padding: 0;
    font-family: 'Make Things', 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex; flex-direction: column; 
    align-items: center; min-height: 100vh; 
    position: relative; overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    
    /* ПИКСЕЛЬНЫЙ КУРСОР ПО УМОЛЧАНИЮ */
    cursor: url('https://cur.cursors-4u.net/games/gam-4/gam384.png'), default;
}

/* ПИКСЕЛЬНЫЙ КУРСОР ДЛЯ КЛИКАБЕЛЬНЫХ ЭЛЕМЕНТОВ */
a, button, .discord-circle-btn, .modal-close-x, .theme-toggle {
    cursor: url('https://cur.cursors-4u.net/games/gam-4/gam383.png'), pointer !important;
}

body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--bg-image);
    background-size: cover; background-position: center; 
    opacity: var(--bg-opacity); z-index: -1;
    transition: opacity 0.4s ease, background-image 0.4s ease;
}

.main-wrapper { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; width: 100%; }

/* Навигация */
.navbar {
    margin-top: 15px; width: auto; min-width: 1000px; max-width: 95%;
    background-color: var(--nav-bg); padding: 10px 25px; border-radius: 40px; 
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15), 0 0 25px rgba(156, 93, 181, 0.08);
    border: 1px solid var(--card-border);
    transition: background-color 0.4s ease;
}
body.dark-theme .navbar {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(156, 93, 181, 0.15);
}

.logo-container { display: flex; align-items: center; gap: 12px; }

.logo-img { 
    height: 38px; 
    width: 38px; 
    object-fit: cover; 
    border-radius: 50%; 
    border: 1px solid var(--card-border);
}

.nav-rules-btn {
    background: rgba(156, 93, 181, 0.12);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 6px 16px; border-radius: 20px;
    font-family: 'Make Things', sans-serif;
    font-weight: 700; font-size: 0.85rem; transition: 0.3s;
    margin: 0 5px;
}
.nav-rules-btn:hover { background: rgba(156, 93, 181, 0.28); transform: scale(1.05); }

.theme-toggle {
    background: rgba(156, 93, 181, 0.12);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s; margin-left: 5px;
}
.theme-toggle:hover { transform: scale(1.1); background: rgba(156, 93, 181, 0.28); }

/* Анимация сияния текста */
.shiny-text {
    background: linear-gradient(90deg, #532463, #9c5db5, #532463);
    background-size: 200% auto; color: transparent;
    -webkit-background-clip: text; background-clip: text;
    animation: shine 4s linear infinite;
}
body.dark-theme .shiny-text {
    background: linear-gradient(90deg, #9c5db5, #ffffff, #9c5db5);
    -webkit-background-clip: text; background-clip: text;
}
@keyframes shine { to { background-position: 200% center; } }

.brand-name { font-size: 1.3rem; font-weight: 700; }

.discord-circle-btn {
    display: flex; align-items: center; justify-content: center;
    background-color: var(--accent-color); width: 40px; height: 40px; border-radius: 50%;
    transition: 0.2s; border: none;
    box-shadow: 0 0 14px rgba(156, 93, 181, 0.45);
}
.discord-circle-btn:hover { transform: scale(1.1); background-color: #b376cc; }
.discord-svg { width: 22px; height: 22px; fill: white; }

/* Контент */
.content { margin-top: 60px; text-align: center; }
.hero-title { font-size: 3.5rem; font-weight: 800; margin: 0; letter-spacing: 4px; }
.hero-subtitle { font-size: 1.5rem; font-weight: 700; margin-top: 5px; }
.hero-description { font-size: 1rem; font-weight: 500; margin-top: 15px; max-width: 600px; }

.shiny-btn {
    background: var(--btn-bg); background-size: 200% auto;
    color: var(--bg-color) !important; border: none;
    padding: 12px 40px; font-size: 1.1rem; font-weight: 800;
    border-radius: 50px; transition: 0.3s;
    animation: shine 4s linear infinite;
    box-shadow: 0 5px 22px rgba(156, 93, 181, 0.25);
}
body.dark-theme .shiny-btn {
    box-shadow: 0 5px 22px rgba(156, 93, 181, 0.35);
}
.start-btn { margin-top: 30px; }

/* Статус сервера */
.status-container { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 30px; }
.status-indicator { position: relative; width: 12px; height: 12px; display: flex; align-items: center; justify-content: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; z-index: 2; }
.pulse { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: #2ecc71; animation: p 2s infinite; z-index: 1; }
@keyframes p { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(3.5); opacity: 0; } }

/* Сетка карточек */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px; width: 100%; max-width: 1000px; margin: 60px auto 40px; padding: 0 20px;
}
.feature-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 20px; padding: 25px; transition: 0.3s;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}
body.dark-theme .feature-card {
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 8px 28px rgba(156, 93, 181, 0.22); }
.feature-icon {
    font-size: 26px; color: var(--accent-color); margin-bottom: 15px;
    width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
    background: rgba(156, 93, 181, 0.18); border-radius: 12px;
}
.feature-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px 0; color: var(--text-main); }
.feature-text { font-size: 0.85rem; color: var(--text-sub); line-height: 1.5; }

/* Футер */
.footer { flex-shrink: 0; width: 100%; padding: 10px 0 15px 0; text-align: center; }
.footer-text { font-size: 0.85rem; font-weight: 600; opacity: 0.7; }

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 9, 18, 0.4); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; backdrop-filter: blur(0px);
    transition: all 0.4s ease;
}
body.dark-theme .modal-overlay { background: rgba(15, 9, 18, 0.88); }
.modal-overlay.active { opacity: 1; visibility: visible; backdrop-filter: blur(10px); }

.modal-content {
    background: var(--modal-bg);
    width: 440px; padding: 40px; border-radius: 35px; position: relative; 
    box-shadow: 0 30px 65px rgba(0,0,0,0.15), 0 0 45px rgba(156, 93, 181, 0.05);
    border: 1px solid var(--card-border);
    transform: translateY(20px) scale(0.95); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease;
    color: var(--text-main);
}
body.dark-theme .modal-content {
    box-shadow: 0 30px 65px rgba(0,0,0,0.55), 0 0 45px rgba(156, 93, 181, 0.12);
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

.modal-close-x {
    position: absolute; top: 20px; right: 20px;
    background: rgba(156, 93, 181, 0.12); border: 1px solid var(--card-border); 
    color: var(--text-main); width: 34px; height: 34px; border-radius: 50%;
    font-size: 18px; display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.modal-close-x:hover { background: rgba(156, 93, 181, 0.28); }

.step-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; text-align: left; }
.step-badge {
    background: rgba(156, 93, 181, 0.18); color: var(--accent-color); width: 42px; height: 42px;
    border-radius: 14px; border: 1px solid var(--card-border); 
    display: flex; align-items: center; justify-content: center; font-weight: 900;
}
.step-title { margin: 0; font-weight: 700; color: var(--text-main); }
.step-desc { margin: 2px 0 0; font-size: 0.9rem; color: var(--text-sub); }
.code-box { background: var(--code-bg); padding: 3px 8px; border-radius: 6px; font-family: monospace; color: #743e8a; border: 1px solid rgba(156, 93, 181, 0.32); }
body.dark-theme .code-box { color: #ebbcfc; }

/* --- ПРАВИЛА И ПЕРСОНАЛ --- */
.rules-modal {
    max-width: 750px; width: 90%; max-height: 85vh;
    display: flex; flex-direction: column;
}

.rules-scroll-area {
    overflow-y: auto; padding-right: 10px; margin: 20px 0; text-align: left;
}

.rules-scroll-area::-webkit-scrollbar { width: 6px; }
.rules-scroll-area::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 10px; }

.rules-category {
    background: rgba(156, 93, 181, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 20px; padding: 20px; margin-bottom: 20px;
}

.rules-cat-header {
    font-size: 1.2rem; font-weight: 800; color: var(--text-main);
    margin-bottom: 15px; display: flex; align-items: center; gap: 10px;
}
.rules-cat-header i { color: var(--accent-color); }

.rule-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--card-border);
}
.rule-row:last-child { border-bottom: none; }

.rule-txt { font-size: 0.9rem; color: var(--text-sub); max-width: 75%; }

.rule-punish {
    font-size: 0.72rem; font-weight: 900;
    background: rgba(255, 77, 114, 0.18);
    color: var(--danger-color);
    padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}

/* ПЛАШКИ ПЕРСОНАЛА */
.staff-role-card {
    padding: 12px 18px; border-radius: 12px; margin-bottom: 10px;
    font-size: 0.85rem; color: #fff; line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.staff-role-card strong { font-weight: 800; text-transform: uppercase; margin-right: 5px; }

.role-tech { background: #130c17; border-color: var(--card-border); }
.role-admin { background: #ff5572; }
.role-tester { background: #f3da6b; color: #2a1933; }
.role-sponsor { background: linear-gradient(135deg, #9c5db5, #ec4899); }
.role-player { background: #564761; }

.staff-name {
    font-weight: 800; color: var(--text-main); background: rgba(156, 93, 181, 0.12);
    padding: 4px 12px; border-radius: 8px; font-family: monospace; font-size: 0.9rem;
    border: 1px solid rgba(156, 93, 181, 0.25);
}

.skins-highlight {
    border: 1px solid rgba(156, 93, 181, 0.65);
    box-shadow: inset 0 0 22px rgba(156, 93, 181, 0.08);
}
body.dark-theme .skins-highlight {
    box-shadow: inset 0 0 22px rgba(156, 93, 181, 0.18);
}

.info-category { background: rgba(156, 93, 181, 0.06); border-color: rgba(156, 93, 181, 0.35); }
.info-item { font-size: 0.85rem; color: var(--text-sub); margin: 8px 0; font-style: italic; }

/* Медиа-запросы */
@media (max-width: 1050px) { .navbar { min-width: 90%; } }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { 
    .features-grid { grid-template-columns: 1fr; } 
    .modal-content { width: 90%; padding: 20px; }
    .hero-title { font-size: 2.5rem; }
    .rule-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .navbar { min-width: 95%; padding: 10px 15px; }
}
