* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f0f4f8;
    color: #333;
    padding: 20px;
}

header,
section,
footer {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3.1rem;
    margin-bottom: 10px;
}

header button {
    padding: 5px 10px;
    font-size: 0.85rem;
}

section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 770px;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    font-size: 2.6rem;
    margin-bottom: 28px;
}

#pomodoro h2 {
    margin-bottom: 5px;
}

h2 {
    font-size: 1.7rem;
    margin-bottom: 12px;
}

#timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: #3b3b98;
    margin-bottom: 15px;
}

button,
#set-goal {
    padding: 8px 14px;
    background: #3b3b98;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover,
#set-goal:hover {
    background: #2f2f8b;
}

#tasks h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.finished-button {
    margin-bottom: 12px;
}

.task-lists {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.task-column {
    background: #f9f9ff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    width: 270px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.add-task-button {
    margin-bottom: 12px;
}

#add-task-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

#add-task-modal .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 300px;
    width: 90%;
    text-align: center;
}

#add-task-modal input[type="text"] {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
}

#add-task-modal button {
    margin: 5px;
    padding: 6px 12px;
}

.task-list {
    list-style: none;
    padding: 0;
}

.task-list li {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 6px;
    margin-bottom: 6px;
}

.finished-task {
    background: transparent;
    color: #57ee46;
    border: none;
    font-size: 1.1em;
    margin-left: 1px;
    cursor: pointer;
}

.finished-task:hover {
    background: transparent;
    color: #3fd735;
}

.delete-task {
    background: transparent;
    color: #f82323;
    border: none;
    font-size: 1.1em;
    margin-left: 1px;
    cursor: pointer;
}

.delete-task:hover {
    background: transparent;
    color: #d12020;
}

#goal-input {
    padding: 6px;
    border: 1px solid #aaa;
    border-radius: 4px;
    width: 80px;
    text-align: center;
    margin-bottom: 10px;
}

#progress-bar-container {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: #3b3b98;
    transition: width 0.3s ease;
}

footer {
    font-size: 0.9rem;
    color: #555;
    margin-top: 20px;
}

/* Dark mode styling */
body.dark {
    background: #23272f;
    color: #e3e6ee;
}

body.dark #timer-display {
    color: #7c83fd;
}

body.dark section {
    background: #2d3142;
    color: #e3e6ee;
}

body.dark .task-column {
    background: #35394a;
    border-color: #4f5368;
}

body.dark .task-list li {
    background: #3d4157;
    border-color: #5a5e76;
}

body.dark #add-task-modal .modal-content {
    background: #2d3142;
    color: #e3e6ee;
}

body.dark #add-task-modal input[type="text"] {
    background: #35394a;
    color: #e3e6ee;
    border: 1px solid #4f5368;
}

body.dark #add-task-modal button {
    background: #4950a3;
    color: #fff;
}

body.dark #add-task-modal button:hover {
    background: #3b3f7a;
}

body.dark .delete-task,
body.dark .finished-task {
    background: transparent;
    border: none;
    font-size: 1.1em;
    margin-left: 1px;
    cursor: pointer;
}

body.dark .delete-task:hover,
body.dark .finished-task:hover {
    background: transparent;
}

body.dark button,
body.dark #set-goal {
    background: #4950a3;
    color: #fff;
}

body.dark button:hover,
body.dark #set-goal:hover {
    background: #3b3f7a;
}

body.dark #progress-bar-container {
    background: #444a6d;
}

body.dark #progress-bar {
    background: #7c83fd;
}

/* Mobile display */
@media (max-width: 700px) {
    .task-lists {
        flex-direction: column;
        align-items: center;
    }

    .task-column {
        width: 90%;
    }

    .pomodoro-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 0;
    }

    .pomodoro-controls button {
        flex: 1 1 45%;
        min-width: 120px;
        margin-bottom: 6px;
        font-size: 1em;
    }

    #daily-goal>div {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px;
    }

    #daily-goal label,
    #goal-input,
    #set-goal {
        width: 70%;
        align-self: center;
    }

    #progress-text {
        margin-bottom: 8px;
        display: block;
    }
}