* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.title-area h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.car-status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.car-status-badge.running {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.car-status-badge.locked {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.car-status-badge.stopped {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444; /* red for disconnected */
    box-shadow: 0 0 10px #ef4444;
    transition: background 0.3s, box-shadow 0.3s;
}

.indicator.connected {
    background: #10b981; /* green for connected */
    box-shadow: 0 0 10px #10b981;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

/* Speed & RPM */
.primary-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

.speed-box h2 {
    font-size: 64px;
    font-weight: 800;
    color: #38bdf8;
    line-height: 1;
}

.rpm-box h3 {
    font-size: 48px;
    font-weight: 800;
    color: #f43f5e;
    line-height: 1;
}

.speed-box p, .rpm-box p {
    color: #94a3b8;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats */
.stats-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
}

.stat-item .value {
    font-size: 20px;
    font-weight: 600;
    color: #f8fafc;
}

/* Controls */
.control-card h3 {
    font-size: 16px;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn.danger:hover {
    background: rgba(239, 68, 68, 0.8);
}

.btn.success:hover {
    background: rgba(16, 185, 129, 0.8);
}

.btn.warning:hover {
    background: rgba(245, 158, 11, 0.8);
}

@media (max-width: 600px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}
