* {
    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;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.timer-display {
    font-size: 5em;
    font-weight: bold;
    text-align: center;
    margin: 30px 0;
    color: #667eea;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.phase-indicator {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 30px;
    display: inline-block;
    width: 100%;
    transition: all 0.3s ease;
}

.phase-indicator.work {
    background: #4CAF50;
    color: white;
}

.phase-indicator.rest {
    background: #2196F3;
    color: white;
}

.phase-indicator.long-rest {
    background: #9C27B0;
    color: white;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.setting-group input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

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

.round-counter {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #666;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-danger {
    background: #ff5252;
    color: white;
}

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

.preset-container {
    margin-bottom: 30px;
}

.preset-container h3 {
    margin-bottom: 15px;
    color: #333;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.preset-btn {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.preset-btn:hover {
    border-color: #667eea;
    background: #f8f8ff;
}

.sound-controls {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.sound-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sound-controls input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.history {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
}

.history h3 {
    margin-bottom: 15px;
    color: #333;
}

#historyList {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

#historyList li {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

#historyList li:last-child {
    border-bottom: none;
}

#historyList li span {
    color: #666;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .timer-display {
        font-size: 3.5em;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .sound-controls {
        flex-direction: column;
        gap: 15px;
    }
}