* {
    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;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.timer-controls {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.add-timer-section h2 {
    margin-bottom: 20px;
    color: #667eea;
}

.timer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#timerName {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

#timerName:focus {
    outline: none;
    border-color: #667eea;
}

.time-inputs {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.time-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-group label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.time-group input {
    width: 80px;
    padding: 10px;
    font-size: 20px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.time-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

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

.timers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.empty-state svg {
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state p {
    color: #718096;
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state .hint {
    font-size: 14px;
    color: #a0aec0;
}

.timer-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.timer-card.completed {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    word-break: break-word;
}

.timer-close {
    background: #e53e3e;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.timer-close:hover {
    background: #c53030;
}

.timer-display {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #2d3748;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

.timer-display.warning {
    color: #e53e3e;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 1s linear;
}

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

.timer-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-start {
    background: #48bb78;
    color: white;
}

.btn-start:hover {
    background: #38a169;
}

.btn-pause {
    background: #ed8936;
    color: white;
}

.btn-pause:hover {
    background: #dd6b20;
}

.btn-reset {
    background: #718096;
    color: white;
}

.btn-reset:hover {
    background: #4a5568;
}

.preset-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.preset-section h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.preset-btn {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #4a5568;
}

.preset-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.features {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.features h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.features li {
    padding-left: 30px;
    position: relative;
    color: #4a5568;
}

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
    font-size: 20px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .time-inputs {
        flex-wrap: wrap;
    }
    
    .timer-display {
        font-size: 2rem;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
}