:root {
    --bg: #121212;
    --surface: #1e1e1e;
    --primary: #bb86fc;
    --danger: #cf6679;
    --text: #ffffff;
    --text-muted: #aaaaaa;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    padding: 1rem;
}

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

select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid #333;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 1rem;
}

.card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.time-display {
    font-size: 3.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    font-variant-numeric: tabular-nums;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 8px;
}

.metric .value {
    font-size: 1.8rem;
    font-weight: bold;
}

.metric .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    text-transform: uppercase;
}

.controls {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 1rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.2s;
}

.btn:active { opacity: 0.8; }
.btn.primary { background-color: var(--primary); color: #000; }
.btn.danger { background-color: var(--danger); }
.hidden { display: none !important; }

/* History Accordion */
.history-item {
    background: rgba(255,255,255,0.05);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.history-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.history-details {
    display: none;
    padding: 1rem;
    border-top: 1px solid #333;
    background: rgba(0,0,0,0.2);
}

.history-details.active {
    display: block;
}

.chart-container {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #333;
    color: white;
}
.btn-small.danger { background: var(--danger); }