/* GLOBAL RESETS */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

/* HEADER */
header {
    background-color: #fff;
    border-bottom: 2px solid #00CCCC;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.alert-shutdown {
    background-color: #ffcc00;
    color: #333;
    text-align: center;
    padding: 8px 0;
    font-weight: bold;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6em;
    font-weight: 800;
    color: #00CCCC;
    letter-spacing: -0.5px;
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.2s;
}

nav a:hover {
    color: #00CCCC;
}

/* LAYOUT */
main.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    padding: 30px;
    max-width: 1400px;
    margin: auto;
}

.full-width {
    grid-column: 1 / -1;
}

.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #eee;
    padding: 25px;
    transition: transform 0.2s;
}

.card h2 {
    margin-top: 0;
    font-size: 1.2em;
    color: #222;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* MARKET STATS */
.stat-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: #fcfcfc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.stat-label {
    font-size: 0.8em;
    color: #888;
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.stat-detail { font-size: 0.9em; font-weight: 600; margin-top: 5px; }
.up { color: #00C853; }
.down { color: #D50000; }
.chart-container { height: 120px; width: 100%; }

/* NETWORK GRID */
.network-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-box {
    text-align: center;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-box.large { grid-column: span 2; background-color: #f0fdfd; border-color: #d1eeee; }

.metric-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #00CCCC;
    margin: 10px 0;
}

/* TABLES & LISTS */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Forces scroll on small mobile */
}

th {
    text-align: left;
    padding: 12px 15px;
    background-color: #f8f9fa;
    color: #666;
    font-weight: 600;
    font-size: 0.9em;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Specific Table Styles */
.l2-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 0.95em;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.l2-summary-item span { font-weight: bold; color: #00CCCC; }

/* Buttons & Tags */
.btn-small {
    background-color: #00CCCC;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-small:hover { background-color: #00b3b3; }

.tag-whale {
    background-color: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    border: 1px solid #ffeeba;
}

.addr-text {
    font-family: monospace;
    background: #f1f1f1;
    padding: 2px 5px;
    border-radius: 3px;
    color: #555;
    font-size: 0.9em;
}

.live-badge {
    color: red;
    font-size: 0.8em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

footer {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 0.9em;
}

footer a { color: #00CCCC; text-decoration: none; }

/* MOBILE RESPONSIVE */
@media (max-width: 1000px) {
    main.dashboard-grid { grid-template-columns: 1fr; padding: 15px; }
    .network-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .header-content { flex-direction: column; gap: 15px; }
    nav a { margin: 0 10px; }
}
