* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulse 2s infinite;
}

.status-dot.error {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: 600;
    color: #e2e8f0;
}

.refresh-rate {
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    opacity: 0;
    transition: opacity 0.3s;
}

.refresh-indicator.active {
    opacity: 1;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.stat-unit {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

/* Card Styles */
.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(71, 85, 105, 0.5);
}

.card-header {
    margin-bottom: 15px;
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content {
    text-align: center;
}

.card-value {
    font-size: 36px;
    font-weight: 700;
    color: #22c55e;
    line-height: 1;
    margin-bottom: 6px;
    transition: all 0.6s ease;
}

.card-value.value-updated {
    transform: scale(1.1);
    color: #10b981;
}

.card-unit {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Loading and Error States */
.loading, .no-data {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.no-data h2 {
    color: #e2e8f0;
    margin-bottom: 15px;
    font-size: 24px;
}

.no-data p {
    color: #94a3b8;
    margin-bottom: 10px;
}

/* Vehicle Info */
.vehicle-info {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 20px 25px;
    border-radius: 12px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.vehicle-id {
    font-size: 18px;
    font-weight: 700;
    color: #22c55e;
}

.last-updated {
    font-size: 14px;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .status-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label,
    .stat-unit {
        font-size: 11px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .card {
        padding: 12px;
    }

    .card-value {
        font-size: 28px;
    }

    .card-title {
        font-size: 10px;
    }

    .card-unit {
        font-size: 10px;
    }

    .vehicle-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}