:root {
    --primary-color: #f24941;
    --primary-hover-color: #d93a34;
    --admin-role-color: #e74c3c;
    --judge-role-color: #3498db; 
    --president-role-color: #f1c40f; 
    --dark-bg: #131316;
    --light-bg: #1e1e24;
    --border-color: #303038;
    --text-color: #e5e5e5;
    --text-muted-color: #8c8c9a;
    --font-family: 'Montserrat', sans-serif;
    --transition-speed: 0.3s;
    --border-radius: 12px;
}

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

html { 
    scroll-behavior: smooth; 
    scrollbar-gutter: stable;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--primary-color); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* === HEADER === */
.main-header {
    background: rgba(30, 30, 36, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    position: relative; 
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img { height: 28px; margin-right: 10px; }
.nav-wrapper { display: flex; align-items: center; }
.main-nav {
    display: flex;
    gap: 30px;
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
}

.nav-link {
    color: var(--text-muted-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.nav-link.active, .nav-link:hover { color: white; }
.auth-section { display: flex; align-items: center; gap: 20px; }

.user-info { display: flex; align-items: center; cursor: pointer; position: relative; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--primary-color); margin-left: 10px; }
.dropdown-menu { display: none; position: absolute; top: 55px; right: 0; background: var(--light-bg); border-radius: var(--border-radius); overflow: hidden; min-width: 200px; border: 1px solid var(--border-color); box-shadow: 0 8px 25px rgba(0,0,0,0.3); z-index: 1001;}
.dropdown-item { display: flex; align-items: center; padding: 12px 15px; color: var(--text-color); text-decoration: none; transition: background-color 0.2s ease; }
.dropdown-item i { margin-right: 10px; }
.dropdown-item:hover, .dropdown-item.active { background-color: var(--primary-color); }

.mobile-nav-toggle {
    display: none; 
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* === HERO & LANDING === */
.hero-section, .server-info-section { position: relative; overflow: hidden; padding: 60px 0; }
.hero-background { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19, 19, 22, 0.8) 0%, var(--dark-bg) 100%); z-index: -1; }
.server-info-section .hero-background { background: var(--dark-bg); }
.hero-landing { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 80px; box-sizing: border-box; }
.hero-landing .hero-title { font-size: 72px; font-weight: 800; margin: 0 0 15px 0; }
.hero-landing .hero-subtitle { font-size: 22px; margin-bottom: 40px; }
.hero-landing .hero-main-button { margin-top: 0; margin-bottom: 0; }
.scroll-down-arrow { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 28px; color: rgba(255, 255, 255, 0.3); animation: bounce 2s infinite; transition: color 0.3s ease; z-index: 10; }
.scroll-down-arrow:hover { color: rgba(255, 255, 255, 0.7); }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-10px); } 60% { transform: translateX(-50%) translateY(-5px); } }

/* === SERVER INFO === */
.server-info-section { padding-top: 80px; padding-bottom: 80px; }
.server-info-section .container { max-width: 1000px; position: relative; z-index: 2; }
.section-title { text-align: center; font-size: 36px; font-weight: 700; margin-bottom: 40px; color: var(--text-color); }
.server-info-section .hero-details-wrapper { margin-bottom: 60px; }
.server-info-section .hero-description { font-size: 18px; color: var(--text-muted-color); max-width: 700px; margin: 0 auto 50px auto; text-align: center; }
.server-info-section .hero-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; max-width: 1000px; margin: 0 auto; }
.server-info-section .feature-item { background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 25px; text-align: center; transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease; }
.server-info-section .feature-item:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.server-info-section .feature-icon { font-size: 36px; color: var(--primary-color); margin-bottom: 15px; display: inline-block; }
.server-info-section .feature-item h3 { font-size: 20px; font-weight: 600; color: var(--text-color); margin: 0 0 10px 0; }
.server-info-section .feature-item p { font-size: 14px; color: var(--text-muted-color); margin: 0; line-height: 1.5; }
.server-info-section .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: 1000px; margin: 0 auto; margin-bottom: 60px; }
.server-info-section .stat { text-align: center; }
.server-info-section .stat-number { font-size: 32px; font-weight: 700; margin-bottom: 5px; word-break: break-all; }
.server-info-section .stat-number.ip-address { font-size: 18px; font-weight: 500; font-family: 'Courier New', Courier, monospace; color: var(--text-muted-color); cursor: pointer; transition: color 0.2s ease; }
.server-info-section .stat-number.ip-address:hover { color: var(--text-color); }
.server-info-section .stat-label { color: var(--text-muted-color); font-size: 14px; }

