/* ===== DSO Account Value - Dark Fantasy Theme ===== */
:root {
    --bg-dark:    #0a0a14;
    --bg-card:    #12122a;
    --bg-card2:   #1a1a35;
    --bg-input:   #0f0f22;
    --gold:       #c9a84c;
    --gold-light: #f0d080;
    --gold-dark:  #8a6f2e;
    --red:        #e63946;
    --blue:       #4a90e2;
    --green:      #2ecc71;
    --text:       #e0e0e0;
    --text-muted: #7a7a9a;
    --border:     #2a2a4a;
    --shadow:     rgba(0,0,0,0.5);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at top, rgba(100,60,200,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(200,100,50,0.06) 0%, transparent 60%);
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, #0d0d20 0%, #1a1030 100%);
    border-bottom: 2px solid var(--gold-dark);
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(201,168,76,0.5);
    letter-spacing: 1px;
}

.navbar-brand img { height: 40px; }
.navbar-brand span { color: var(--text); font-weight: 300; }

.discord-nav-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    background: #5865F2; color: #fff !important; font-size: .8rem; font-weight: 700;
    padding: .28rem .65rem; border-radius: 6px; text-decoration: none !important;
    transition: background .2s, transform .15s; white-space: nowrap; margin-left: .6rem;
}
.discord-nav-btn:hover { background: #4752c4; transform: translateY(-1px); }
.discord-nav-btn svg { flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--text); font-size: 0.95rem; padding: 0.4rem 0.8rem; border-radius: 6px; transition: all 0.2s; }
.nav-links a:hover { background: rgba(201,168,76,0.15); color: var(--gold); }
.nav-links a.active { color: var(--gold); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0a14;
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0a0a14;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--gold);
}
.btn-outline:hover { background: rgba(201,168,76,0.15); }

.btn-danger {
    background: linear-gradient(135deg, #8b0000, var(--red));
    color: white;
}
.btn-danger:hover { filter: brightness(1.15); transform: translateY(-1px); }

.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; padding: 0.75rem; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: border-color 0.2s;
}

.card:hover { border-color: var(--gold-dark); }

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; color: var(--text-muted); font-size: 0.9rem; }

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-control option { background: var(--bg-card); }

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 5rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(201,168,76,0.4);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* ===== STATS SECTION ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
}

.stat-card .stat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ===== ITEM CARDS ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.item-card {
    background: var(--bg-card2);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.item-card:hover { border-color: var(--gold-dark); transform: translateY(-2px); }
.item-card.selected { border-color: var(--gold); background: rgba(201,168,76,0.1); }

.item-card .check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--gold);
    color: #000;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
}

.item-card.selected .check-badge { display: flex; }

.item-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 0.6rem;
    display: block;
    border-radius: 8px;
}

.item-card .item-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.item-card .item-price { font-size: 0.9rem; color: var(--gold); font-weight: 700; }

/* ===== SHARE CARD ===== */
.share-card {
    background: linear-gradient(135deg, #0d0d20 0%, #1a0d35 50%, #0d1a20 100%);
    border: 2px solid var(--gold-dark);
    border-radius: 16px;
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 10px 50px rgba(0,0,0,0.7), 0 0 30px rgba(201,168,76,0.1);
}

.share-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.character-avatar {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--gold-dark), #2a1a50);
    border: 3px solid var(--gold-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
}

.character-info h2 { font-size: 1.6rem; color: var(--gold); }
.character-info p { color: var(--text-muted); margin-top: 0.3rem; }

.value-badge {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #000;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 1.5rem 0;
}

.value-badge .value-label { font-size: 0.85rem; font-weight: 700; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }
.value-badge .value-amount { font-size: 2.5rem; font-weight: 900; }

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th {
    background: var(--bg-card2);
    color: var(--gold);
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--gold-dark);
}

table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

table tr:hover td { background: rgba(255,255,255,0.03); }

table img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; }

/* ===== ALERTS ===== */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.alert-success { background: rgba(46,204,113,0.1); border-color: var(--green); color: #2ecc71; }
.alert-error   { background: rgba(230,57,70,0.1);  border-color: var(--red);   color: var(--red); }
.alert-info    { background: rgba(74,144,226,0.1); border-color: var(--blue);  color: var(--blue); }

/* ===== ADMIN SIDEBAR ===== */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-title {
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 1.5rem;
    margin-bottom: 0.8rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
    background: rgba(201,168,76,0.08);
    color: var(--gold);
    border-right-color: var(--gold);
}

.admin-content { flex: 1; padding: 2rem; overflow: auto; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-content { padding: 2rem 0; }

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-gold    { background: rgba(201,168,76,0.2);  color: var(--gold); }
.badge-green   { background: rgba(46,204,113,0.2);  color: var(--green); }
.badge-red     { background: rgba(230,57,70,0.2);   color: var(--red); }

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.auth-box h1 {
    font-size: 1.6rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 0.4rem;
}

.auth-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ===== DIVIDER ===== */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ===== CATEGORY TABS ===== */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.cat-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    border: 1px solid var(--border);
    background: var(--bg-card2);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.cat-tab:hover { border-color: var(--gold-dark); color: var(--gold); }
.cat-tab.active { border-color: var(--gold); background: rgba(201,168,76,0.15); color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar { padding: 0.8rem 1rem; }
    .hero h1 { font-size: 2rem; }
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease; }

.total-value-bar {
    background: linear-gradient(135deg, var(--bg-card), #1a0d35);
    border: 1px solid var(--gold-dark);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.total-value-bar .total-label { color: var(--text-muted); font-size: 0.9rem; }
.total-value-bar .total-amount { font-size: 1.8rem; font-weight: 900; color: var(--gold); }

/* ===== LANGUAGE DROPDOWN ===== */
.lang-dd { position: relative; }
.lang-dd-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(255,255,255,.05); border: 1px solid var(--border);
    border-radius: 20px; padding: .3rem .75rem; font-size: .82rem; font-weight: 700;
    color: var(--text); cursor: pointer; white-space: nowrap; transition: border-color .2s;
}
.lang-dd-btn:hover { border-color: var(--gold-dark); color: var(--gold); }
.lang-dd-list {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--bg-card); border: 1px solid var(--gold-dark); border-radius: 10px;
    min-width: 140px; z-index: 999; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.lang-dd.open .lang-dd-list { display: block; }
.lang-dd-list a {
    display: block; padding: .45rem .9rem; font-size: .85rem; color: var(--text);
    text-decoration: none; transition: background .15s, color .15s;
}
.lang-dd-list a:hover { background: rgba(201,168,76,.12); color: var(--gold); }
.lang-dd-list a.lang-dd-active { color: var(--gold); background: rgba(201,168,76,.08); font-weight: 700; }

/* ===== RTL OVERRIDES ===== */
[dir="rtl"] .alert { border-left: none; border-right: 4px solid; }
[dir="rtl"] .sidebar a { border-right: none; border-left: 3px solid transparent; }
[dir="rtl"] .sidebar a:hover,
[dir="rtl"] .sidebar a.active { border-left-color: var(--gold); border-right-color: transparent; }
[dir="rtl"] .sidebar { border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .game-section-title,
[dir="rtl"] .game-block-title { border-left: none; border-right: 4px solid var(--gold); border-radius: 8px 0 0 8px; }
[dir="rtl"] body { font-family: 'Segoe UI', Tahoma, 'Arial', sans-serif; }
