:root {
    --bg-light: #ecf0f3;
    --bg-dark: #1a1a1a;
    --card-light: rgba(255, 255, 255, 0.6);
    --card-dark: rgba(30, 30, 30, 0.6);
    --text-light: #000;
    --text-dark: #fff;
    --accent: #00b894;
    --button-hover: #00a383;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #dff9fb, #c7ecee);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: background 0.5s;
}

body.dark {
    background: linear-gradient(135deg, #2c3e50, #000);
    color: var(--text-dark);
}

.container {
    backdrop-filter: blur(20px);
    background: var(--card-light);
    border-radius: 20px;
    box-shadow: 0 15px 30px var(--shadow-light);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
    transition: all 0.5s ease;
}

body.dark .container {
    background: var(--card-dark);
    box-shadow: 0 15px 30px var(--shadow-dark);
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.stopwatch {
    font-size: 3rem;
    margin: 1rem 0;
    color: var(--accent);
    transition: color 0.3s;
    animation: glow 2s infinite ease-in-out;
}

@keyframes glow {
    0%, 100% {
    text-shadow: 0 0 10px var(--accent);
    }
    50% {
    text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent);
    }
}

.buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--accent);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

button:hover:not(:disabled) {
    background-color: var(--button-hover);
    transform: scale(1.05);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}
    /* Dark mode button colors */
    body.dark button {
    background-color: #222;
    color: #00b894;
    }
    body.dark button:hover:not(:disabled) {
    background-color: #333;
    color: #fff;
    }
    body.dark button:disabled {
    background-color: #444;
    color: #888;
    }

    /* Lap item color in dark mode */
    body.dark .laps li {
    background: rgba(30,30,30,0.7);
    color: #00b894;
    }
.laps {
    margin-top: 2rem;
    max-height: 200px;
    overflow-y: auto;
}

.laps ul {
    list-style: none;
    padding: 0;
}

.laps li {
    background: rgba(255,255,255,0.2);
    padding: 0.6rem 1rem;
    margin-bottom: 0.4rem;
    border-radius: 6px;
    font-size: 1rem;
    animation: slideIn 0.3s ease forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes slideIn {
    to {
    transform: translateY(0);
    opacity: 1;
    }
}

.dark-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.dark-toggle:hover {
    background: var(--accent);
    color: white;
}

@media (max-width: 500px) {
    .stopwatch {
    font-size: 2.3rem;
    }

    .buttons {
    flex-direction: column;
    }

    button {
    width: 100%;
    }
}