* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    height: 100vh;
    background: linear-gradient(135deg, #2405ab, #74e3eb);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.4s ease, color 0.4s ease;
    position: relative;
    overflow: hidden;
    color: #fff;
}

body.light-mode {
    background: linear-gradient(135deg, #d9e4f5, #eef2f3);
    color: #222;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    width: 320px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.4s ease, color 0.3s ease;
}

.container h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.timer {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.btn {
    flex: 1;
    margin: 0 5px;
    padding: 0.6rem 0;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.reset {
    background-color: #f44336;
}

.reset:hover {
    background-color: #d32f2f;
}

.laps {
    max-height: 120px;
    overflow-y: auto;
    text-align: left;
    list-style-type: decimal;
    padding-left: 1.5rem;
    color: inherit;
}

.laps li {
    margin: 4px 0;
    font-size: 0.9rem;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

body.light-mode .btn {
    background-color: #0072ff;
}

body.light-mode .btn:hover {
    background-color: #0059d6;
}

body.light-mode .reset {
    background-color: #ff5e5e;
}

body.light-mode .reset:hover {
    background-color: #e44e4e;
}

body.light-mode .container {
    background: rgba(255, 255, 255, 0.8);
    color: #222;
}