:root {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --primary-color: #2196F3;
    --primary-hover: #1976D2;
    --secondary-color: #757575;
    --secondary-hover: #616161;
    --danger-color: #f44336;
    --timer-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    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);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: var(--timer-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.timer-display {
    font-size: 4rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #fafafa;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.timer-display.time-up {
    background-color: var(--danger-color);
    color: white;
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.adjustment-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-weight: 500;
}

.btn:active {
    transform: scale(0.98);
}

.adjust-btn {
    background-color: #e0e0e0;
    color: #333;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.adjust-btn:hover {
    background-color: #d5d5d5;
}

.main-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.control-btn {
    min-width: 100px;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
}

.start-btn {
    background-color: var(--primary-color);
    color: white;
}

.start-btn:hover {
    background-color: var(--primary-hover);
}

.reset-btn {
    background-color: var(--secondary-color);
    color: white;
}

.reset-btn:hover {
    background-color: var(--secondary-hover);
}

@media (max-width: 480px) {
    .timer-display {
        font-size: 3rem;
    }
    
    .control-btn {
        min-width: 80px;
        padding: 0.6rem 1.2rem;
    }
}
