:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --hold-color: #8b5cf6;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-color);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--hold-color);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.date-subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
}

.btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.success-icon { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.error-icon { background: rgba(239, 68, 68, 0.1); color: var(--error-color); }
.hold-icon { background: rgba(139, 92, 246, 0.1); color: var(--hold-color); }
.balance-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }

.card-info h3 {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value {
    font-size: 1.8rem;
    font-weight: 700;
}

.sub-value {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

.section-mini-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    opacity: 0.8;
    display: block;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.skins-list {
    list-style: none;
}

.skins-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skins-list li:last-child {
    border-bottom: none;
}

.skin-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.skin-acc {
    font-size: 0.8rem;
    color: #94a3b8;
}

.skin-price {
    font-weight: 700;
    color: var(--success-color);
}

.log-container {
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
}

.log-entry {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.badge {
    background: var(--error-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    vertical-align: middle;
}

.badge-success {
    background: var(--success-color);
}

.dashboard-section {
    margin-bottom: 2rem;
    display: block;
}

.dashboard-section:last-child {
    margin-bottom: 0;
}

.loading-state, .error-state {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: var(--accent-color);
}
.login-logo svg { width: 100%; height: 100%; }

.login-title {
    font-size: 22px !important;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 28px;
}

.input-group input {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 15px;
    font-family: inherit;
    padding: 12px 16px;
    outline: none;
    transition: border-color .2s;
}
.input-group input:focus { border-color: var(--accent-color); }
.input-group input::placeholder { color: #94a3b8; }

.error-msg {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 8px;
    text-align: left;
}
.error-msg.hidden { display: none; }

.login-card button[type=submit] {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .2s;
}
.login-card button[type=submit]:hover    { opacity: .88; }
.login-card button[type=submit]:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
    .login-card { padding: 32px 20px; }
}

/* Chart Interval Buttons */
.btn-chart-interval {
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-chart-interval:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.btn-chart-interval.active {
    background: var(--accent-color) !important;
    color: #fff !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4) !important;
}

/* Domain Selector Tabs */
.domain-tabs-container {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 2rem;
    align-items: center;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    justify-content: center;
}

.domain-tab {
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.domain-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.domain-tab.active {
    color: #fff;
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

