:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #10b981;
    --secondary-glow: rgba(16, 185, 129, 0.3);
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --border: rgba(255, 255, 255, 0.08);
    --sidebar-width: 280px;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

/* Layout Containers */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Glassmorphism */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

/* Tools Box */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.tool-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* Inputs & Buttons */
input, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Token List Improvements */
.token-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.token-card.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

/* Log Box */
.log-box {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    height: 180px;
    overflow-y: auto;
    color: #4ade80;
}

.log-line { margin-bottom: 0.25rem; }
.log-line.error { color: var(--error); }
.log-line.info { color: var(--primary); }

/* QR Section */
.qr-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 20px;
    display: inline-block;
    margin: 1.5rem 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    h1 { font-size: 1.8rem; }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-panel {
        padding: 1.5rem;
    }
}

/* Sidebar Placeholder (For future use) */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border);
    padding: 2rem;
    display: none; /* Shown on desktop in next steps */
}

@media (min-width: 1024px) {
    /* .sidebar { display: block; } */
}

/* Center card for login */
.center-card-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.center-card {
    max-width: 480px;
    width: 100%;
}
