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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

.timer-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mode-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.mode-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #6b7280;
}

.mode-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.mode-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.timer-display {
    text-align: center;
    margin: 2rem 0;
}

.time {
    font-size: 5rem;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.session-info {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: #10b981;
    color: white;
    min-width: 120px;
}

.btn-primary:hover {
    background: #059669;
}

.btn-primary.pause {
    background: #f59e0b;
}

.btn-secondary {
    background: #e5e7eb;
    color: #4b5563;
}

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

.progress-info {
    display: flex;
    justify-content: space-around;
    padding-top: 1.5rem;
    border-top: 2px solid #f3f4f6;
}

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

.label {
    color: #6b7280;
    font-size: 0.9rem;
}

.value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-left: 0.5rem;
}

.tasks-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tasks-card h2 {
    margin-bottom: 1rem;
    color: #1f2937;
}

#task-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#task-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
}

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

.btn-add {
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-message {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-style: italic;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    transition: transform 0.2s;
}

.task-item:hover {
    transform: translateX(5px);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-text {
    text-decoration: line-through;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    color: #1f2937;
}

.task-sessions {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.task-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.task-delete:hover {
    background: #dc2626;
}

.stats-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stats-card h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.settings-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4b5563;
    font-weight: 600;
}

.setting-item input[type="number"] {
    width: 100px;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
}

@media (max-width: 640px) {
    .time {
        font-size: 3.5rem;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .mode-buttons {
        flex-direction: column;
    }
}

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

.timer-card.pulse {
    animation: pulse 0.5s ease-in-out 3;
}