:root { 
    --bg-dark: #121212;
    --bg-panel: #1b1b1b;
    --bg-card: #232323;
    --bg-input: #0a0a0a;
    
    --accent-t: #dfa038;   
    --accent-ct: #5dade2;  
    --accent-global: #6a5acd; 
    --accent-success: #2ecc71;
    
    --text-primary: #eeeeee;
    --text-secondary: #aaaaaa;
    
    --border-radius: 4px;
    --border-color: #333;
}

body { background-color: var(--bg-dark); color: var(--text-primary); font-family: 'Inter', sans-serif; overflow: hidden; height: 100vh; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Layout */
.wrapper { display: flex; height: 100vh; width: 100%; }

/* --- SIDEBAR MODERNIZATION --- */

.sidebar {
    width: 280px;
    background: #141414; /* Tmavší, čistší pozadí */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column; /* Aby footer držel dole */
    z-index: 10;
    height: 100vh;
}

/* Header & Logo */
.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(20,20,20,1) 0%, rgba(20,20,20,0) 100%);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-global), #4a3b99);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 0 15px rgba(106, 90, 205, 0.4);
}

.brand-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.text-accent {
    color: var(--accent-global);
}

.brand-subtitle {
    font-size: 10px;
    color: #666;
    letter-spacing: 2px;
    margin-top: 3px;
}

/* Menu Area */
.sidebar-menu {
    flex: 1; /* Zabere zbylé místo */
    overflow-y: auto;
    padding: 20px;
}

.menu-label {
    font-size: 10px;
    color: #444;
    font-weight: 700;
    padding-left: 10px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* Category Button */
.category-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: #888;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 2px;
}

.category-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.category-btn i.arrow-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.category-btn[aria-expanded="true"] i.arrow-icon {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--accent-global);
}

/* Weapon List & Links */
.weapon-list {
    display: none;
    padding: 5px 0 10px 12px;
    margin-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.weapon-list.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.weapon-link {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #777;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 1px;
    position: relative;
}

.weapon-link:hover {
    color: #ddd;
    background: rgba(255,255,255,0.02);
}

.weapon-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(106, 90, 205, 0.1), transparent);
    border-left: 2px solid var(--accent-global);
}

/* Sidebar Footer (Logout) */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #111;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 6px;
    background: rgba(220, 53, 69, 0.05);
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #fff;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.1);
}