/* === RULES SECTION === */
.rules-section { padding: 60px 0; position: relative; z-index: 2; }
.rules-content { background: var(--light-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); padding: 30px 40px; max-width: 900px; margin: 0 auto; counter-reset: rules-counter; }
.rules-content h1 { text-align: center; margin-top: 0; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.rules-content h2 { font-size: 24px; margin-top: 40px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); color: var(--primary-color); }
.rules-content h3 { font-size: 20px; margin-top: 30px; margin-bottom: 10px; color: var(--text-color); }
.rules-content p { margin-bottom: 15px; color: var(--text-muted-color); }
.rules-content p strong { color: var(--text-color); }
.rules-list { list-style: none; padding-left: 0; margin-left: 0; margin-bottom: 15px; color: var(--text-muted-color); }
.rules-list > li { counter-increment: rules-counter; margin-bottom: 10px; position: relative; padding-left: 35px; }
.rules-list > li::before { content: counter(rules-counter) "."; position: absolute; left: 0; top: 0; font-weight: 600; color: var(--primary-color); min-width: 25px; text-align: right; padding-right: 10px; }
.rules-start-11 { counter-reset: rules-counter 10; }
.rules-start-21 { counter-reset: rules-counter 20; }
.rules-start-31 { counter-reset: rules-counter 30; }
.rules-start-41 { counter-reset: rules-counter 40; }
.rules-list ul { list-style: disc; margin-left: 20px; padding-left: 20px; margin-top: 10px; margin-bottom: 10px; }
.rules-list ul li::before { content: ""; padding-right: 0; min-width: 0; }
.rules-list ul li { padding-left: 0; counter-increment: none; }
.rules-content table { width: 100%; margin: 20px 0; border-collapse: collapse; background-color: var(--dark-bg); }
.rules-content th, .rules-content td { border: 1px solid var(--border-color); padding: 10px 15px; text-align: left; }
.rules-content th { background-color: var(--light-bg); color: var(--text-color); font-weight: 600; }
.rules-content td { color: var(--text-muted-color); }
.rule-forbidden { color: #e74c3c; }
.rule-allowed { color: #2ecc71; }
.rules-important { background-color: rgba(241, 196, 15, 0.1); border-left: 3px solid var(--president-role-color); padding: 15px; margin: 20px 0; border-radius: 4px; color: var(--text-color); }

/* === UI ELEMENTS === */
.btn { padding: 12px 25px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; transition: all 0.3s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-hover-color); transform: translateY(-3px); }
.btn-large { padding: 15px 35px; font-size: 18px; }
.btn-secondary { background-color: var(--light-bg); color: var(--text-muted-color); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: #2a2a30; color: white; }
.btn-danger { background-color: var(--admin-role-color); color: white; }
.btn-danger:hover { background-color: #c0392b; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; justify-content: center; align-items: center; z-index: 2000; padding: 20px;}
.modal-content { background: var(--light-bg); padding: 30px; border-radius: var(--border-radius); border: 1px solid var(--border-color); width: 100%; max-width: 500px; position: relative; box-sizing: border-box; }
.close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; color: var(--text-muted-color); font-size: 24px; cursor: pointer; z-index: 2001; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; text-align: left; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-color); box-sizing: border-box; font-size: 16px; font-family: var(--font-family); }
.form-group textarea { resize: none; }
.error-message { color: #e74c3c; text-align: center; margin-top: 15px; min-height: 1em; }
input[type="file"] { position: relative; overflow: hidden; display: inline-block; vertical-align: middle; width: auto; padding: 0; border: none; background: none; font-size: 14px; color: var(--text-muted-color); }
input[type="file"]::file-selector-button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; font-weight: 600; transition: all 0.3s ease; background-color: var(--light-bg); color: var(--text-muted-color); font-family: var(--font-family); margin-right: 15px; font-size: 14px; }
input[type="file"]::file-selector-button:hover { background-color: #2a2a30; color: white; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* === DASHBOARD LAYOUT === */
.dashboard-section { padding: 40px 0; }
.dashboard-content { display: flex; gap: 30px; align-items: flex-start; }
.dashboard-sidebar { width: 280px; flex-shrink: 0; position: sticky; top: 100px; }
.dashboard-nav { background: var(--light-bg); border-radius: var(--border-radius); padding: 10px; border: 1px solid var(--border-color); }
.nav-item { display: flex; align-items: center; padding: 15px; border-radius: 8px; font-weight: 500; cursor: pointer; color: var(--text-muted-color); transition: all 0.2s ease; text-decoration: none; }
.nav-item i { margin-right: 15px; width: 20px; text-align: center; }
.nav-item:hover { background: #2a2a30; color: white; }
.nav-item.active { background: var(--primary-color); color: white; }
.nav-item.disabled { color: #555; cursor: not-allowed; }
.dashboard-main { flex-grow: 1; min-width: 0; }
.dashboard-page { display: none; }
.dashboard-page.active { display: block; }

/* === PROFILE STYLES === */
.profile-card, .page-card { background: var(--light-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); padding: 30px; width: 100%; box-sizing: border-box; }
.profile-header { text-align: center; }
.profile-avatar-large { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--primary-color); }
.profile-username { font-size: 28px; font-weight: 700; margin-top: 10px; margin-bottom: 8px; word-break: break-all; }

/* Роли и Статус */
.roles-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.role-badge { padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 6px; text-transform: uppercase; }
.role-badge.player { background-color: rgba(255, 255, 255, 0.1); color: var(--text-muted-color); }
.role-badge.admin { background-color: rgba(231, 76, 60, 0.2); color: var(--admin-role-color); }
.role-badge.judge { background-color: rgba(52, 152, 219, 0.2); color: var(--judge-role-color); }
.role-badge.president { background-color: rgba(241, 196, 15, 0.2); color: var(--president-role-color); }

.profile-status-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; font-size: 14px; padding: 4px 12px; border-radius: 20px; transition: all 0.3s ease; }
.profile-status-badge.online { color: #2ecc71; background-color: rgba(46, 204, 113, 0.15); }
.profile-status-badge.offline { color: #95a5a6; background-color: rgba(149, 165, 166, 0.15); }
.profile-status-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background-color: currentColor; margin-right: 5px;}

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; margin-top: 30px; border-top: 1px solid var(--border-color); padding-top: 30px; }
.stat-item { background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 20px; display: flex; align-items: center; gap: 15px; transition: all 0.3s ease; min-width: 0; }
.stat-item:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 5px 15px rgba(0, 168, 107, 0.1); }
.stat-icon { font-size: 24px; color: var(--primary-color); }
.stat-info { min-width: 0; }
.stat-info h3 { margin: 0; font-size: 22px; color: white; overflow-wrap: break-word; word-break: normal; }
.stat-info p { margin: 5px 0 0; color: var(--text-muted-color); font-size: 14px; }

/* === PLAYERS & FRIENDS LISTS === */
.player-status { font-size: 12px; font-weight: 500; }
.player-status.online { color: #2ecc71; }
.player-status.offline { color: #95a5a6; }

.players-page-card { background: var(--light-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); padding: 30px; width: 100%; box-sizing: border-box; }
.search-bar-container { position: relative; margin-bottom: 20px; }
.search-bar-container .fa-search { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: var(--text-muted-color); }
#player-search-input { width: 100%; padding: 12px 12px 12px 40px; background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-color); box-sizing: border-box; font-size: 16px; }
.players-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.player-item { display: flex; align-items: center; gap: 15px; background: var(--dark-bg); padding: 15px; border-radius: var(--border-radius); border: 1px solid var(--border-color); text-decoration: none; transition: all 0.2s ease; cursor: pointer; min-width: 0; }
.player-item:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.player-avatar { width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; }
.player-info { flex-grow: 1; min-width: 0; }
.player-name { display: block; font-size: 18px; font-weight: 600; color: var(--text-color); word-break: break-all; }
.no-players { text-align: center; color: var(--text-muted-color); padding: 40px 20px; grid-column: 1 / -1; }
.profile-friend-actions .btn { padding: 10px 20px; font-size: 14px; }

.friends-card { background: var(--light-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); padding: 30px; width: 100%; box-sizing: border-box; }
.friends-card h2 { border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 20px; }
.friends-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; margin-bottom: 30px; }
.friend-item { display: flex; align-items: center; background: var(--dark-bg); padding: 12px; border-radius: var(--border-radius); border: 1px solid var(--border-color); transition: all 0.2s ease; text-decoration: none; cursor: pointer; min-width: 0; }
.friend-item:hover { border-color: var(--primary-color); transform: translateY(-3px); }
.friend-avatar { width: 45px; height: 45px; border-radius: 50%; margin-right: 15px; flex-shrink: 0; }
.friend-info { flex-grow: 1; min-width: 0; }
.friend-name { font-weight: 600; color: var(--text-color); text-decoration: none; display: block; word-break: break-all; }
.friend-actions { display: flex; gap: 8px; }
.friend-actions .btn { padding: 5px 10px; font-size: 12px; }
.no-friends-placeholder { color: var(--text-muted-color); padding: 20px 0; }
.profile-friends-card { padding: 30px 0 0; }
.profile-friends-card h3 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 20px; text-align: left; }
.profile-friends-minimal-list { display: flex; flex-wrap: wrap; gap: 10px; max-height: 165px; overflow-y: auto; }
.profile-friends-minimal-list .friend-avatar-link { display: block; position: relative; transition: transform 0.2s ease; }
.profile-friends-minimal-list .friend-avatar-link:hover { transform: scale(1.1); z-index: 10; }
.profile-friends-minimal-list .friend-avatar-small { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--border-color); }
.back-button { display: inline-block; margin-bottom: 20px; color: var(--text-muted-color); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.back-button:hover { color: var(--text-color); }
.back-button i { margin-right: 8px; }

/* === NOTIFICATIONS === */
.notification-bell { position: relative; color: var(--text-muted-color); font-size: 20px; cursor: pointer; transition: color 0.2s ease; }
.notification-bell:hover { color: var(--text-color); }
.notification-count { position: absolute; top: -5px; right: -8px; background-color: var(--admin-role-color); color: white; font-size: 10px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 2px solid var(--dark-bg); }
.notification-dropdown { display: none; position: absolute; top: 55px; right: 0; background: var(--light-bg); border-radius: var(--border-radius); width: 450px; border: 1px solid var(--border-color); box-shadow: 0 8px 25px rgba(0,0,0,0.3); z-index: 1001; overflow: hidden; }
.notification-header { padding: 15px; font-weight: 600; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.notification-list { max-height: 400px; overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 15px; border-bottom: 1px solid var(--border-color); }
.notification-item:last-child { border-bottom: none; }
.notification-item .friend-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 0; flex-shrink: 0; }
.notification-icon-container { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background-color: rgba(255, 255, 255, 0.05); font-size: 18px; color: var(--text-muted-color); flex-shrink: 0; }
.court-notification .notification-icon-container { color: var(--judge-role-color); background-color: rgba(52, 152, 219, 0.1); }
.notification-info { min-width: 0; flex: 1; overflow: hidden; }
.notification-text { font-size: 14px; line-height: 1.4; word-break: break-word; white-space: normal; overflow-wrap: break-word; }
.notification-text strong { color: var(--primary-color); }
.notification-text em { font-style: italic; color: var(--text-muted-color); opacity: 0.8; }
.notification-timer { font-size: 12px; color: var(--text-muted-color); margin-top: 4px; white-space: nowrap; }
.notification-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: nowrap; }
.notification-empty { padding: 40px 15px; text-align: center; color: var(--text-muted-color); }

