/* =========================================
   1. BASIC SETUP & VARIABLES
   ========================================= */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #fbbf24; /* Gold */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --white: #ffffff;
    
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Backgrounds */
.bg-gradient {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: -2;
}
.bg-particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* Utility: Hide Alt Text */
img { font-size: 0 !important; line-height: 0 !important; }
img::after { display: none !important; content: '' !important; }

/* Rarity Colors */
.rarity-common { background: #94a3b8; color: #94a3b8; }
.rarity-uncommon { background: #3b82f6; color: #3b82f6; }
.rarity-rare { background: #6366f1; color: #6366f1; }
.rarity-mythical { background: #8b5cf6; color: #8b5cf6; }
.rarity-legendary { background: #f59e0b; color: #f59e0b; }
.rarity-ancient { background: #ef4444; color: #ef4444; }
.rarity-immortal { background: #10b981; color: #10b981; }

/* =========================================
   2. BUTTONS
   ========================================= */
.btn {
    padding: 10px 20px;
    border: none; border-radius: var(--radius-md);
    font-weight: 600; cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    color: var(--white); text-decoration: none; font-size: 14px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: brightness(1.1); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--gradient-primary); }
.btn-secondary { background: var(--dark-light); border: 1px solid var(--dark-lighter); }
.btn-outline { background: transparent; border: 1.5px solid var(--dark-lighter); }
.btn-outline:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.1); }
.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.btn-ghost { background: transparent; color: var(--gray-light); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: white; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-xl { padding: 18px 36px; font-size: 1.2rem; }

/* Social Buttons */
.btn-social { background: rgba(255, 255, 255, 0.05); border: 1.5px solid rgba(255, 255, 255, 0.1); flex: 1; }
.btn-social:hover { background: rgba(255, 255, 255, 0.1); }
.btn-steam { background: linear-gradient(135deg, #171a21 0%, #2a475e 100%); border: none; }
.btn-google { background: linear-gradient(135deg, #4285f4 0%, #34a853 100%); border: none; }

/* Wallet Button (Header) */
.btn-wallet {
    width: 36px !important; height: 36px !important; min-width: 36px !important;
    padding: 0 !important; border-radius: 10px;
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-wallet i { font-size: 14px; }

/* =========================================
   3. NAVBAR & HEADER
   ========================================= */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 20px; }

.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 24px; font-weight: 800; color: var(--white); text-decoration: none;
}
.logo-custom-icon { height: 40px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.logo-accent { color: var(--primary); }

.nav-links { display: flex; gap: 20px; }
.nav-link {
    color: var(--gray-light); text-decoration: none; font-weight: 500;
    padding: 8px 12px; border-radius: var(--radius-md); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-link.active i { color: var(--primary); }

/* Compact Balance (NEW) */
.compact-balance-wrapper {
    display: flex; align-items: center; gap: 12px; margin-right: 10px;
    background: rgba(15, 23, 42, 0.6); padding: 4px 4px 4px 16px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); height: 44px;
}
.compact-balance-text {
    font-weight: 800; font-size: 15px; color: var(--white);
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.compact-balance-text i { color: var(--accent); }

/* User Profile */
.user-dropdown {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px; background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg); cursor: pointer; transition: var(--transition);
}
.user-dropdown:hover, .user-dropdown.active { background: rgba(255,255,255,0.1); }
.user-avatar img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary); }
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.username { font-weight: 600; font-size: 13px; }
.user-level { font-size: 11px; color: var(--gray-light); }
.notification-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--error); color: white; font-size: 10px;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* =========================================
   4. MAIN PAGE (CASES)
   ========================================= */
.main-tabs { margin-bottom: 40px; }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.tabs { display: flex; gap: 8px; background: rgba(255,255,255,0.05); padding: 4px; border-radius: var(--radius-md); }
.tab {
    padding: 8px 16px; border: none; background: transparent; color: var(--gray-light);
    border-radius: 6px; cursor: pointer; transition: var(--transition);
}
.tab:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.tab.active { background: var(--gradient-primary); color: var(--white); }

.cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.case-item {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg); padding: 20px; text-align: center;
    cursor: pointer; transition: var(--transition); position: relative; overflow: hidden;
}
.case-item:hover {
    transform: translateY(-5px); border-color: var(--primary);
    background: rgba(255,255,255,0.06);
}
.case-image { width: 100%; height: 140px; object-fit: contain; margin-bottom: 15px; }
.case-name { font-weight: 600; margin-bottom: 8px; color: var(--white); }
.case-price { color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* =========================================
   5. CASE OPENING PAGE
   ========================================= */
.case-opening-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding: 20px;
    background: rgba(255,255,255,0.03); border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
}

.case-main-info { display: flex; align-items: center; gap: 40px; margin-bottom: 50px; }
.case-display-large {
    position: relative; flex: 1; max-width: 400px;
    display: flex; align-items: center; justify-content: center;
}
.case-display-large.spinning { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

.case-image-large { 
    width: 100%; max-height: 400px; object-fit: contain; z-index: 2;
    background: rgba(255,255,255,0.05); padding: 30px; border-radius: var(--radius-xl);
    border: 2px solid rgba(255,255,255,0.1);
}
.case-glow-large {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120%; height: 120%;
    background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, transparent 70%);
    z-index: 1; pointer-events: none; filter: blur(40px);
}

.case-details-large { flex: 2; }
.case-details-large h1 { font-size: 2.5rem; margin-bottom: 20px; color: var(--white); }
.case-price-large { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; margin-bottom: 20px; color: var(--accent); }
.case-price-large span { font-weight: 800; font-size: 2rem; }
.case-description { margin-bottom: 30px; color: var(--gray-light); line-height: 1.6; }

.opening-controls-large {
    background: rgba(15, 23, 42, 0.8); padding: 30px;
    border-radius: var(--radius-xl); border: 1px solid rgba(255,255,255,0.1);
}
.quantity-selector-large span { display: block; margin-bottom: 12px; color: var(--gray-light); }
.quantity-buttons-large { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.quantity-btn-large { min-width: 60px; padding: 12px 20px; }
.quantity-btn-large.active { background: var(--gradient-primary); border-color: transparent; }

.total-cost-large { 
    display: flex; align-items: center; gap: 12px; padding: 16px;
    background: rgba(245, 158, 11, 0.1); border-radius: var(--radius-lg);
    color: var(--accent); font-weight: 600; margin: 20px 0;
}
.total-cost-large span:first-child { color: var(--white); font-weight: 400; }
.total-cost-large .total-price-large { font-size: 1.8rem; font-weight: 800; }

.btn-opening-large { font-size: 1.3rem; padding: 20px 40px; border-radius: var(--radius-lg); width: 100%; }

/* Items Grid in Case */
.case-items-section { margin-top: 60px; }
.items-filters { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-tab {
    padding: 10px 20px; background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1); border-radius: var(--radius-md);
    color: var(--gray-light); cursor: pointer; transition: var(--transition);
}
.filter-tab.active { background: var(--gradient-primary); color: white; border-color: var(--primary); }

.case-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.case-item-card {
    background: rgba(255,255,255,0.05); padding: 20px; border-radius: var(--radius-lg);
    text-align: center; position: relative; overflow: hidden; transition: var(--transition);
}
.case-item-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.08); }
.item-rarity-overlay { height: 5px; width: 100%; position: absolute; top: 0; left: 0; }
.item-image-large { width: 120px; height: 120px; object-fit: contain; margin-bottom: 15px; }
.item-name-large { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.item-rarity-large { font-size: 12px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.item-price-large { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.stat-card {
    background: rgba(255,255,255,0.05); padding: 25px; border-radius: var(--radius-lg);
    display: flex; align-items: center; gap: 20px;
}
.stat-icon {
    width: 60px; height: 60px; background: rgba(99,102,241,0.1);
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--primary);
}
.stat-value { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 14px; color: var(--gray-light); }

/* =========================================
   6. PROVABLY FAIR
   ========================================= */
.provably-fair-section {
    background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg); padding: 30px; margin: 60px 0;
}
.pf-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.pf-control-group { display: flex; flex-direction: column; gap: 8px; }
.pf-control-group input {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    padding: 12px; border-radius: var(--radius-md); color: var(--white); font-family: monospace;
}
.pf-help-text { font-size: 12px; color: var(--gray); line-height: 1.5; }
.pf-actions { grid-column: 1 / -1; display: flex; justify-content: center; gap: 16px; margin-top: 20px; }

/* =========================================
   7. ACCOUNT PAGE (PROFILE & INVENTORY)
   ========================================= */
.account-container { max-width: 1200px; margin: 0 auto; }
.profile-card {
    background: rgba(255,255,255,0.05); padding: 40px; border-radius: var(--radius-lg);
    display: flex; gap: 40px; align-items: center; margin-bottom: 40px;
}
.profile-avatar-large { text-align: center; }
.profile-avatar-large img { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--primary); margin-bottom: 16px; }
.btn-change-avatar-large {
    background: rgba(255,255,255,0.1); border: none; padding: 8px 16px; border-radius: 20px;
    color: white; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 5px; margin: 0 auto;
}
.profile-info-large h3 { font-size: 2rem; margin-bottom: 8px; }
.profile-email { color: var(--gray-light); margin-bottom: 20px; }
.level-progress-large { display: flex; align-items: center; gap: 15px; margin: 10px 0; }
.progress-bar-large { flex: 1; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.progress-fill-large { height: 100%; background: var(--gradient-primary); }
.profile-date { display: flex; align-items: center; gap: 8px; color: var(--gray-light); font-size: 14px; margin-top: 8px; }

/* Account Inventory */
.inventory-controls-account { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.filter-container-account { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-select { padding: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: white; }
.search-container-account { position: relative; width: 100%; }
.search-container-account input { width: 100%; padding: 10px 10px 10px 35px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: white; }
.search-container-account i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray); }

.inventory-grid-account { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; min-height: 200px; }
.inventory-item {
    background: rgba(255,255,255,0.05); border-radius: var(--radius-md); padding: 15px;
    text-align: center; position: relative; border: 1px solid transparent; display: flex; flex-direction: column; align-items: center;
}
.inventory-item:hover { border-color: var(--primary); background: rgba(255,255,255,0.08); }
.item-rarity-indicator { height: 3px; width: 100%; position: absolute; top: 0; left: 0; border-radius: 4px 4px 0 0; }
.item-image { width: 80px; height: 80px; object-fit: contain; margin-bottom: 10px; }
.item-details { width: 100%; }
.item-name { font-weight: 600; font-size: 13px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { color: var(--accent); font-weight: 600; font-size: 12px; }
.sell-single-btn-inventory {
    width: 100%; margin-top: 10px; padding: 6px; border-radius: 6px;
    background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.sell-single-btn-inventory:hover { background: #ef4444; color: white; }

/* Settings Grid */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.setting-card {
    background: rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 24px;
    display: flex; align-items: center; gap: 20px; transition: var(--transition);
}
.setting-card:hover { background: rgba(255,255,255,0.08); }
.setting-icon { width: 50px; height: 50px; background: rgba(99,102,241,0.1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--primary); }
.setting-info h4 { margin-bottom: 4px; }
.setting-info p { font-size: 13px; color: var(--gray-light); }

/* =========================================
   8. MODALS & FORMS
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-container {
    width: 100%; max-width: 500px; animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.modal-content { background: var(--dark-light); border-radius: var(--radius-xl); border: 1px solid rgba(255,255,255,0.1); overflow: hidden; box-shadow: var(--shadow-xl); }
.modal-header { padding: 24px; background: rgba(0,0,0,0.2); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.modal-close { background: transparent; border: none; color: var(--gray-light); cursor: pointer; font-size: 1.2rem; }
.modal-body { padding: 24px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; }
.form-group input {
    width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); color: white;
}
.form-group input:focus { border-color: var(--primary); outline: none; }
.form-error { color: var(--error); font-size: 12px; margin-top: 4px; display: none; }
.password-input { position: relative; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; color: var(--gray-light); cursor: pointer;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; background: rgba(255,255,255,0.05); padding: 4px; border-radius: var(--radius-md); }
.auth-tab { flex: 1; padding: 12px; background: transparent; border: none; color: var(--gray-light); border-radius: 6px; cursor: pointer; font-weight: 500; }
.auth-tab.active { background: var(--gradient-primary); color: white; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.social-auth { display: flex; gap: 12px; margin-top: 20px; }
.auth-divider { display: flex; align-items: center; margin: 24px 0; color: var(--gray-light); font-size: 14px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1); }
.auth-divider span { padding: 0 16px; }

/* Result Modal Items */
.multi-result-summary { background: rgba(255,255,255,0.03); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.summary-stats .stat-item { display: flex; align-items: center; gap: 10px; }
.summary-stats i { color: var(--primary); font-size: 1.5rem; }
.result-items-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
    max-height: 400px; overflow-y: auto; padding: 5px;
}
.result-item-card {
    background: rgba(255,255,255,0.05); border-radius: var(--radius-md); padding: 15px;
    text-align: center; position: relative; animation: zoomIn 0.3s;
}
.result-item-card .rarity-indicator { position: absolute; top: 0; left: 0; height: 3px; width: 100%; }
.result-item-card img { width: 80px; height: 80px; object-fit: contain; margin: 10px auto; }

/* =========================================
   9. FOOTER
   ========================================= */
.footer { margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-content { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-tagline { color: var(--gray-light); font-size: 14px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.link-group { display: flex; flex-direction: column; gap: 12px; }
.link-group h4 { color: var(--white); margin-bottom: 8px; font-size: 16px; }
.link-group a { color: var(--gray-light); text-decoration: none; font-size: 14px; transition: var(--transition); }
.link-group a:hover { color: var(--white); }
.footer-social h4 { margin-bottom: 16px; }
.social-icons { display: flex; gap: 12px; }
.social-icon {
    width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: white; transition: var(--transition); text-decoration: none;
}
.social-icon:hover { background: var(--primary); transform: translateY(-2px); }
.footer-bottom { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; color: var(--gray-light); font-size: 12px; }
.footer-legal { display: flex; justify-content: center; gap: 24px; margin-top: 10px; }
.footer-legal a { color: var(--gray-light); text-decoration: none; }

/* =========================================
   10. TOAST NOTIFICATIONS
   ========================================= */
.toast {
    position: fixed; bottom: 30px; right: 30px; background: var(--dark-light);
    border: 1px solid rgba(255,255,255,0.1); border-left: 4px solid var(--success);
    border-radius: var(--radius-lg); padding: 16px 24px;
    display: none; align-items: center; gap: 12px; z-index: 2000; box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.error { border-left-color: var(--error); }
.toast.error i { color: var(--error); }
.toast.success i { color: var(--success); }

/* =========================================
   11. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1200px) {
    .case-main-info { flex-direction: column; text-align: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 20px; padding: 20px 0; }
    .nav-left, .nav-right { width: 100%; justify-content: center; }
    .stats-grid, .settings-grid { grid-template-columns: 1fr; }
    .cases-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .profile-card { flex-direction: column; text-align: center; }
    .pf-controls { grid-template-columns: 1fr; }
    
    /* Mobile Balance */
    .compact-balance-wrapper { margin-right: 5px; padding-left: 10px; height: 38px; }
    .compact-balance-text { font-size: 13px; }
    .btn-wallet { width: 30px !important; height: 30px !important; min-width: 30px !important; border-radius: 8px; }
}

@media (max-width: 480px) {
    .cases-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .nav-link span { display: none; }
    .nav-link i { font-size: 18px; }
    .quantity-buttons-large { justify-content: center; }
    .footer-links { grid-template-columns: 1fr; }
}

/* =========================================
   ДОПОЛНЕНИЕ: СТИЛИ ЛИЧНОГО КАБИНЕТА
   ========================================= */

/* Сетка статистики в ЛК (6 карточек) */
.stats-grid-account {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-account {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card-account:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.stat-icon-account {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.stat-info-account { flex: 1; }
.stat-label-account { color: var(--gray-light); font-size: 14px; margin-bottom: 8px; }
.stat-value-account { font-size: 2rem; font-weight: 800; color: var(--white); }

/* Секция графиков */
.charts-section-account {
    display: grid;
    grid-template-columns: 1fr; /* Один широкий график */
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container-account {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.chart-container-account h3 { margin-bottom: 20px; color: var(--white); font-size: 1.2rem; }

/* Достижения */
.achievements-section-account {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 40px;
}

.achievements-section-account h3 { margin-bottom: 20px; color: var(--white); font-size: 1.2rem; }

.achievements-grid-account {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.05);
}

.achievement-card:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--primary); }
.achievement-card.locked { opacity: 0.5; filter: grayscale(1); }

.achievement-icon {
    width: 50px; height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.5rem;
}

.achievement-info { flex: 1; }
.achievement-name { font-weight: 600; color: var(--white); margin-bottom: 4px; }
.achievement-desc { font-size: 12px; color: var(--gray-light); margin-bottom: 8px; }

.achievement-progress {
    display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--gray-light);
}

.progress-bar-small {
    flex: 1; height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px; overflow: hidden;
}

.progress-fill-small { height: 100%; background: var(--gradient-primary); border-radius: 2px; }

/* Опасная зона (удаление аккаунта) */
.account-danger-zone { margin-bottom: 40px; }
.account-danger-zone h3 { margin-bottom: 20px; color: var(--white); font-size: 1.5rem; }

.danger-zone-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex; align-items: center; justify-content: space-between;
}

.danger-zone-info h4 { color: var(--white); margin-bottom: 8px; font-size: 1.2rem; }
.danger-zone-info p { color: var(--gray-light); font-size: 14px; }

/* Адаптивность для ЛК */
@media (max-width: 900px) {
    .stats-grid-account { grid-template-columns: repeat(2, 1fr); }
    .danger-zone-card { flex-direction: column; text-align: center; gap: 20px; }
}

@media (max-width: 600px) {
    .stats-grid-account { grid-template-columns: 1fr; }
    .profile-card { padding: 20px; }
    .achievements-grid-account { grid-template-columns: 1fr; }
}

/* =========================================
   ДОПОЛНЕНИЕ: ИНВЕНТАРЬ (ФИНАЛЬНЫЕ ШТРИХИ)
   ========================================= */

/* 1. Скрываем заголовок "Продажа предметов" и верхнюю сводку */
.sell-section-account > .section-header {
    display: none !important;
}

/* 2. Основная сетка инвентаря */
.inventory-grid-account {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    min-height: 300px;
    width: 100%;
}

/* 3. Оформление пустого инвентаря (Заглушка) */
.inventory-empty-account {
    grid-column: 1 / -1; /* Растянуть на всю ширину */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--gray-light);
    margin-top: 20px;
}

.inventory-empty-account i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--gray);
    opacity: 0.5;
}

.inventory-empty-account p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white);
}

.empty-subtitle {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    color: var(--gray) !important;
}

/* 4. Улучшение панели поиска и фильтров */
.inventory-controls-account {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-container-account input {
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.search-container-account input:focus {
    border-color: var(--primary) !important;
}

