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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.timer-card:hover {
    transform: translateY(-5px);
}

.input-section {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

#seconds-input {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.3s ease;
    background: #f9f9f9;
}

#seconds-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

#seconds-input::-webkit-inner-spin-button,
#seconds-input::-webkit-outer-spin-button {
    height: 30px;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.start-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.pause-button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.pause-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.reset-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.reset-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.output-section {
    text-align: center;
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.timer-status {
    font-size: 0.9rem;
    color: #666;
    min-height: 20px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .timer-card {
        padding: 30px 20px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 14px;
    }
}

/* Animation for timer completion */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.timer-display:has-text("Done!") {
    animation: pulse 0.5s ease-in-out;
    color: #4caf50;
}