:root {
    --bg: #0d1117;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f23;
    --bg-input: #27272a;
    --border: #27272a;
    --text: #ecedef;
    --text-muted: #71717a;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #22c55e;
    --warning: #f5a524;
    --danger: #ef4444;
    --discount: #22c55e;
    --smurf: #f5a524;
    --radius: 14px;
    --radius-sm: 8px;
}

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

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; width: 100%; }

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 1rem;
}
.nav-content { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.nav-brand:hover { color: var(--primary); text-decoration: none; }
.nav-link.nav-telegram { color: #27a7e7; display: flex; align-items: center; gap: 0.3rem; }
.nav-link.nav-telegram:hover { color: #1d8cc7; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-form { display: inline; }
.btn-link { background: none; border: none; cursor: pointer; font: inherit; }
.balance { color: var(--success); font-weight: 600; margin-left: 0.25rem; }
.nav-discount {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--discount);
    background: rgba(34, 197, 94, 0.12);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}
.nav-discount svg { flex-shrink: 0; }
.cart-link { position: relative; display: flex; align-items: center; gap: 0.35rem; }
.cart-total { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.cart-total-original { font-size: 0.7rem; color: var(--text-muted); text-decoration: line-through; }
.badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}
.btn-primary-sm {
    background: var(--primary);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}
.btn-primary-sm:hover { background: var(--primary-hover); text-decoration: none; }

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-full { width: 100%; }
.btn-large { padding: 0.8rem 2rem; font-size: 1.1rem; }
.btn-checkout { margin-top: 1rem; }

/* Main content */
main { flex: 1; padding: 1.5rem 0; }

/* Home layout */
.home-layout { display: flex; flex-direction: column; gap: 1rem }

/* Filters */
.filters-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.filter-dropdown { position: relative; }
.filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
    padding: 0.25rem 0.75rem;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    gap: 1px;
}
.filter-btn::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-muted);
}
.filter-btn { padding-right: 1.75rem; }
.filter-btn:hover { background: #3f3f46; }
.filter-btn.active { background: var(--primary); color: #fff; }
.filter-btn.active::after { border-top-color: #fff; }
.filter-value { font-size: 0.65rem; opacity: 0.8; }

.filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid #3f3f46;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    min-width: 250px;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.filter-panel.open { display: block; }
.filter-panel-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.75rem; }
.filter-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.filter-panel input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: var(--bg-input);
    border: 1px solid #3f3f46;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
}
.filter-panel input:focus { outline: none; border-color: var(--primary); }
.filter-panel-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.filter-clear-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.4rem;
    background: transparent;
    border: none;
    color: var(--danger);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
}
.filter-clear-btn:hover { background: rgba(239, 68, 68, 0.1); }

