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

body {
    background-color: #0d0d1a;
    background-image:
        radial-gradient(ellipse at 20% 40%, #1e0845 0%, transparent 50%),
        radial-gradient(ellipse at 80% 15%, #061830 0%, transparent 50%),
        radial-gradient(ellipse at 55% 85%, #0d0a30 0%, transparent 45%),
        radial-gradient(ellipse at 75% 65%, #08141e 0%, transparent 40%);
    background-size: 300% 300%;
    animation: bgDrift 10s ease-in-out infinite alternate;
    min-height: 100vh;
    font-family: 'Rajdhani', sans-serif;
    color: #e0e0e0;
    padding: 30px 20px 60px;
}

@keyframes bgDrift {
    0%   { background-position: 0% 0%,   100% 0%,   50% 100%, 20% 80%; }
    25%  { background-position: 60% 30%,  20% 70%,   80% 20%,  70% 40%; }
    50%  { background-position: 30% 80%,  70% 20%,   10% 55%,  90% 60%; }
    75%  { background-position: 80% 50%,  10% 90%,   70% 30%,  30% 20%; }
    100% { background-position: 100% 100%, 0% 100%,  40% 80%,  60% 10%; }
}

h1 {
    font-family: 'Press Start 2P', monospace;
    text-align: center;
    color: #ffd700;
    font-size: clamp(16px, 3vw, 26px);
    margin-bottom: 8px;
    text-shadow: 0 0 12px #ffd700, 0 0 28px #ff8c00;
    letter-spacing: 3px;
}

.subtitle {
    text-align: center;
    color: #6666aa;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.pomodoro-section {
    max-width: 620px;
    margin: 0 auto 32px;
    background: #12122a;
    border: 2px solid #cc3300;
    border-radius: 8px;
    padding: 24px 20px;
    box-shadow: 0 0 20px #cc330044;
    text-align: center;
}

.pomodoro-title {
    color: #ff6633;
    font-size: 11px;
    margin-bottom: 16px;
    text-shadow: 0 0 10px #ff6633;
    letter-spacing: 2px;
}

.timer-display {
    font-size: clamp(48px, 12vw, 84px);
    font-family: 'Press Start 2P', monospace;
    color: var(--timer-color, #ff3300);
    text-shadow: 0 0 20px var(--timer-glow, #ff3300), 0 0 40px var(--timer-shadow, #ff330055);
    letter-spacing: 6px;
    margin-bottom: 8px;
    transition: color 0.12s, text-shadow 0.12s;
}

.timer-display.running {
    animation: pulse 1s ease-in-out infinite;
}

.timer-display.danger {
    animation: pulse-fast 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

@keyframes pulse-fast {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.timer-status {
    font-size: 13px;
    font-weight: 600;
    color: #6666aa;
    letter-spacing: 4px;
    margin-bottom: 18px;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.timer-extra {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.timer-theme-editor {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #2f2f58;
}

.timer-theme-title {
    font-size: 10px;
    color: #8c94d9;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.timer-theme-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.timer-color-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #b7baf4;
}

.timer-color-control input[type="color"] {
    width: 48px;
    height: 34px;
    padding: 0;
    border: 2px solid #40408e;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.timer-color-control input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.timer-color-control input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

#timer-color-reset {
    padding: 8px 12px;
    background: #151534;
    border: 1px solid #43439b;
    border-radius: 4px;
    color: #b4b8ff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

#timer-color-reset:hover {
    background: #1e1e46;
    border-color: #6a6aff;
    color: #e0e3ff;
}

.timer-controls button,
.timer-extra button {
    padding: 10px 16px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.timer-controls button:active,
.timer-extra button:active {
    transform: translateY(1px);
}

#timer-play-pause,
#timer-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#timer-play-pause-icon,
#timer-reset-icon {
    width: 18px;
    height: 18px;
    display: block;
}

#timer-play-pause-text,
#timer-reset-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
}

#timer-play-pause {
    background: #aa2200;
    border: 2px solid #ff4400;
    color: #ffffff;
    min-width: 130px;
    box-shadow: 0 0 12px #aa220055, inset 0 -3px 0 #660000;
}

#timer-play-pause:hover {
    background: #cc3300;
    box-shadow: 0 0 22px #cc330088, inset 0 -3px 0 #880000;
    transform: translateY(-2px);
}

#timer-reset {
    background: #1a1a3a;
    border: 2px solid #3a3a6a;
    color: #8888bb;
    box-shadow: inset 0 -3px 0 #0d0d1a;
}

#timer-reset:hover {
    background: #222244;
    border-color: #5555aa;
    color: #aaaadd;
    transform: translateY(-2px);
}

#timer-add5,
#timer-add10 {
    background: #0a2a0a;
    border: 2px solid #226622;
    color: #44cc44;
    box-shadow: 0 0 8px #22662233, inset 0 -3px 0 #011101;
}

#timer-sub10,
#timer-sub5 {
    background: #2a0a0a;
    border: 2px solid #662222;
    color: #ff6666;
    box-shadow: 0 0 8px #66222233, inset 0 -3px 0 #110101;
}

#timer-add5:hover,
#timer-add10:hover {
    background: #112211;
    border-color: #33aa33;
    box-shadow: 0 0 16px #33aa3366, inset 0 -3px 0 #011101;
    transform: translateY(-2px);
}

#timer-sub10:hover,
#timer-sub5:hover {
    background: #3a1010;
    border-color: #aa3333;
    box-shadow: 0 0 16px #aa333366, inset 0 -3px 0 #1a0303;
    transform: translateY(-2px);
}

.add-task-section {
    max-width: 620px;
    margin: 0 auto 28px;
    display: flex;
    gap: 10px;
}

#new-task-input {
    flex: 1;
    padding: 12px 14px;
    background: #12122a;
    border: 2px solid #3a3a9a;
    border-radius: 4px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    box-shadow: 0 0 8px #3a3a9a44;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#new-task-input::placeholder {
    color: #55558a;
    font-weight: 400;
}