/* === LOADERS & UTILS === */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--dark-bg); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 1; transition: opacity 0.3s ease; pointer-events: auto; }
.preloader.preloader-hidden { opacity: 0; pointer-events: none; }
.preloader-spinner { width: 40px; height: 40px; border: 4px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body.is-loading .dashboard-content, body.is-loading .hero-section, body.is-loading .server-info-section, body.is-loading .rules-section { visibility: hidden; opacity: 0; }
body.is-loaded .dashboard-content, body.is-loaded .hero-section, body.is-loaded .server-info-section, body.is-loaded .rules-section { visibility: visible; opacity: 1; transition: opacity 0.3s ease; }
.hidden { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.dropdown-menu.is-active, .notification-dropdown.is-active { display: block; }
.w-100 { width: 100%; }
.notification-header-count { color: var(--text-muted-color); font-weight: 500; }
.spinner-centered { margin: 50px auto; }
.mt-20 { margin-top: 20px; }
.mt-15 { margin-top: 15px; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after { content: ''; position: absolute; width: 16px; height: 16px; top: 50%; left: 50%; margin-left: -8px; margin-top: -8px; border: 2px solid transparent; border-top-color: white; border-radius: 50%; animation: spin 1s linear infinite; }
.btn-loading i.fa-spinner { color: white; animation: spin 1s linear infinite; }

/* === BANK === */
.bank-page-card { background: var(--light-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); padding: 30px; text-align: center; width: 100%; box-sizing: border-box; }
#create-card-btn { margin-top: 20px; }
.bank-page-content { display: flex; flex-direction: column; gap: 30px; }
.bank-top-section { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.balance-card { background: var(--light-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 30px; text-align: center; height: 100%; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.balance-label { font-size: 16px; color: var(--text-muted-color); margin-bottom: 10px; }
.balance-amount { font-size: 54px; font-weight: 700; color: white; word-break: break-all; }
.history-card { background: var(--light-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); padding: 30px; width: 100%; box-sizing: border-box; }
.transaction-history-list { margin-top: 20px; max-height: 500px; overflow-y: auto; padding-right: 10px; }
.transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.transaction-item:last-child { border-bottom: none; }
.transaction-details { display: flex; align-items: center; gap: 15px; }
.transaction-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.transaction-icon.deposit { background-color: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.transaction-icon.withdraw, .transaction-icon.transfer-out { background-color: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.transaction-icon.transfer-in { background-color: rgba(52, 152, 219, 0.15); color: #3498db; }
.transaction-title { font-weight: 500; }
.transaction-date { font-size: 12px; color: var(--text-muted-color); }
.transaction-amount { font-weight: 700; font-size: 18px; text-align: right; }
.transaction-amount.positive { color: #2ecc71; }
.transaction-amount.negative { color: #e74c3c; }
.no-transactions { text-align: center; color: var(--text-muted-color); padding: 40px 20px; }
.credit-card { width: 100%; max-width: 400px; aspect-ratio: 1.58; margin: 0 auto; border-radius: 15px; background: linear-gradient(45deg, #111111 0%, #1e1e24 100%); color: white; padding: 25px; box-sizing: border-box; position: relative; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); font-family: 'Courier New', Courier, monospace; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.card-logo { font-weight: 700; font-size: 20px; font-family: var(--font-family); display: flex; align-items: center; gap: 10px; }
.logo-img-small { height: 24px; margin-right: 8px; }
.card-chip { display: none; }
.card-number { font-size: 22px; letter-spacing: 3px; text-align: center; word-break: keep-all; white-space: nowrap; cursor: pointer; user-select: none; }
.card-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.card-owner-label { display: none; }
.card-owner-name { font-size: 16px; color: var(--text-muted-color); }
.balance-amount .currency-symbol { font-size: 0.7em; vertical-align: middle; }
.card-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.card-subtitle { font-size: 12px; font-weight: 400; color: var(--text-muted-color); font-family: var(--font-family); }
.card-currency { font-size: 20px; font-weight: 700; color: var(--text-color); font-family: var(--font-family); }
.card-brand { font-size: 22px; font-weight: 700; color: var(--text-color); }

/* === COURT & PETITIONS === */
.page-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; gap: 15px; }
.page-header h2 { margin: 0; flex-grow: 1; overflow-wrap: break-word; word-break: break-all; min-width: 0; }
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab-item { padding: 10px 20px; background-color: var(--dark-bg); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.tab-item:hover { background-color: #2a2a30; color: white; }
.tab-item.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.court-cases-list { display: flex; flex-direction: column; gap: 15px; }
.case-item { display: flex; justify-content: space-between; align-items: center; background-color: var(--dark-bg); padding: 20px; border-radius: var(--border-radius); border: 1px solid var(--border-color); cursor: pointer; transition: all 0.2s ease; }
.case-item:hover { border-color: var(--primary-color); transform: translateY(-3px); }
.case-title { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.case-meta { font-size: 14px; color: var(--text-muted-color); }
.case-status { font-weight: 600; padding: 5px 12px; border-radius: 20px; font-size: 14px; text-align: center; white-space: nowrap; }
.case-status.open { color: #3498db; background-color: rgba(52, 152, 219, 0.15); }
.case-status.processing { color: #f1c40f; background-color: rgba(241, 196, 15, 0.15); }
.case-status.closed { color: #95a5a6; background-color: rgba(149, 165, 166, 0.15); }
.case-detail-meta { display: flex; flex-wrap: wrap; gap: 20px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); color: var(--text-muted-color); }
.case-detail-meta strong { color: var(--text-color); }
.case-detail-description h3 { margin-top: 0; }
.case-detail-description p { line-height: 1.7; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-all; }
.attachments-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.attachments-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); }
.case-attachments-container { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.case-attachments-list { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.case-attachments-list img { max-width: 200px; height: auto; border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; transition: transform 0.2s ease; }
.case-attachments-list img:hover { transform: scale(1.05); }
#image-viewer-modal { align-items: center; justify-content: center; }
.fullscreen-image { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.viewer-close-btn { color: white; font-size: 40px; }
.defendant-search-group { position: relative; }
.defendant-search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--light-bg); border: 1px solid var(--border-color); border-top: none; border-radius: 0 0 var(--border-radius) var(--border-radius); z-index: 10; max-height: 250px; overflow-y: auto; }
.defendant-search-item { display: flex; align-items: center; padding: 10px; cursor: pointer; transition: background-color 0.2s ease; }
.defendant-search-item:hover, .defendant-search-item:focus { background-color: var(--dark-bg); }
.defendant-search-item img { width: 35px; height: 35px; border-radius: 50%; margin-right: 10px; }
.status-container { position: relative; display: flex; align-items: center; gap: 10px; }
.judge-status-editor .btn-sm { padding: 5px 8px; }
.status-dropdown-container { position: absolute; top: 100%; right: 0; margin-top: 8px; background-color: var(--dark-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 10; display: flex; gap: 10px; align-items: center; }
#case-status-select { padding: 6px 10px; background: var(--light-bg); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 6px; font-family: var(--font-family); font-size: 14px; }
.case-comments-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.case-comments-section h3 { padding-bottom: 15px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; margin-top: 0; }
.case-comments-list { display: flex; flex-direction: column; gap: 25px; }
.comment-item { display: flex; gap: 15px; align-items: flex-start; }
.comment-avatar { width: 45px; height: 45px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.comment-content { background-color: var(--dark-bg); border: 1px solid var(--border-color); padding: 15px 20px; border-radius: var(--border-radius); flex-grow: 1; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }
.comment-author { font-weight: 700; color: white; font-size: 16px; }
.comment-author .role-badge { margin-left: 8px; font-size: 10px; padding: 3px 8px; vertical-align: middle; }
.comment-author .system-message-author { color: var(--judge-role-color); }
.comment-date { font-size: 12px; color: var(--text-muted-color); }
.comment-body { padding-top: 8px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.add-comment-form { background-color: transparent; border: none; padding: 0; margin-top: 30px; }
#comment-text-input, #petition-comment-text { width: 100%; background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-color); box-sizing: border-box; font-size: 14px; font-family: var(--font-family); min-height: 80px; margin-bottom: 15px; padding: 10px; resize: none; }
#add-comment-btn, #add-petition-comment-form button { display: block; margin-left: auto; }
.case-actions-container { display: flex; align-items: center; gap: 15px; }
.claim-case-button { display: block !important; margin: 20px auto !important; }
.comment-avatar.system-avatar { background-color: var(--dark-bg); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--judge-role-color); }

.petitions-list { display: flex; flex-direction: column; gap: 15px; }
.petition-item { display: flex; justify-content: space-between; align-items: center; background-color: var(--dark-bg); padding: 20px; border-radius: var(--border-radius); border: 1px solid var(--border-color); cursor: pointer; transition: all 0.2s ease; gap: 20px; }
.petition-item:hover { border-color: var(--primary-color); transform: translateY(-3px); }
.petition-title { font-size: 18px; font-weight: 600; margin: 0 0 5px; color: var(--text-color); }
.petition-meta { font-size: 14px; color: var(--text-muted-color); }
.petition-stats { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.petition-signatures { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.petition-status { font-weight: 600; padding: 5px 12px; border-radius: 20px; font-size: 14px; text-align: center; white-space: nowrap; }
.petition-status.processing { color: #f1c40f; background-color: rgba(241, 196, 15, 0.15); }
.petition-status.approved { color: #2ecc71; background-color: rgba(46, 204, 113, 0.15); }
.petition-status.rejected { color: #e74c3c; background-color: rgba(231, 76, 60, 0.15); }
.signatures-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.progress-bar { display: none; }
.progress-bar-fill { height: 100%; background-color: var(--primary-color); border-radius: 5px; transition: width 0.5s ease; width: var(--progress-width, 0%); }
.president-response { background-color: rgba(255, 255, 255, 0.05); border-left: 4px solid var(--president-role-color); padding: 15px 20px; margin: 30px 0; border-radius: 0 var(--border-radius) var(--border-radius) 0; }
.president-response h4 { margin: 0 0 10px; color: var(--president-role-color); }
.president-response p { margin: 0; white-space: pre-wrap; font-style: italic; }
#president-form-container textarea { background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-color); font-family: var(--font-family); font-size: 14px; padding: 10px; min-height: 100px; margin-bottom: 15px; width: 100%; box-sizing: border-box; resize: none; }
.president-actions { display: flex; justify-content: flex-end; gap: 10px; }
.fines-list { display: flex; flex-direction: column; gap: 15px; }
.fine-notification-card { display: flex; align-items: center; gap: 20px; background-color: rgba(231, 76, 60, 0.1); border: 1px solid var(--admin-role-color); border-radius: var(--border-radius); padding: 20px; margin-bottom: 0; transition: opacity 0.3s ease; }
.fine-icon { font-size: 28px; color: var(--admin-role-color); }
.fine-details { flex-grow: 1; }
.fine-title { font-size: 18px; font-weight: 700; color: var(--text-color); margin-bottom: 5px; }
.fine-reason { font-size: 14px; color: var(--text-muted-color); }
.pay-fine-btn { flex-shrink: 0; }

.custom-alert-text { font-size: 16px; color: var(--text-color); line-height: 1.7; margin-top: 15px; margin-bottom: 25px; white-space: pre-wrap; word-break: break-word; text-align: center; }
.custom-alert-content { max-width: 450px; text-align: center; }
.custom-alert-title-header { margin-top: 0; }
.custom-alert-actions { display: flex; justify-content: center; gap: 15px; }
#custom-alert-confirm-btn, #custom-alert-cancel-btn { display: none; }
#custom-alert-modal.is-confirm #custom-alert-confirm-btn, #custom-alert-modal.is-confirm #custom-alert-cancel-btn { display: inline-flex; }
#custom-alert-modal.is-confirm #custom-alert-close-btn { display: none; }
.is-fading-out { opacity: 0 !important; transition: opacity 0.3s ease !important; }
.no-friends-placeholder.is-error, .no-players.is-error, .no-transactions.is-error { color: var(--admin-role-color); }

.connect-button-container { text-align: center; margin-top: 40px; }
.connect-modal-content h2 { text-align: center; margin-top: 0; }
.connect-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin: 25px 0; }
.connect-item { background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 15px 20px; }
.connect-item.copy-ip { cursor: pointer; transition: all 0.2s ease; }
.connect-item.copy-ip:hover { border-color: var(--primary-color); transform: translateY(-3px); }
.connect-label { font-size: 14px; color: var(--text-muted-color); margin-bottom: 5px; }
.connect-value { font-size: 18px; font-weight: 600; color: var(--text-color); font-family: 'Courier New', Courier, monospace; word-break: break-all; }
.connect-hint { text-align: center; font-size: 14px; color: var(--text-muted-color); margin-top: 10px; margin-bottom: 0; }

/* === EXCHANGE TERMINAL === */
.exchange-terminal {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto 1fr;
    gap: 20px;
    height: calc(100vh - 130px);
    min-height: 600px;
    padding-bottom: 20px;
    box-sizing: border-box;
}

.terminal-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px 25px;
}

.pair-info { display: flex; align-items: center; gap: 15px; }
.pair-name { font-size: 24px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; margin: 0; }
.pair-price { font-size: 20px; font-weight: 600; color: var(--primary-color); }

.total-assets-info { text-align: right; }
.total-assets-label { font-size: 12px; color: var(--text-muted-color); text-transform: uppercase; letter-spacing: 0.5px; }
.total-assets-value { font-size: 20px; font-weight: 700; color: #fff; margin-top: 2px; }

.chart-panel {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chart-watermark {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted-color);
    pointer-events: none;
}

#exchange-chart-container {
    width: 100%;
    height: 100%;
    flex-grow: 1;
}

.trade-panel {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trade-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--dark-bg);
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.trade-tab-btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted-color);
    background: transparent;
    transition: all 0.2s;
}

.trade-tab-btn.active { color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.trade-tab-btn.buy.active { background-color: #2ecc71; }
.trade-tab-btn.sell.active { background-color: #e74c3c; }

.trade-input-group {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    transition: border-color 0.2s;
}

.trade-input-group:focus-within { border-color: var(--text-muted-color); }

.trade-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted-color);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.trade-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trade-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    width: 100%;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    padding: 0;
}

.trade-currency {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 10px;
}

.trade-footer { margin-top: auto; }

.trade-balance-info {
    font-size: 13px;
    color: var(--text-muted-color);
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.trade-balance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.val-highlight { color: #fff; font-weight: 600; }

.wallet-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.wallet-btn {
    background: #303038;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.wallet-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.wallet-btn i { margin-right: 4px; }

.action-btn {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.action-btn.buy { background: #2ecc71; box-shadow: 0 4px 0 #27ae60; }
.action-btn.buy:hover { background: #27ae60; transform: translateY(-1px); }
.action-btn.buy:active { transform: translateY(2px); box-shadow: none; }

.action-btn.sell { background: #e74c3c; box-shadow: 0 4px 0 #c0392b; }
.action-btn.sell:hover { background: #c0392b; transform: translateY(-1px); }
.action-btn.sell:active { transform: translateY(2px); box-shadow: none; }

/* === MEDIA QUERIES (Mobile Optimization) === */
@media (max-width: 992px) {
    /* --- Глобальные фиксы контейнеров --- */
    .container {
        padding: 0 15px; /* Чуть меньше отступы по краям для большего места */
        width: 100%;
        max-width: 100vw; /* Жесткое ограничение ширины */
        overflow-x: hidden; /* Скрываем возможный вылет за границы */
    }
    
    .auth-section { 
        position: static; 
        transform: none; 
        margin-left: auto; 
    }

    .main-nav { 
        position: static; 
        transform: none; 
        margin: 0 auto; 
    }

    .main-header .container { 
        justify-content: flex-start; 
    }

    .nav-wrapper { 
        flex-grow: 1; 
    }

    .bank-top-section { 
        grid-template-columns: 1fr; 
    }

    .balance-amount { 
        font-size: 42px; /* Чуть меньше шрифт, чтобы не ломало */
    }

    .notification-dropdown { 
        width: 90vw; 
        max-width: 380px;
        right: -50px; /* Корректировка положения на малых экранах */
    }

    /* --- Фикс Layout Dashboard (Проблема пустого места) --- */
    .dashboard-content { 
        display: flex;
        flex-direction: column;
        align-items: stretch; /* ВАЖНО: Растягивает элементы на всю ширину */
        gap: 20px;
    }

    .dashboard-sidebar { 
        width: 100%; 
        position: static; 
    }

    .dashboard-main {
        width: 100%;
        min-width: 0; /* Разрешает сжиматься flex-дочерним элементам */
    }

    /* Фикс ширины всех карточек */
    .friends-card, 
    .players-page-card, 
    .page-card, 
    .profile-card, 
    .bank-page-card, 
    .history-card,
    .dashboard-nav { 
        width: 100%; 
        box-sizing: border-box; 
        padding: 20px 15px; /* Чуть меньше padding внутри карточек */
    }

    .hero-landing .container { 
        width: 100%; 
        padding: 0 20px; 
        box-sizing: border-box; 
    }

    /* --- Фикс Биржи (Проблема растягивания) --- */
    .exchange-terminal {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        width: 100%;
        max-width: 100%; /* Критично для предотвращения растягивания */
        gap: 15px;
    }

    .terminal-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
        width: 100%;
        box-sizing: border-box;
    }

    .total-assets-info { 
        text-align: left; 
    }

    .total-assets-value { 
        font-size: 24px; 
    }

    /* Самый главный фикс графика */
    .chart-panel {
        width: 100%;
        max-width: 100%; /* Не дает графику распирать контейнер */
        height: 350px; 
        min-height: 350px;
        overflow: hidden; /* Обрезает всё, что вылезает */
        position: relative;
    }

    #exchange-chart-container {
        width: 100% !important; /* Принудительная ширина */
        height: 100%;
        min-height: 350px;
        overflow: hidden;
    }

    .trade-panel {
        width: 100%;
        box-sizing: border-box;
    }

    .trade-tabs {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    /* --- Глобальные настройки контейнера --- */
    .container { 
        padding: 0 15px; 
        width: 100%;
    }
    
    /* --- Хедер и Логотип --- */
    .main-header .container { 
        flex-wrap: wrap; 
        justify-content: space-between; 
        position: relative;
    }

    .logo { 
        flex-grow: 0; 
        margin-right: 0; 
        z-index: 1002; /* Поверх открытого меню */
    }

    .mobile-nav-toggle { 
        display: block; 
        margin-left: auto; 
        z-index: 1002; /* Поверх открытого меню */
    }

    /* --- ГЛАВНОЕ МОБИЛЬНОЕ МЕНЮ --- */
    .nav-wrapper { 
        display: none; 
        flex-direction: column; 
        position: fixed; /* Фиксируем меню */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* На всю высоту экрана */
        background: var(--dark-bg); 
        padding: 80px 20px 40px 20px; /* Отступ сверху для хедера */
        box-sizing: border-box;
        overflow-y: auto; /* Прокрутка ВНУТРИ меню */
        z-index: 1001;
    }

    .nav-wrapper.active { 
        display: flex; 
    }

    .main-nav { 
        position: static; 
        transform: none; 
        flex-direction: column; 
        text-align: center; 
        gap: 20px; 
        width: 100%; 
        margin: 0 0 30px 0; 
    }

    .main-nav .nav-link {
        font-size: 18px; /* Шрифт покрупнее для пальцев */
        display: block;
        padding: 10px;
    }

    .auth-section { 
        flex-direction: column; 
        gap: 25px; 
        width: 100%; 
        position: static; 
        transform: none; 
        padding-right: 0; 
        margin-left: 0; 
        align-items: center;
    }

    /* --- ИСПРАВЛЕНИЕ ПРОФИЛЯ (Аккордеон) --- */
    #user-info {
        flex-direction: column;
        width: 100%;
    }

    #user-info img.user-avatar {
        width: 60px;
        height: 60px;
        margin: 10px auto;
    }

    #user-info span#user-name {
        font-size: 18px;
        font-weight: 600;
    }

    /* Меню профиля теперь встраивается в поток, а не висит поверх */
    #user-info .dropdown-menu { 
        position: static; /* Статичное позиционирование */
        transform: none; 
        width: 100%;
        margin-top: 15px;
        background: rgba(255, 255, 255, 0.05); /* Выделяем фон */
        border: none;
        box-shadow: none;
        display: none;
    }

    #user-info .dropdown-menu.is-active {
        display: block;
        animation: fadeIn 0.3s ease; /* Плавное появление */
    }
    
    @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

    /* --- ИСПРАВЛЕНИЕ УВЕДОМЛЕНИЙ (Центрирование) --- */
    .notification-dropdown { 
        position: fixed !important; /* Жестко фиксируем */
        top: 80px !important; /* Отступ от верха */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important; /* Центрируем по горизонтали */
        width: 92vw !important; /* 92% ширины экрана */
        max-width: 400px;
        max-height: 70vh; /* Чтобы не уходило за низ экрана */
        overflow-y: auto;
        z-index: 2005; /* Самый высокий слой */
        box-shadow: 0 10px 100px rgba(0,0,0,0.7); /* Глубокая тень */
        border: 1px solid var(--border-color);
    }
    
    /* --- ДЭШБОРД И ПРОЧЕЕ (Сохраняем предыдущие фиксы) --- */
    .dashboard-section { padding: 20px 0; }

    .dashboard-nav { 
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 8px;
        padding: 10px; 
    }

    .nav-item { 
        flex-direction: column; 
        padding: 12px; 
        text-align: center; 
        width: 100%; 
        box-sizing: border-box; 
        font-size: 13px;
    }
    
    .nav-item i {
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 20px;
    }
    
    .profile-stats { grid-template-columns: 1fr; } 
    .players-list, .friends-list { grid-template-columns: 1fr; }
    
    .credit-card { 
        width: 100%; 
        max-width: 100%; 
        padding: 20px; 
        height: auto;
        min-height: 200px;
    }

    .card-number { 
        font-size: 18px; 
        margin: 20px 0;
    }
    
} /* --- ЗАКРЫВАЕМ @media (max-width: 768px) --- */

/* ================================================= */
/* ФИКС МАГАЗИНА (V7 - ЛУЧШИЙ БАЛАНС)                */
/* ================================================= */

/* Главная карточка */
.shop-item-card {
    background: var(--dark-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
    min-height: 340px !important; /* Чуть увеличили высоту для воздуха */
    overflow: hidden !important;
}

.shop-item-card:hover {
    transform: translateY(-5px) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}

/* Блок с картинкой */
.shop-item-visual {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    height: 160px !important;
    width: 100% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex-shrink: 0 !important; /* Чтобы картинку не сплющивало */
}

.shop-item-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
}

.shop-item-visual i {
    font-size: 4rem !important;
    z-index: 2 !important;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

/* Контейнер для текста и кнопки */
.shop-item-details {
    background: transparent !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    justify-content: flex-start !important; /* Контент начинается сверху */
}

/* Заголовок */
.shop-item-title {
    color: var(--text-color) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important; /* Маленький отступ до цены */
    text-align: center !important;
    line-height: 1.3 !important;
}

/* Цена - СТОИТ СРАЗУ ПОД ЗАГОЛОВКОМ */
.shop-item-price {
    color: var(--primary-color) !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    text-shadow: 0 2px 10px rgba(242, 73, 65, 0.2);
    margin: 0 !important; /* Убрали margin-top: auto */
}

/* Кнопка - ВСЕГДА В САМОМ НИЗУ */
.shop-item-details .buy-btn {
    width: 100% !important;
    border-radius: 8px !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.5px !important;
    font-weight: 700 !important;
    
    margin-top: auto !important; /* <--- ГЛАВНЫЙ ФИКС: Кнопка уезжает вниз, оставляя пустоту в центре */
    
    background: var(--light-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted-color) !important;
    padding: 12px !important;
    transition: all 0.2s ease !important;
}

.shop-item-details .buy-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.shop-item-details .buy-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: var(--light-bg) !important;
    color: var(--text-muted-color) !important;
}

/* --- ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ ОТКЛЮЧЕННЫХ КНОПОК --- */
.nav-disabled, 
a.nav-disabled, 
.nav-item.nav-disabled {
    color: #6c757d !important;       /* Серый цвет текста */
    background: transparent !important; /* ПРОЗРАЧНЫЙ ФОН */
    pointer-events: none !important; /* Нельзя нажать */
    cursor: default !important;      /* Обычный курсор */
    opacity: 0.6 !important;         /* Слегка приглушаем яркость */
    box-shadow: none !important;     /* Убираем любые тени */
    border: none !important;         /* Убираем рамки */
}

.nav-disabled i,
.nav-item.nav-disabled i,
a.nav-disabled i {
    color: #6c757d !important;
}