/* ===== Variables ===== */
:root {
    --bg: #030b07;
    --panel: rgba(8, 24, 16, 0.96);
    --panel-2: #10231a;
    --text: #f3f7f0;
    --muted: #89a38f;
    --accent: #2f8f4e;
    --accent-2: #65c466;
    --border: rgba(151, 210, 153, 0.16);
    --done: #173423;
}

/* ===== Base styles ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(120deg, #07120b, #163423, #0f2b1a, #07120b);
    background-size: 300% 300%;
    animation: gradientShift 12s ease infinite;
    overflow: hidden;
}

/* ===== Main layout ===== */
#content {
    display: flex;
    width: min(1000px, 100%);
    min-height: 620px;
    background: var(--panel);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    animation: fadeInUp 0.7s ease;
    backdrop-filter: blur(12px);
}

.sidebar {
    width: 280px;
    padding: 28px 22px;
    background: linear-gradient(180deg, #0d1812, #07120b);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar h1 {
    margin: 0;
    font-size: 30px;
    color: #b8f2b5;
    font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.sidebar p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 15px;
    font-weight: 700;
}

#allBtn {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.workspace {
    flex: 1;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inputRow {
    display: flex;
    gap: 10px;
}

/* ===== Buttons and form elements ===== */
button,
input {
    font: inherit;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
}

button {
    font-weight: 700;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 8px 18px rgba(47, 143, 78, 0.18);
}

button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 24px rgba(101, 196, 102, 0.24);
    filter: brightness(1.08);
}

button:active {
    transform: scale(0.98);
}

#taskInput {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
}

#taskInput:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== Stats and task list ===== */
.stats {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.stats div {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 999px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease;
}

li:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(101, 196, 102, 0.35);
}

li span {
    flex: 1;
    font-weight: 700;
    line-height: 1.4;
}

/* ===== Task states ===== */
.task-delete {
    margin-left: auto;
    padding: 8px 10px;
    font-size: 12px;
    background: transparent;
    border: 1px solid #2d5b3d;
    color: #9be29b;
    box-shadow: none;
}

.task-delete:hover {
    background: #173423;
    box-shadow: none;
    transform: none;
}

.completed {
    text-decoration: line-through;
    opacity: 0.75;
    background: var(--done);
    color: #d4f8d8;
    transition: all 0.25s ease;
}

/* ===== Animations ===== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}