/* Custom Scrollbar for Menu */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #444; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; position: relative; background: radial-gradient(circle at top right, #1a1a1a 0%, #121212 60%); }
.top-bar { padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; background: rgba(18, 18, 18, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); z-index: 5; }
.search-box { position: relative; width: 350px; }
.search-box input { width: 100%; background: #0a0a0a; border: 1px solid #333; color: #fff; padding: 10px 15px 10px 40px; border-radius: var(--border-radius); font-size: 14px; transition: 0.3s; }
.search-box input:focus { outline: none; border-color: #666; background: #111; }
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #555; }
.content-scroll { padding: 40px; overflow-y: auto; height: 100%; }
.section-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 32px; margin-bottom: 25px; text-transform: uppercase; border-bottom: 2px solid #222; padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.section-title span { color: #666; font-size: 20px; font-weight: 500; margin-left: 10px; }

.weapon-container { display: none; animation: fadeIn 0.3s ease; }
.weapon-container.active { display: block !important; }

/* Cards */
.skin-card { 
    background: var(--bg-card); 
    border: 2px solid transparent; 
    border-radius: var(--border-radius); 
    padding: 15px; 
    position: relative; 
    transition: all 0.2s ease; 
    height: 100%; 
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; 
    overflow: hidden; 
}
.skin-card:hover { transform: translateY(-5px); border-color: #444; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* Card States */
.skin-card.active-t { border-color: var(--accent-t); box-shadow: 0 0 15px rgba(223, 160, 56, 0.15); }
.skin-card.active-ct { border-color: var(--accent-ct); box-shadow: 0 0 15px rgba(93, 173, 226, 0.15); }
.skin-card.active-both { 
    border-top-color: var(--accent-t); border-bottom-color: var(--accent-ct);
    border-left-color: var(--accent-t); border-right-color: var(--accent-ct);
    background: linear-gradient(135deg, rgba(223, 160, 56, 0.05) 0%, rgba(93, 173, 226, 0.05) 100%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.skin-img { width: 100%; height: 120px; object-fit: contain; margin: 10px 0; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3)); transition: 0.3s; }
.skin-card:hover .skin-img { transform: scale(1.05); }
.skin-info { text-align: center; width: 100%; z-index: 2; }
.skin-name { font-weight: 700; font-size: 14px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.skin-type { font-size: 11px; color: #666; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }

/* Status Bar & Badges */
.status-bar { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.team-indicator { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 15px; }
.team-badge { padding: 4px 10px; border-radius: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: #333; color: #777; transition: 0.3s; }
.team-badge.equipped-t { background: rgba(223, 160, 56, 0.15); color: var(--accent-t); border: 1px solid rgba(223, 160, 56, 0.3); }
.team-badge.equipped-ct { background: rgba(93, 173, 226, 0.15); color: var(--accent-ct); border: 1px solid rgba(93, 173, 226, 0.3); }
.badge-t-style { color: var(--accent-t) !important; border: 1px solid var(--accent-t) !important; background: rgba(223, 160, 56, 0.1); }
.badge-ct-style { color: var(--accent-ct) !important; border: 1px solid var(--accent-ct) !important; background: rgba(93, 173, 226, 0.1); }

/* Modal */
.modal-content { background: #181818; border: 1px solid #333; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-header { border-bottom: 1px solid #252525; padding: 20px; }
.modal-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.modal-body { padding: 25px; }
.modal-footer { border-top: 1px solid #252525; padding: 15px 25px; background: #151515; }

/* Buttons */
.btn-custom { border-radius: var(--border-radius); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 20px; border: 1px solid transparent; transition: 0.2s; }
.btn-t { background: rgba(223, 160, 56, 0.1); color: var(--accent-t); border-color: rgba(223, 160, 56, 0.3); }
.btn-t:hover, .btn-t.active { background: var(--accent-t); color: #000; box-shadow: 0 0 15px rgba(223, 160, 56, 0.3); }
.btn-ct { background: rgba(93, 173, 226, 0.1); color: var(--accent-ct); border-color: rgba(93, 173, 226, 0.3); }
.btn-ct:hover, .btn-ct.active { background: var(--accent-ct); color: #fff; box-shadow: 0 0 15px rgba(93, 173, 226, 0.3); }

/* StatTrak Switch */
.st-switch-box { background-color: #0a0a0a; border: 1px solid #333; border-radius: var(--border-radius); padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.form-switch .form-check-input { width: 3em; height: 1.5em; margin-left: 0; background-color: #222; border-color: #444; cursor: pointer; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23666'/%3e%3c/svg%3e"); }
.form-switch .form-check-input:checked { background-color: var(--accent-t); border-color: var(--accent-t); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23000'/%3e%3c/svg%3e"); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* NEW WELCOME SCREEN */
.welcome-screen { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    height: 100%; color: #444; text-align: center; animation: fadeIn 0.5s ease; 
}
.intro-content {
    max-width: 600px;
}
.intro-content h1 {
    font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 48px; 
    background: linear-gradient(90deg, #fff, #888); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}
.intro-content p { color: #888; font-size: 16px; margin-bottom: 40px; }
.features-grid { display: flex; gap: 30px; justify-content: center; }
.feature-item { 
    display: flex; flex-direction: column; align-items: center; gap: 10px; 
    color: #555; transition: 0.2s; 
}
.feature-item i { font-size: 24px; color: var(--accent-global); opacity: 0.6; }
.feature-item span { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.feature-item:hover { color: #fff; transform: translateY(-3px); }
.feature-item:hover i { opacity: 1; }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 10000; }
.toast { background: rgba(18, 18, 18, 0.95); border: 1px solid var(--border-color); border-left: 4px solid var(--accent-global); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); color: #fff; min-width: 300px; backdrop-filter: blur(10px); }
.toast-body { padding: 15px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.toast.success { border-left-color: #2ecc71; }
.toast.success i { color: #2ecc71; }
.toast.error { border-left-color: #e74c3c; }
.toast.error i { color: #e74c3c; }

/* --- MODAL IMPROVEMENTS --- */
.modal-weapon-preview {
    width: 100%; height: 200px; object-fit: contain; margin-bottom: 20px;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6)); transition: transform 0.3s ease;
}
.modal-weapon-preview:hover { transform: scale(1.02); }

.settings-group {
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px; padding: 20px;
}
.settings-group-title {
    font-size: 10px; text-transform: uppercase; color: #555; font-weight: 700;
    letter-spacing: 1px; margin-bottom: 10px; display: block;
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 5px;
}

/* Modal Form Elements */
.modal-content .form-label { font-weight: 700; color: #888; font-size: 10px; letter-spacing: 1px; margin-bottom: 6px; }
.modal-content .form-control {
    background: #0a0a0a; border: 1px solid #333; color: #fff;
    font-weight: 600; font-size: 13px; padding: 10px 12px;
}
.modal-content .form-control:focus { border-color: var(--accent-global); box-shadow: 0 0 0 2px rgba(106, 90, 205, 0.2); }
.form-control-lg { min-height: 50px; }
.form-control:disabled { background-color: #1a1a1a; color: #555; border-color: #222; }

/* Remove Spinners */
.no-spinner::-webkit-inner-spin-button, .no-spinner::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.no-spinner { -moz-appearance: textfield; }

/* StatTrak & Inputs */
.input-group-text { background-color: #0f0f0f; border-color: #333; }
.form-check-input { cursor: pointer; background-color: #333; border-color: #555; }
.form-check-input:checked { background-color: var(--accent-success); border-color: var(--accent-success); }

/* Keychain Box */
.charm-preview-box {
    width: 80px; height: 80px; background: #0a0a0a; border: 1px solid #333;
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 0;
}
.charm-preview-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }

/* --- USER PROFILE (TOP BAR) --- */
.user-avatar {
    width: 38px;
    height: 38px;
    border: 2px solid var(--accent-global);
    box-shadow: 0 0 10px rgba(106, 90, 205, 0.4);
    border-radius: 50%;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    line-height: 1.2;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.user-steamid {
    color: #888;
    font-size: 11px;
    font-family: monospace;
}