:root {
    --primary-color: #f24941;
    --primary-hover-color: #d93a34;
    --text-color: #ffffff;
    --bg-color: #121212;
    --secondary-bg-color: #1e1e1e;
    --navbar-height: 70px;
    --font-family: 'Montserrat', sans-serif;
    --transition-speed: 0.3s;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Скроллбар */
html { scrollbar-width: thin; scrollbar-color: var(--primary-color) var(--bg-color); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 5px; border: 2px solid var(--bg-color); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-hover-color); }

/* --- Шапка --- */
.main-header {
    background-color: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.main-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    justify-self: start;
}
.logo img { height: 40px; width: auto; }
.logo span { color: var(--primary-color); }

.desktop-nav { display: flex; gap: 30px; }
.nav-link {
    color: #b0b0b0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: var(--transition-speed);
    position: relative;
    padding: 5px 0;
}
.nav-link:hover, .nav-link.active { color: var(--text-color); }
.nav-link::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
    background-color: var(--primary-color); transition: var(--transition-speed);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-right { display: flex; justify-content: flex-end; align-items: center; gap: 15px; }

/* Кнопки */
.btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    font-family: var(--font-family);
}
.btn-primary { background: var(--primary-color); color: white; box-shadow: 0 4px 15px rgba(242, 73, 65, 0.3); }
.btn-primary:hover { background: var(--primary-hover-color); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(242, 73, 65, 0.4); }
.btn-secondary { background: transparent; border: 2px solid rgba(255,255,255,0.2); color: white; }
.btn-secondary:hover { border-color: white; background: rgba(255,255,255,0.05); }

/* Мобильное меню */
.mobile-menu-overlay {
    position: fixed; top: var(--navbar-height); left: 0; width: 100%; height: 0;
    background: var(--secondary-bg-color); overflow: hidden; transition: 0.3s ease;
    z-index: 999; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.mobile-menu-overlay.active { height: auto; padding: 30px 0; border-bottom: 2px solid var(--primary-color); }
.mobile-nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; }

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-nav-toggle { display: block; }
    .main-header .container { display: flex; justify-content: space-between; }
    .header-right .btn { display: none; }
}

/* --- Hero Section --- */
.hero-section {
    height: 85vh;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: linear-gradient(rgba(18,18,18,0.6), rgba(18,18,18,0.7)), url('https://img.freepik.com/free-photo/view-futuristic-scenery-with-city-lights_23-2151574044.jpg');
    background-size: cover; background-position: center;
}
.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    line-height: 1.1; 
}
.hero-content h1 span { color: var(--primary-color); }
.hero-content p { font-size: 1.25rem; color: #cccccc; max-width: 700px; margin: 0 auto 40px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* --- МОДАЛЬНЫЕ ОКНА (Общее) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 2000;
    display: none; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }

.modal-window {
    background: var(--secondary-bg-color);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: translateY(20px); transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal-window { transform: translateY(0); }

.modal-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: #777; font-size: 1.5rem; cursor: pointer;
    z-index: 10;
}
.modal-close:hover { color: var(--primary-color); }

