:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --card-border: rgba(48, 54, 61, 0.5);
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    
    --status-online: #2ea043;
    --status-offline: #f85149;
    --status-syncing: #d29922;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 2rem;
}

/* Glassmorphism */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.dashboard-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2rem;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.header-icon {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Summary Bar */
.summary-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.summary-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.summary-badge.online { color: var(--status-online); }
.summary-badge.offline { color: var(--status-offline); }
.summary-badge.syncing { color: var(--status-syncing); }

/* Node Cards */
.node-card {
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.node-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(139, 148, 158, 0.4);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.node-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.node-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.node-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0;
}

.node-type-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    display: inline-block;
}

/* Status Indicator */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.status-online { background-color: var(--status-online); box-shadow: 0 0 8px var(--status-online); }
.status-offline { background-color: var(--status-offline); box-shadow: 0 0 8px var(--status-offline); }
.status-syncing { background-color: var(--status-syncing); box-shadow: 0 0 8px var(--status-syncing); }

.status-indicator::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-online::after { border: 2px solid var(--status-online); }
.status-syncing::after { border: 2px solid var(--status-syncing); }
.status-offline::after { display: none; }

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    70% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* Card Body Details */
.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
    padding-bottom: 0.5rem;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-family: 'JetBrains Mono', monospace, sans-serif;
    color: #ffffff;
    font-weight: 500;
}

.block-height {
    font-size: 1.25rem;
    color: var(--accent-color);
    font-weight: 700;
}

/* Card Footer */
.card-footer-info {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(48, 54, 61, 0.5) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toasts */
.toast-container {
    z-index: 1055;
}

.custom-toast {
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
}

.toast-header.custom {
    background: transparent;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-error { border-left: 4px solid var(--status-offline); }
.toast-warning { border-left: 4px solid var(--status-syncing); }

/* Progress bar for refresh timer */
#refresh-progress {
    height: 3px;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 1s linear;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Top timer */
.next-refresh {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem 0;
    }
    .header-title {
        font-size: 1.5rem;
    }
}

.status-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:14px;

}

.node-index{

    width:35px;

    color:#9ca3af;

}

.node-name{

    width:180px;

    font-weight:600;

    white-space:nowrap;

    overflow:hidden;

}

.height{

    width:90px;

    text-align:right;

    font-family:JetBrains Mono;
}

.history{

    display:flex;

    gap:2px;

    flex:1;

    margin-left:20px;

}

.history div{

    width:4px;

    height:16px;

    border-radius:1px;

    background:#4b5563;
}

.history .good{

    background:#22c55e;
}

.history .bad{

    background:#ef4444;
}