#new-task-input:focus {
    border-color: #00eeff;
    box-shadow: 0 0 14px #00eeff66;
}

#add-task-btn {
    padding: 12px 16px;
    background: #3a3aff;
    border: 2px solid #6060ff;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 0 12px #3a3aff66, inset 0 -3px 0 #1a1acc;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

#add-task-btn:hover {
    background: #5555ff;
    box-shadow: 0 0 22px #5555ffaa, inset 0 -3px 0 #2a2acc;
    transform: translateY(-2px);
}

#add-task-btn:active {
    transform: translateY(1px);
    box-shadow: 0 0 8px #3a3aff44, inset 0 2px 0 #1a1acc;
}

.task-list {
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
}

.task-list li {
    list-style: none;
    margin-bottom: 10px;
    background: #12122a;
    border: 2px solid #2a2a5e;
    border-radius: 6px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px #00000066;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.task-list li:hover {
    border-color: #4444cc;
    box-shadow: 0 0 14px #4444cc44;
}

.task-list label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.task-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #4444cc;
    border-radius: 3px;
    background: #0d0d1a;
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.task-list input[type="checkbox"]:hover {
    border-color: #00eeff;
    box-shadow: 0 0 8px #00eeff66;
}

.task-list input[type="checkbox"]:checked {
    background: #3a3aff;
    border-color: #00eeff;
    box-shadow: 0 0 10px #00eeff88;
}

.task-list input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #ffffff;
    font-size: 15px;
    font-family: Arial, sans-serif;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-list span {
    font-size: 18px;
    font-weight: 600;
    color: #ccccee;
    line-height: 1.5;
    transition: color 0.2s, text-shadow 0.2s;
}

.task-list .completed {
    text-decoration: line-through;
    color: #33335a;
}

.completed-list li {
    opacity: 0.6;
    border-color: #1e1e40 !important;
    box-shadow: none !important;
}

.in-progress-list li,
.in-progress-task {
    border-color: #225577;
    box-shadow: 0 0 14px #22557733;
}

.section-header {
    max-width: 620px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #2a2a5e;
    padding-bottom: 8px;
}

.completed-header {
    margin-top: 32px;
    border-color: #1a3a1a;
}

.in-progress-header {
    margin-top: 32px;
    border-color: #1e4b68;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: #7777cc;
    letter-spacing: 3px;
    flex: 1;
}

.completed-header .section-title {
    color: #336633;
}

.in-progress-header .section-title {
    color: #4ba0d4;
}

.task-count {
    font-size: 14px;
    font-weight: 700;
    background: #2a2a6a;
    color: #aaaaff;
    border: 1px solid #4444aa;
    border-radius: 20px;
    padding: 2px 12px;
    min-width: 32px;
    text-align: center;
}

.completed-count {
    background: #0a2a0a;
    color: #44cc44;
    border-color: #226622;
}

.in-progress-count {
    background: #0a1f2d;
    color: #66ccff;
    border-color: #226688;
}

#clear-active-btn,
#clear-in-progress-btn,
#clear-completed-btn {
    padding: 5px 12px;
    background: #2a0a0a;
    border: 1px solid #662222;
    border-radius: 4px;
    color: #aa4444;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

#clear-active-btn:hover,
#clear-in-progress-btn:hover,
#clear-completed-btn:hover {
    background: #3a1010;
    color: #ff6666;
    border-color: #aa3333;
}

#clear-active-btn {
    background: #101036;
    border-color: #2c2c74;
    color: #7d8cff;
}

#clear-active-btn:hover {
    background: #18184a;
    border-color: #4f5bd6;
    color: #b2b9ff;
}

#clear-in-progress-btn {
    background: #0d2434;
    border-color: #2c6485;
    color: #74c8ff;
}

#clear-in-progress-btn:hover {
    background: #123247;
    border-color: #4ba0d4;
    color: #d2f0ff;
}

.task-status-btn {
    padding: 6px 12px;
    background: #0f2440;
    border: 1px solid #2d5f8e;
    border-radius: 4px;
    color: #78c5ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.task-status-btn:hover {
    background: #173556;
    color: #c7e7ff;
    border-color: #4ea3e8;
}

.task-delete-btn {
    padding: 6px 12px;
    background: #301018;
    border: 1px solid #8e3043;
    border-radius: 4px;
    color: #ff9aac;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.task-delete-btn:hover {
    background: #461523;
    color: #ffd6de;
    border-color: #e85c7c;
}

.completed-task .task-status-btn {
    display: none;
}

.empty-state {
    max-width: 620px;
    margin: 0 auto 12px;
    font-size: 15px;
    font-weight: 500;
    color: #44446a;
    letter-spacing: 2px;
    text-align: center;
    padding: 10px 0;
}
