:root {
    --bg-primary: #1a1b1e;
    --bg-secondary: #2c2e33;
    --text-primary: #e4e5e7;
    --text-secondary: #a0a1a7;
    --accent: #6366f1;
    --accent-hover: #4f52e0;
    --success: #10b981;
    --error: #ef4444;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success);
    animation: pulse 2s infinite;
}

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

/* Groups layout */
.groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.group {
    background: transparent;  /* No extra background – let cards stand out */
}

.group-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

.group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Original card styling (from single‑sensor version) */
.card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* We don't have a separate card-header div, so we style the label as the header */
.card-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.card-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

/* Error state */
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--error);
}

.error-state .card-value {
    color: var(--error);
    font-size: 1.5rem;
}
