:root {
    --bg: #1a1a2e;
    --bg-2: #16213e;
    --card: #0f3460;
    --side: #121832;
    --primary: #6c5ce7;
    --primary-2: #a855f7;
    --cyan: #00d2d3;
    --green: #00b894;
    --yellow: #fdcb6e;
    --red: #e17055;
    --text: #ffffff;
    --muted: #a0a0b0;
    --line: rgba(255,255,255,.1);
    --glass: rgba(255,255,255,.05);
    --shadow: 0 8px 32px rgba(0,0,0,.3);
    --radius: 16px;
    --side-w: 250px;
    --chat-w: 320px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #0e1224; }
body {
    margin: 0;
    padding: 0 !important;
    color: var(--text);
    font-family: Inter, "Segoe UI", sans-serif;
    font-weight: 400;
    background: #0e1224 !important;
    min-height: 100vh;
}
body.layout-main, body.layout-admin, body.layout-auth { padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }
::-webkit-scrollbar-thumb { background: rgba(108,92,231,.5); border-radius: 3px; }

.app-window {
    height: 100vh;
    width: 100%;
    margin: 0;
    background: #0e1224;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 0 !important;
}
.float-gem, .float-cash { display: none !important; }

.topbar {
    height: 68px; flex: 0 0 68px;
    display: flex; align-items: center; gap: 18px;
    padding: 0 16px;
    background: rgba(10,12,24,.72);
    border-bottom: 0;
    position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; min-width: 180px; }
.brand img { width: 42px; height: 32px; border-radius: 0; object-fit: contain; background: transparent; }
.brand em { font-style: normal; color: #c4b5fd; }
.top-stats { display: flex; gap: 14px; color: var(--muted); font-size: 12px; font-weight: 500; }
.top-stats i { color: var(--cyan); margin-right: 4px; }
.top-links { display: flex; gap: 16px; margin-left: auto; font-size: 14px; color: #d5d5e6; font-weight: 600; }
.top-links a:hover { color: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-search {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.05);
    border: 0;
    border-radius: 12px; padding: 8px 12px; min-width: 220px;
}
.top-search input { background: transparent; border: 0; outline: 0; width: 100%; font-size: 13px; }
.balance-pill, .btn-deposit, .btn-primary-gradient, .btn-ghost, .icon-btn, .user-chip {
    border: 0; border-radius: 12px; transition: all .3s ease; cursor: pointer;
}
.balance-pill {
    background: rgba(0,184,148,.15); color: #7dffe2; padding: 8px 12px; font-weight: 700; font-size: 13px;
}
.btn-deposit {
    background: linear-gradient(135deg, #00b894, #00d2d3); color: #042; font-weight: 800; padding: 9px 14px;
}
.btn-deposit:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,210,211,.35); }
.btn-primary-gradient {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: white; font-weight: 700; padding: 10px 18px; border-radius: 12px;
}
.btn-primary-gradient:hover { box-shadow: 0 4px 20px rgba(108,92,231,.5); transform: translateY(-2px); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; padding: 9px 14px; font-weight: 700; }
.icon-btn, .user-chip { background: rgba(255,255,255,.05); color: #fff; height: 40px; }
.icon-btn { width: 40px; position: relative; }
.icon-btn em {
    position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff;
    border-radius: 99px; font-style: normal; font-size: 10px; min-width: 16px; padding: 1px 4px;
}
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; font-weight: 700; }
.user-chip img, .chat-item img, .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.chat-toggle { display: none; }

.app-body { flex: 1; display: flex; min-height: 0; }
.sidebar-left, .sidebar-right {
    background: var(--side); overflow: auto; flex: 0 0 auto;
}
.sidebar-left { width: var(--side-w); border: 0; padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 12px; }
.sidebar-right { width: var(--chat-w); border: 0; display: flex; flex-direction: column; }
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: rgba(255,255,255,.04); padding: 4px; border-radius: 14px; }
.side-tabs a { text-align: center; padding: 8px; border-radius: 11px; font-weight: 700; font-size: 13px; color: var(--muted); }
.side-tabs a.on { background: linear-gradient(135deg, #6c5ce7, #a855f7); color: #fff; }
.sidebar-menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
    color: #c8c8d8; font-weight: 600; font-size: 14px; border: 0;
}
.menu-item i { width: 18px; text-align: center; color: #9a97b5; }
.menu-item:hover { background: rgba(255,255,255,.04); }
.sidebar-menu .menu-item.active {
    background: rgba(108,92,231,.2); border: 0; color: #fff;
}
.sidebar-menu .menu-item.active i { color: #c4b5fd; }
.badge-new, .badge-hot, .badge-admin {
    margin-left: auto; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 800; color: #fff;
}
.badge-new { background: linear-gradient(135deg, #00b894, #00d2d3); }
.badge-hot { background: linear-gradient(135deg, #e17055, #d63031); }
.badge-admin { background: linear-gradient(135deg, #6c5ce7, #a855f7); margin-left: 6px; }
.side-promo {
    position: relative; overflow: hidden; border-radius: 16px; padding: 14px;
    background: linear-gradient(160deg, #6d4cff, #b06bff); min-height: 148px; display: block;
}
.side-promo small { letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.side-promo strong { display: block; margin: 6px 0; max-width: 130px; }
.side-promo span { display: inline-block; background: #fff; color: #4c1d95; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.side-promo img { position: absolute; width: 92px; height: 92px; object-fit: cover; border-radius: 16px; right: 8px; bottom: 8px; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; }
.side-bottom a:hover { color: #fff; }

.content { flex: 1; overflow: auto; padding: 18px; min-width: 0; }
.hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 230px; background: linear-gradient(100deg, #5b4dff 0%, #8b5cf6 55%, #c084fc 100%); box-shadow: var(--shadow); }
.hero-slide { display: none; padding: 28px; min-height: 230px; position: relative; }
.hero-slide.on { display: block; }
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -.04em; margin: 8px 0; max-width: 560px; }
.hero p { color: rgba(255,255,255,.86); max-width: 460px; }
.hero-kicker { display: inline-block; background: #fff; color: #5b21b6; font-weight: 800; border-radius: 10px; padding: 4px 8px; font-size: 12px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hero-actions a { background: rgba(18,16,40,.35); border: 0; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 13px; }
.hero-art { position: absolute; right: 18px; bottom: 0; width: 250px; height: 230px; object-fit: cover; border-radius: 20px 20px 0 0; mask-image: linear-gradient(180deg, #000 70%, transparent); }
.cat-row, .stats-row, .steps, .product-grid, .mini-grid { display: grid; gap: 12px; }
.cat-row { grid-template-columns: repeat(4, 1fr); margin: 14px 0; }
.cat-card, .glass-card, .feature-card, .stat-card, .step-card, .product-card {
    background: var(--glass); backdrop-filter: blur(10px); border: 0; border-radius: 16px; box-shadow: none;
}
.cat-card { display: flex; gap: 12px; align-items: center; padding: 14px; transition: all .3s ease; }
.cat-card:hover, .product-card:hover, .feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(108,92,231,.3); }
.cat-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(108,92,231,.25); color: #ddd6fe; }
.cat-card strong { display: block; }
.cat-card span, .muted, .pc-meta, .site-footer p, .site-footer small { color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.section-head h1, .section-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.h-scroll { display: flex; gap: 12px; overflow: auto; padding-bottom: 6px; }
.feature-card { min-width: 240px; padding: 14px; }
.feature-card b { font-size: 18px; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tabs a, .filter-tabs button {
    background: rgba(255,255,255,.04); border: 0; color: var(--muted);
    border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px;
}
.filter-tabs a.on, .filter-tabs button.on { background: linear-gradient(135deg, #6c5ce7, #a855f7); color: #fff; border-color: transparent; }
.product-grid { grid-template-columns: repeat(6, 1fr); }
.product-card { overflow: hidden; transition: all .3s ease; }
.cover { position: relative; display: block; min-height: 148px; padding: 14px; color: #fff; }
.cover strong { position: relative; z-index: 1; display: block; margin-top: 18px; font-size: 18px; line-height: 1.15; }
.cover-kicker { position: relative; z-index: 1; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cover-bg-icon { position: absolute; right: 8px; bottom: 6px; font-size: 64px; opacity: .18; }
.fav { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.25); }
.fav.on { color: #fb7185; }
.cover .badge-hot { position: absolute; top: 12px; left: 12px; }
.cover-violet { background: linear-gradient(160deg, #6d28d9, #db2777); }
.cover-cyan { background: linear-gradient(160deg, #0891b2, #4f46e5); }
.cover-orange { background: linear-gradient(160deg, #ea580c, #f59e0b); }
.cover-pink { background: linear-gradient(160deg, #db2777, #fb7185); }
.cover-green { background: linear-gradient(160deg, #059669, #22c55e); }
.cover-gold { background: linear-gradient(160deg, #a16207, #facc15); color: #1a1203; }
.cover-red { background: linear-gradient(160deg, #be123c, #fb7185); }
.cover-blue { background: linear-gradient(160deg, #1d4ed8, #38bdf8); }
.pc-body { padding: 12px; }
.pc-body h3 { font-size: 14px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.pc-meta, .pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }
.pc-foot { margin-top: 8px; }
.pc-foot b { color: #fff; font-size: 14px; }
.stars { color: var(--yellow); letter-spacing: 1px; font-size: 11px; }
.tx-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tx-table th, .data-table th { color: var(--muted); font-weight: 600; text-align: left; padding: 8px; }
.tx-table td, .data-table td { padding: 10px 8px; border: 0; }
.stats-row { grid-template-columns: repeat(3, 1fr); }
.stat-card, .step-card { padding: 16px; }
.stat-card strong { display: block; font-size: 26px; }
.steps { grid-template-columns: repeat(4, 1fr); }
.step-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(108,92,231,.3); font-weight: 800; margin-bottom: 8px; }
.site-footer { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-top: 22px; padding-top: 16px; border: 0; font-size: 13px; }
.site-footer a { display: block; color: var(--muted); margin: 4px 0; }
.site-footer small { grid-column: 1 / -1; }

.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 0; }
.lang-switch { display: flex; gap: 4px; background: rgba(255,255,255,.04); padding: 3px; border-radius: 10px; }
.lang-switch a { padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--muted); }
.lang-switch a.on { background: #6c5ce7; color: #fff; }
.online-count { font-size: 13px; color: var(--muted); }
.online-indicator { width: 8px; height: 8px; background: #00b894; border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }
.chat-stream { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.chat-item { display: flex; gap: 8px; font-size: 13px; }
.chat-item.highlight { background: rgba(108,92,231,.16); border: 0; border-radius: 10px; padding: 6px; }
.chat-name { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chat-name time, .chat-item p { color: var(--muted); margin: 0; font-weight: 400; }
.chat-form { display: flex; gap: 8px; padding: 10px; border: 0; }
.chat-form input, .field input, .field select, .field textarea, .ha-input {
    width: 100%; background: rgba(255,255,255,.04); border: 0; border-radius: 12px; padding: 10px 12px; outline: none;
}
.chat-form button { width: 42px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #00b894, #00d2d3); color: #042; }
.chat-login { margin: 10px; text-align: center; color: var(--muted); }

.flash { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px; margin: 18px 0; background: rgba(255,255,255,.05); border: 0; }
.flash-success { background: rgba(0,184,148,.16); }
.flash-error { background: rgba(225,112,85,.16); }
.note-menu, .user-menu { background: #17182c; border: 0; border-radius: 14px; min-width: 280px; padding: 8px; }
.note-item, .user-menu .dropdown-item { display: flex; gap: 8px; color: #fff; border-radius: 10px; padding: 8px; }
.note-item small, .note-empty { display: block; color: var(--muted); }
.note-item.unread { background: rgba(108,92,231,.15); }
.user-menu .dropdown-item:hover, .note-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.note-all { display: block; text-align: center; color: #c4b5fd; padding: 8px; font-weight: 700; }
.ha-modal { background: #17182c; color: #fff; border-radius: 16px; border: 0; }
.method-grid { display: grid; gap: 8px; }
.method-grid a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
.method-grid i { grid-row: 1 / span 2; align-self: center; color: #c4b5fd; }
.empty-state, .error-card { text-align: center; padding: 40px 16px; }
.error-card h1 { font-size: 24px; font-weight: 800; margin: 8px 0; }
.empty-state i, .error-card i { font-size: 32px; color: #c4b5fd; }
.pager { display: flex; gap: 6px; margin-top: 14px; }
.pager a { min-width: 34px; text-align: center; padding: 6px; border-radius: 10px; background: rgba(255,255,255,.05); }
.pager a.on { background: #6c5ce7; }
.form-grid, .split { display: grid; gap: 14px; }
.form-grid { grid-template-columns: 1.4fr .8fr; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.glass-card { padding: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 8px; font-size: 12px; background: rgba(255,255,255,.08); }
.pill.ok { background: rgba(0,184,148,.18); color: #7dffe2; }
.pill.wait { background: rgba(253,203,110,.15); color: #ffe7a3; }
.pill.bad { background: rgba(225,112,85,.18); color: #ffc7b8; }
.level-platinum { color: #e9d5ff; }
.level-gold { color: #fde68a; }
.level-silver { color: #e5e7eb; }
.level-bronze { color: #fdba74; }