/* Play Modal specific */
.server-info { margin-top: 20px; }
.server-ver { color: #888; margin-bottom: 10px; font-size: 0.9rem; }
.server-ip-box {
    background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px;
    border: 1px solid var(--primary-color); cursor: pointer;
    transition: 0.2s; position: relative;
}
.server-ip-box:hover { background: rgba(242, 73, 65, 0.1); }
.server-ip { font-size: 1.2rem; font-weight: 700; color: white; letter-spacing: 1px; }
.copy-hint { display: block; font-size: 0.75rem; color: var(--primary-color); margin-top: 5px; text-transform: uppercase; font-weight: 600; }

/* --- ОКНО АВТОРИЗАЦИИ (AUTH MODAL) --- */
.auth-window {
    padding: 0;
    max-width: 700px;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 400px;
}

/* Левая часть со скином */
.auth-visual {
    width: 40%;
    background: linear-gradient(135deg, var(--secondary-bg-color) 0%, #2a2a2a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 20px;
}

.skin-preview img {
    height: 180px; 
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transition: 0.3s ease;
}

.auth-welcome {
    margin-top: 20px;
    color: #888;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.auth-welcome span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
}

/* Правая часть с формой */
.auth-form-box {
    width: 60%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.auth-form-box h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: white;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: 0.3s;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: white;
    font-family: var(--font-family);
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: rgba(0,0,0,0.4);
}

.input-group input:focus + i {
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

.auth-switch {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #888;
    text-align: center;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* Адаптив авторизации */
@media (max-width: 600px) {
    .auth-window { flex-direction: column; height: auto; overflow-y: auto; max-height: 90vh; }
    .auth-container { flex-direction: column; }
    .auth-visual { width: 100%; height: auto; padding: 20px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .skin-preview img { height: 100px; }
    .auth-form-box { width: 100%; padding: 25px; }
}

/* --- Features & Footer --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.features-section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 60px; font-weight: 800; }
.section-title span { color: var(--primary-color); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-card { background: var(--secondary-bg-color); padding: 40px 30px; border-radius: 12px; text-align: center; transition: 0.3s; border: 1px solid rgba(255,255,255,0.05); }
.feature-card:hover { transform: translateY(-10px); border-color: var(--primary-color); }
.feature-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 25px; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; }
.feature-card p { color: #999; }

/* Правила (Rules Page) */
.rules-section { padding: 60px 0; }
.rules-content { background: var(--secondary-bg-color); padding: 50px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.rules-content h1 { text-align: center; font-size: 3rem; margin-bottom: 50px; color: var(--primary-color); }
.rules-content h2 { font-size: 1.8rem; margin: 40px 0 20px; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.rules-alert { background: rgba(242, 73, 65, 0.08); border-left: 5px solid var(--primary-color); padding: 25px; border-radius: 8px; margin-bottom: 30px; display: flex; gap: 20px; align-items: flex-start; }
.rules-alert i { font-size: 2rem; color: var(--primary-color); margin-top: 5px; }
.rules-alert-content h3 { margin-bottom: 10px; font-size: 1.2rem; color: var(--primary-color); text-transform: uppercase; font-weight: 800; }
.rules-alert-content p { font-size: 1rem; color: #e0e0e0; margin-bottom: 10px; }
.rules-alert-footer { font-weight: 700; color: white; margin-top: 10px; display: block; font-size: 1.05rem; }
.rules-list { list-style: none; counter-reset: item; }
.rules-list li { position: relative; padding-left: 40px; margin-bottom: 15px; }
.rules-list li::before { content: counter(item) "."; counter-increment: item; position: absolute; left: 0; color: var(--primary-color); font-weight: 800; }
.rule-forbidden { color: var(--primary-color); font-weight: 700; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; background: rgba(0,0,0,0.2); }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
th { background: rgba(242, 73, 65, 0.2); color: var(--primary-color); }

footer { background: var(--secondary-bg-color); padding: 30px 0; text-align: center; margin-top: auto; border-top: 1px solid rgba(255,255,255,0.05); }

/* =========================================
   СТИЛИ ЛИЧНОГО КАБИНЕТА (Добавить в конец)
   ========================================= */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-color);
}

/* Сайдбар (Меню слева) */
.sidebar {
    width: 260px;
    background: var(--secondary-bg-color);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.nav-item {
    color: #888;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(242, 73, 65, 0.1);
    color: var(--primary-color);
}

.nav-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #ff4b4b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.logout-btn:hover { background: rgba(255, 75, 75, 0.1); border-color: #ff4b4b; }

/* Основная часть */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 40px;
}

.top-bar {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 20px;
}

/* Переключение секций */
.dashboard-section {
    display: none;
    animation: fadeIn 0.4s ease;
}
.dashboard-section.active {
    display: block;
}

/* Карточка профиля */
.profile-card-large {
    background: var(--secondary-bg-color);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 50px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-visual img {
    height: 250px;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

.profile-details h1 { font-size: 3rem; margin-bottom: 10px; line-height: 1; color: white; }

.badges { display: flex; gap: 10px; margin-bottom: 30px; }
.badge { 
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 6px; 
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase; line-height: 1;
}
.role-player { background: rgba(255,255,255,0.1); color: #ccc; }
.status-verified { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }

.stats-row { display: flex; gap: 40px; margin-bottom: 30px; }
.stat-box { display: flex; flex-direction: column; }
.stat-label { font-size: 0.9rem; color: #888; margin-bottom: 5px; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: white; }

/* БАНКОВСКАЯ КАРТА */
.bank-card-wrapper {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%;
    max-width: 450px;
}

.bank-card-wrapper::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(242, 73, 65, 0.4) 0%, rgba(0,0,0,0) 70%); z-index: 0;
}
.card-content { position: relative; z-index: 1; }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.card-chip { width: 50px; height: 35px; background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%); border-radius: 6px; position: relative; }
.bank-logo { font-weight: 900; font-style: italic; font-size: 1.2rem; color: var(--primary-color); text-transform: uppercase; }

.card-balance-label { font-size: 0.85rem; color: #aaa; text-transform: uppercase; letter-spacing: 2px; }
.card-balance-value { font-size: 2.5rem; font-weight: 800; margin: 5px 0 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.card-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.card-holder-label { font-size: 0.7rem; color: #888; text-transform: uppercase; }
.card-holder-name { font-size: 1.1rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;}

/* ИСТОРИЯ ТРАНЗАКЦИЙ */
.history-list { margin-top: 20px; }
.history-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.03); padding: 15px 20px;
    border-radius: 8px; margin-bottom: 10px; border-left: 3px solid transparent; transition: 0.2s;
}
.history-item:hover { background: rgba(255,255,255,0.06); }
.history-item.income { border-left-color: #2ecc71; }
.history-item.outcome { border-left-color: #f24941; }

.h-left { display: flex; align-items: center; gap: 15px; }
.h-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; }
.income .h-icon { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.outcome .h-icon { background: rgba(242, 73, 65, 0.1); color: #f24941; }

.h-details h4 { font-size: 0.95rem; color: white; margin-bottom: 2px; }
.h-details span { font-size: 0.8rem; color: #888; }
.h-amount { font-weight: 700; font-size: 1rem; }
.income .h-amount { color: #2ecc71; }
.outcome .h-amount { color: #f24941; }

/* АДАПТИВ */
@media (max-width: 900px) {
    .sidebar { display: none; } /* Можно потом добавить мобильное меню */
    .main-content { margin-left: 0; padding: 20px; }
    .profile-card-large { flex-direction: column; text-align: center; gap: 20px; }
    .stats-row { justify-content: center; }
}

/* Модальные окна сообщений */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.message-window {
    max-width: 400px;
    text-align: center;
    padding: 30px 20px;
    background: var(--secondary-bg-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.message-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.message-success { color: #2ecc71; }
.message-error { color: var(--primary-color); }

#messageTitle {
    margin: 15px 0;
    font-size: 1.4rem;
    color: white;
}

#messageText {
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.5;
}
