:root {
    --bg-color: #F4F9F4;
    --card-bg: rgba(255, 255, 255, 0.7);
    --text-main: #5C7168;
    --text-muted: #87A89A;
    --accent: #87A89A;
    --accent-hover: #6c8a7c;
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(135, 168, 154, 0.2);
}

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

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at top left, rgba(211, 224, 220, 0.5) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(230, 219, 219, 0.5) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: background-color 0.5s ease;
}

.app-container {
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 1px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Timer Card (Glassmorphism) */
.timer-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transition: transform 0.3s ease;
}

.mode-selectors {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
    border-radius: 50px;
}

.mode-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: var(--text-muted);
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    color: var(--text-main);
}

.mode-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(135, 168, 154, 0.4);
}

/* Progress Ring */
.timer-display {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring__circle--progress {
    stroke-dasharray: 816; /* 2 * PI * 130 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.time-text {
    font-size: 5rem;
    font-weight: 300;
    color: var(--text-main);
    z-index: 10;
}

/* Controls */
.controls {
    display: flex;
    gap: 1.5rem;
}

.control-btn {
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.control-btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(135, 168, 154, 0.4);
}

.control-btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.control-btn.secondary {
    background: rgba(255,255,255,0.8);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.control-btn.secondary:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* Task Section */
.task-section {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
}

.task-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.task-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.task-input-group input {
    flex-grow: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.6);
    color: var(--text-main);
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.task-input-group input:focus {
    border-color: var(--accent);
}

.add-task-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-task-btn:hover {
    background: var(--accent-hover);
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.5);
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.task-item.completed span {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
}

.task-checkbox:checked {
    background: var(--accent);
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-text {
    flex-grow: 1;
    font-size: 1.1rem;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #e57373;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-item:hover .delete-btn {
    opacity: 1;
}

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

.timer-running .progress-ring {
    animation: pulse 2s infinite ease-in-out;
}