.filter-options { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-option {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.filter-option:hover { background: var(--bg-input); }
.filter-option.selected { background: var(--primary); color: #fff; }

.filters-actions { display: flex; align-items: center; margin-left: auto; }
.clear-all-btn {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.clear-all-btn:hover { color: var(--text); background: var(--bg-input); }

/* Account grid */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* Account card */
.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.account-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-image { aspect-ratio: 16/9; overflow: hidden; background: #111; display: flex; align-items: center; justify-content: center; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image-placeholder { font-size: 1.5rem; font-weight: 700; color: var(--text-muted); }
.card-body { padding: 0.75rem; }
.card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1rem; margin-bottom: 0.5rem; }
.stat { display: flex; justify-content: space-between; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }
.stat-value { font-size: 0.85rem; font-weight: 600; }
.card-price { padding-top: 0.5rem; border-top: 1px solid var(--border); }

/* Badges */
.rank-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}
.rank-herald { background: rgba(120, 113, 108, 0.2); color: #a8a29e; }
.rank-guardian { background: rgba(168, 162, 158, 0.2); color: #a8a29e; }
.rank-crusader { background: rgba(163, 230, 53, 0.2); color: #a3e635; }
.rank-archon { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.rank-legend { background: rgba(250, 204, 21, 0.2); color: #facc15; }
.rank-ancient { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.rank-divine { background: rgba(192, 132, 252, 0.2); color: #c084fc; }
.rank-immortal { background: rgba(245, 65, 128, 0.2); color: #f54180; }
.smurf-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: rgba(245, 165, 36, 0.2);
    color: #f5a524;
}

/* Prices */
.price { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.price-large { font-size: 1.5rem; }
.price-original { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; margin-right: 0.5rem; }
.price-discounted { font-size: 1.1rem; font-weight: 700; color: var(--discount); }
.discount-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--discount);
    background: rgba(34, 197, 94, 0.15);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
}
.discount-col { color: var(--discount); font-weight: 600; }
.price-col { font-weight: 700; }

.btn-cart {
    width: 100%;
    padding: 0.6rem;
    background: rgba(59, 130, 246, 0.08);
    border: none;
    border-top: 1px solid var(--border);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 0.85rem;
}
.btn-cart:hover { background: var(--primary); color: #fff; }
.btn-cart-remove {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}
.btn-cart-remove:hover { background: var(--danger); color: #fff; }

/* Discount banner */
.discount-banner {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--discount);
}

/* Auth pages */
.auth-page { display: flex; justify-content: center; padding-top: 3rem; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}
.auth-card h2 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.form-group input {
    width: 100%;
    padding: 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.auth-alt { margin-top: 1rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--success); }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }

/* Account detail */
.account-detail { max-width: 900px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }
.detail-layout { display: flex; flex-direction: column; gap: 2rem; }
.detail-image > img { width: 100%; border-radius: var(--radius); }
.screenshot-thumbnails { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.thumbnail { flex: 1; min-width: 0; width: auto; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; opacity: 0.6; transition: opacity 0.2s, border-color 0.2s; }
.thumbnail:hover { opacity: 1; }
.thumbnail.active { border-color: var(--primary); opacity: 1; }
.detail-image-placeholder {
    height: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
}
.detail-header h1 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; flex-wrap: wrap; }
.detail-price { margin: 1rem 0; display: flex; align-items: center; }
.detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.detail-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
}

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 0.5rem; font-size: 0.8rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.cart-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.btn-remove:hover { color: #ff6666; }

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 70px;
}
.cart-summary h3 { margin-bottom: 1rem; }
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}
.discount-row { color: var(--discount); }
.total-row { font-size: 1.1rem; font-weight: 700; border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.5rem; }
.balance-row { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.discount-info {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--discount);
    background: rgba(34, 197, 94, 0.1);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

/* Profile */
.profile-page { max-width: 900px; margin: 0 auto; }
.profile-header { margin-bottom: 2rem; }
.profile-header h2 { margin-bottom: 1rem; }
.profile-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.info-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
}
.info-label { color: var(--text-muted); font-size: 0.85rem; }
.balance-large { color: var(--success); font-weight: 700; font-size: 1.1rem; }
.status-badge { font-weight: 700; text-transform: capitalize; }
.status-default { color: var(--text-muted); }
.status-improved { color: var(--primary); }
.status-completed { color: var(--success); }
.status-failed { color: var(--danger); }

.orders-section h3 { margin-bottom: 1rem; }
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}
.order-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.order-id { font-weight: 700; }
.order-date { color: var(--text-muted); flex: 1; }
.order-total { font-weight: 700; }
.order-items-table { width: 100%; border-collapse: collapse; }
.order-items-table th { text-align: left; padding: 0.4rem 1rem; font-size: 0.75rem; color: var(--text-muted); }
.order-items-table td { padding: 0.4rem 1rem; font-size: 0.85rem; border-top: 1px solid var(--border); }
.order-summary-row {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.order-item-credentials { padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
.credential-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; font-size: 0.85rem; }
.credential-account-id { font-weight: 600; color: var(--text); }
.credential-price { color: var(--accent); font-weight: 600; }
.credential-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.4rem;
    background: var(--bg);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
}
.purchase-credentials { margin-top: 1.5rem; }
.credentials-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.credentials-header h3 { font-size: 1rem; }
.credentials-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.credentials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.credential-cell { display: flex; flex-direction: column; gap: 0.25rem; }
.credential-label { color: var(--text-muted); font-size: 0.75rem; }
.credential-value {
    background: var(--bg-input);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text);
    border: 1px solid var(--border);
    user-select: all;
    word-break: break-all;
}
.credential-provider {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.credential-link { font-size: 0.85rem; word-break: break-all; }
.purchase-gallery { margin-top: 1.5rem; }
.purchase-gallery h3 { font-size: 1rem; margin-bottom: 0.75rem; }

.purchases-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.purchase-search {
    flex: 1;
    min-width: 180px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.85rem;
}
.purchase-search:focus { outline: none; border-color: var(--accent); }
.purchases-filters { display: flex; gap: 0.5rem; }
.purchase-filter {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
}
.purchases-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.selected-count { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.col-check { width: 36px; text-align: center; }
.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable:hover { color: var(--accent); }
.sort-arrow::after { content: ''; margin-left: 0.25rem; }
.sort-asc .sort-arrow::after { content: '\25B2'; font-size: 0.6rem; }
.sort-desc .sort-arrow::after { content: '\25BC'; font-size: 0.6rem; }

/* Deposit */
.deposit-page { max-width: 550px; margin: 0 auto; }
.deposit-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.deposit-card h2 { margin-bottom: 1rem; font-size: 1.2rem; }
.deposit-card h3 { margin-bottom: 0.75rem; font-size: 1rem; }
.deposit-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.deposit-info-label { color: var(--text-muted); }
.deposit-qr {
    text-align: center;
    margin: 1rem 0;
}
.deposit-qr img {
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0.5rem;
}
.deposit-address-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
}
.deposit-address {
    flex: 1;
    font-size: 0.8rem;
    background: var(--bg);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    word-break: break-all;
    border: 1px solid var(--border);
}
.deposit-amount-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
}
.deposit-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}
.deposit-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #f59e0b;
    margin: 1rem 0;
}
.deposit-countdown {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f59e0b;
    margin: 0.75rem 0;
}
.deposit-status-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}
.deposit-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.network-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}
.network-select { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.network-option input[type="radio"] { display: none; }
.network-option label {
    display: block;
    padding: 0.45rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
}
.network-option input:checked + label {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-copy {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn-copy:hover { color: var(--text); border-color: var(--accent); }
.status-pending { color: #f59e0b; }
.status-completed { color: #10b981; }
.status-expired { color: var(--text-muted); }
.tx-hash {
    font-size: 0.7rem;
    max-width: 120px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.txn-crypto_deposit { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.txn-deposit_pending { background: rgba(245, 165, 36, 0.15); color: var(--warning); }
.txn-deposit_completed { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.txn-deposit_expired { background: rgba(113, 113, 122, 0.15); color: var(--text-muted); }

/* Admin */
.admin-page { max-width: 1100px; margin: 0 auto; }
.admin-page h2 { margin-bottom: 1rem; }
.admin-page h3 { margin-bottom: 0.75rem; font-size: 1rem; }
.admin-create {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.admin-form-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.admin-form-row .form-group { flex: 1; min-width: 120px; margin-bottom: 0; }
.admin-form-row select {
    width: 100%;
    padding: 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 0.5rem 0.6rem; font-size: 0.75rem; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
.admin-table code { background: var(--bg-input); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.8rem; }
.admin-actions { display: flex; gap: 0.4rem; align-items: center; }
.inline-form { display: inline; }
.btn-sm { padding: 0.3rem 0.6rem; background: var(--primary); color: #fff; border: none; border-radius: 4px; font-size: 0.75rem; cursor: pointer; white-space: nowrap; }
.btn-sm:hover { background: var(--primary-hover); }
.btn-danger-sm { background: var(--danger); }
.btn-danger-sm:hover { background: #dc2626; }
.tier-badge { font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 6px; }
.tier-0 { background: rgba(113, 113, 122, 0.2); color: var(--text-muted); }
.tier-15 { background: rgba(59, 130, 246, 0.2); color: var(--primary); }
.tier-25 { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.admin-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.admin-tab {
    padding: 0.6rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.admin-tab:hover { color: var(--text); text-decoration: none; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-user-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-user-header h2 { margin: 0; }
.admin-user-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.admin-card h3 { font-size: 0.95rem; margin-bottom: 1rem; }
.admin-card select {
    width: 100%;
    padding: 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
}
.admin-info-list { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.admin-section { margin-bottom: 1.5rem; }
.admin-section h3 { margin-bottom: 0.75rem; }
.btn-danger-full {
    width: 100%;
    padding: 0.6rem 1.5rem;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-danger-full:hover { background: #dc2626; }
.status-badge-sm { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 6px; }
.status-badge-sm.active-user { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.status-badge-sm.banned { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.txn-type { font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 4px; text-transform: capitalize; }
.txn-deposit { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.txn-withdraw { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }
.btn-secondary {
    padding: 0.6rem 1.2rem;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-secondary:hover { background: #3f3f46; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .btn-primary { margin-top: 1rem; }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    object-fit: contain;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Toast */
#toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 0.75rem; }
    main { padding: 1rem 0; }

    /* Navbar */
    .nav-content { gap: 0.4rem; }
    .nav-links { gap: 0.4rem; flex-wrap: wrap; }
    .nav-brand { font-size: 1.05rem; }
    .nav-discount { padding: 0.15rem 0.4rem; font-size: 0.65rem; }
    .nav-link { font-size: 0.75rem; }
    .cart-total { font-size: 0.65rem; }
    .balance { font-size: 0.75rem; }
    .btn-primary-sm { padding: 0.3rem 0.7rem; font-size: 0.75rem; }

    /* Filters */
    .filters-bar {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.5rem;
        padding-bottom: 0.25rem;
    }
    .filters-bar::-webkit-scrollbar { display: none; }
    .filter-dropdown { flex-shrink: 0; }
    .filter-btn { min-width: 90px; height: 36px; font-size: 0.7rem; padding: 0.2rem 1.5rem 0.2rem 0.6rem; }
    .filter-panel { min-width: 220px; left: auto; right: 0; }
    .filter-dropdown:first-child .filter-panel { left: 0; right: auto; }
    .filters-actions { flex-shrink: 0; }
    .clear-all-btn { font-size: 0.7rem; padding: 0.3rem 0.5rem; white-space: nowrap; }

    /* Account grid */
    .account-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
    .card-body { padding: 0.5rem; }
    .card-stats { gap: 0.15rem 0.5rem; }
    .stat-label { font-size: 0.65rem; }
    .stat-value { font-size: 0.75rem; }
    .btn-cart { padding: 0.5rem; font-size: 0.75rem; }

    /* Account detail */
    .account-detail { margin: 0; }
    .detail-header h1 { font-size: 1.2rem; }
    .detail-stats { grid-template-columns: 1fr 1fr; }
    .detail-stat { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
    .thumbnail { min-width: 0; }
    .btn-large { padding: 0.7rem 1.5rem; font-size: 1rem; }

    /* Cart */
    .cart-layout { grid-template-columns: 1fr; }
    .cart-items { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cart-table { min-width: 600px; }
    .cart-table th { font-size: 0.7rem; padding: 0.4rem; }
    .cart-table td { font-size: 0.8rem; padding: 0.5rem 0.4rem; }
    .cart-summary { position: static; }

    /* Profile */
    .profile-page { margin: 0; }
    .profile-header h2 { font-size: 1.2rem; }
    .profile-info { grid-template-columns: 1fr; }
    .info-item { padding: 0.6rem; font-size: 0.85rem; }
    .order-header { flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; padding: 0.6rem 0.75rem; }
    .order-items-table th { font-size: 0.65rem; padding: 0.3rem 0.5rem; }
    .order-items-table td { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
    .order-summary-row { flex-wrap: wrap; gap: 0.75rem; font-size: 0.75rem; padding: 0.4rem 0.75rem; }
    .orders-section .order-card { overflow-x: auto; }
    .credential-fields { grid-template-columns: 1fr; }
    .credential-header { font-size: 0.8rem; gap: 0.5rem; }
    .order-item-credentials { padding: 0.5rem 0.75rem; }

    /* Purchases toolbar */
    .purchases-toolbar { flex-direction: column; align-items: stretch; }
    .purchase-search { min-width: 0; }
    .purchases-filters { flex-wrap: wrap; }
    .purchases-actions { margin-left: 0; justify-content: flex-start; }

    /* Deposit */
    .deposit-page { max-width: 100%; }
    .deposit-amount { font-size: 1.3rem; }
    .deposit-countdown { font-size: 1.2rem; }
    .deposit-card { padding: 1rem; }

    /* Auth */
    .auth-page { padding-top: 1.5rem; }
    .auth-card { padding: 1.25rem; }
    .auth-card h2 { font-size: 1.2rem; }

    /* Admin */
    .admin-user-grid { grid-template-columns: 1fr; }
    .admin-form-row { flex-direction: column; gap: 0.75rem; }
    .admin-form-row button { width: 100%; }
    .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table { min-width: 600px; }
    .admin-table th, .admin-table td { font-size: 0.75rem; padding: 0.4rem; }
    .modal-card { width: 95%; margin: 1rem; }

    /* General */
    .empty-state { padding: 2rem 0.5rem; }
    .alert { font-size: 0.8rem; padding: 0.6rem 0.75rem; }
}

@media (max-width: 400px) {
    .nav-links { gap: 0.3rem; }
    .nav-brand { font-size: 0.95rem; }
    .nav-link { font-size: 0.7rem; }
    .balance { display: none; }
    .cart-total { display: none; }
    .account-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .detail-stats { grid-template-columns: 1fr; }
    .detail-header h1 { font-size: 1rem; }
    .price-large { font-size: 1.2rem; }
}
