* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f1419;
    color: #fff;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #764ba2;
    font-weight: 700;
    font-size: 18px;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-text span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

#lastUpdate {
    font-size: 0.85rem;
    opacity: 0.8;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.error {
    background: #f87171;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-value.green { color: #4ade80; }
.stat-value.blue { color: #60a5fa; }
.stat-value.purple { color: #a78bfa; }

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Chains */
.chains-section h3,
.activity-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.chains-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chain-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.chain-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2);
}

.chain-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.chain-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.chain-icon.eth { background: #627eea; }
.chain-icon.bsc { background: #f3ba2f; color: #000; }
.chain-icon.polygon { background: #8247e5; }
.chain-icon.arbitrum { background: #28a0f0; }
.chain-icon.solana { background: linear-gradient(135deg, #9945ff, #14f195); }
.chain-icon.base { background: #0052ff; }

.chain-name {
    font-weight: 600;
}

.chain-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.chain-status.syncing {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.chain-status.synced {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.chain-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.chain-stat {
    font-size: 0.85rem;
}

.chain-stat-label {
    color: #9ca3af;
    display: block;
}

.chain-stat-value {
    font-weight: 600;
    color: #fff;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s;
}

/* Activity */
.activity-section {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.activity-log {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.activity-icon.success { background: rgba(74, 222, 128, 0.2); }
.activity-icon.pending { background: rgba(250, 204, 21, 0.2); }
.activity-icon.error { background: rgba(248, 113, 113, 0.2); }

.activity-text {
    flex: 1;
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .chains-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .chains-grid { grid-template-columns: 1fr; }
    .nav-content { flex-direction: column; gap: 1rem; }
}


/* Login Modal */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: #1a1f2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.login-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
}

.login-box button {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-box button:hover {
    opacity: 0.9;
}

.login-box .error {
    color: #f87171;
    font-size: 0.85rem;
    margin-top: 1rem;
}
