:root {
    --bg: #f3f4f6;
    --card: white;
    --text: #111827;
}

body.dark {
    --bg: #0f172a;
    --card: #1e293b;
    --text: white;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.theme-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    border: none;
    font-size: 18px;
    cursor: pointer;
    background: none;
}

.card {
    background: var(--card);
    width: 100%;
    max-width: 380px;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

#display {
    font-size: 28px;
    margin: 20px 0;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.controls button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#startPause { background: #22c55e; }
#lapBtn { background: #3b82f6; }
.controls button:last-child { background: #ef4444; }

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.laps-container {
    margin-top: 20px;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
}

li {
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Desktop enhancement */
@media (min-width: 768px) {
    #display {
        font-size: 32px;
    }
}
