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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 20px;
    color: white;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

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

main {
    flex: 1;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
}

.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e74c3c;
    background: white;
    color: #e74c3c;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab:hover {
    background: #ffeaea;
}

.tab.active {
    background: #e74c3c;
    color: white;
}

.timer-display {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.timer-circle {
    position: relative;
    width: 220px;
    height: 220px;
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 12;
}

.progress-ring-progress {
    fill: none;
    stroke: #e74c3c;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    font-weight: bold;
    color: #333;
}

.timer-text .separator {
    color: #e74c3c;
}

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

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-large {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

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

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: #f0f0f0;
    color: #666;
}

.btn-small:hover {
    background: #e0e0e0;
}

.settings-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-panel h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.setting-row label {
    min-width: 180px;
    font-size: 0.9rem;
    color: #555;
}

.setting-row input[type="range"] {
    flex: 1;
    min-width: 100px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.setting-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
}

.stats-panel {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-radius: 12px;
    padding: 20px;
}

.stats-panel h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.stats-panel .btn {
    display: block;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 0.85rem;
    opacity: 0.9;
}

@media (max-width: 500px) {
    .mode-tabs {
        flex-direction: column;
    }
    
    .timer-circle {
        width: 180px;
        height: 180px;
    }
    
    .timer-text {
        font-size: 2.8rem;
    }
    
    .setting-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-row input[type="range"] {
        width: 100%;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 15px;
    }
}
