:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-cyan: #00f0ff;
    --accent-purple: #b026ff;
    --accent-blue: #3b82f6;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --glass-bg: rgba(17, 24, 39, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 240, 255, 0.1), transparent 40%),
                radial-gradient(circle at 70% 70%, rgba(176, 38, 255, 0.08), transparent 40%);
    z-index: -1;
    pointer-events: none;
    animation: pulseBg 10s infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

#app {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--neon-glow);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
.dashboard-header {
    margin-bottom: 24px;
    position: relative;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

.dashboard-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.badge-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(5px);
}

.badge-standard {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-premium {
    background: rgba(176, 38, 255, 0.1);
    color: #e879f9;
    border: 1px solid rgba(176, 38, 255, 0.4);
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.2);
}

.badge-credits {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.tabs::-webkit-scrollbar {
    display: none; /* Chrome */
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.1));
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.count-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.empty-icon {
    font-size: 48px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Wallet Card */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wallet-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--accent-blue);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: slideUp 0.4s ease forwards;
}

.wallet-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wallet-label {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.network-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.network-icon.tron { color: #eb0029; background: rgba(235, 0, 41, 0.1); }
.network-icon.ethereum { color: #627eea; background: rgba(98, 126, 234, 0.1); }

.status-indicator {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-clean {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-blacklisted {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.wallet-address {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
    border-radius: 8px;
    word-break: break-all;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.wallet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    padding: 6px;
    border-radius: 6px;
}

.delete-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Forms */
.form-container {
    padding: 24px;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    margin-top: 8px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(176, 38, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(176, 38, 255, 0.4);
    filter: brightness(1.1);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-scan {
    background: linear-gradient(135deg, #00f0ff, #0080ff);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-scan:hover {
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
    filter: brightness(1.1);
}

.btn-block {
    width: 100%;
}

/* Admin Dashboard Elements */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.stat-card i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--accent-purple);
}

.stat-card .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.admin-section {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    margin-top: 20px;
}

.admin-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scan Results Rich Dashboard */
.scan-result-card {
    margin-top: 24px;
    background: transparent;
    border: none;
    padding: 0;
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.result-section h3 {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.balance-asset {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.balance-amount {
    font-family: monospace;
    font-size: 14px;
}

/* Lists for Connections and Txs */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
}

.data-row-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.data-row-body {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 8px;
    border-radius: 6px;
    word-break: break-all;
}

/* Premium Lock Overlay */
.premium-lock {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.premium-lock i {
    font-size: 32px;
    color: var(--accent-purple);
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(176, 38, 255, 0.5));
}

.premium-lock h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.premium-lock p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-upgrade {
    background: linear-gradient(135deg, rgba(176, 38, 255, 0.2), rgba(176, 38, 255, 0.1));
    border: 1px solid var(--accent-purple);
    color: #e879f9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* --- ADMIN ENHANCEMENTS (CARD REDESIGN) --- */
.admin-sub-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.sub-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sub-tab-btn.active {
    background: var(--glass-bg);
    color: var(--accent-cyan);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.search-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 12px 12px 45px;
    color: white;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.admin-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

.admin-user-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-user-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.admin-user-card:active {
    transform: scale(0.98);
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.user-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.user-id {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.user-id i {
    font-size: 10px;
    opacity: 0.6;
}

.user-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.user-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.card-stat {
    text-align: center;
}

.stat-val {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.stat-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.user-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-mini {
    padding: 10px;
    font-size: 13px;
    border-radius: 10px;
    width: 100%;
}

.method-grant { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.method-paid { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-admin { background: rgba(0, 240, 255, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0,240,255,0.4); }

@media (min-width: 601px) {
    .admin-user-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
