/* ── NEON GRID // TASK_OS ─────────────────────────────────────────── */

:root {
    --bg: #0a0b10;
    --grid-line: rgba(0, 240, 255, 0.05);
    --panel: #12141d;
    --panel-2: #171b26;
    --line: rgba(0, 240, 255, 0.28);
    --line-soft: rgba(0, 240, 255, 0.14);
    --ink: #d8f9ff;
    --ink-dim: #7c8ba3;
    --cyan: #00f0ff;
    --pink: #ff2e88;
    --purple: #b336ff;
    --danger: #ff3b5c;
    --clip: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 48px 16px;
    background:
        repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 40px),
        radial-gradient(ellipse at 50% -10%, rgba(179, 54, 255, 0.16), transparent 55%),
        var(--bg);
    color: var(--ink);
    font-family: "Rajdhani", "Malgun Gothic", sans-serif;
    font-size: 16px;
    position: relative;
}

/* scanline overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.18) 0px,
        rgba(0, 0, 0, 0.18) 1px,
        transparent 1px,
        transparent 3px
    );
    z-index: 50;
    opacity: 0.5;
}

.container {
    max-width: 520px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    padding: 28px 26px;
    position: relative;
    clip-path: polygon(
        0 var(--clip), var(--clip) 0,
        calc(100% - var(--clip)) 0, 100% var(--clip),
        100% calc(100% - var(--clip)), calc(100% - var(--clip)) 100%,
        var(--clip) 100%, 0 calc(100% - var(--clip))
    );
    box-shadow:
        0 0 0 1px rgba(0, 240, 255, 0.08),
        0 0 40px -6px rgba(0, 240, 255, 0.25),
        0 0 90px -20px rgba(179, 54, 255, 0.35);
}

.container::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(0, 240, 255, 0.05), transparent 40%);
}

.eyebrow {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--cyan);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    opacity: 0.85;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--cyan);
    box-shadow: 0 0 8px 2px var(--cyan);
    animation: blink 1.6s steps(2, jump-none) infinite;
}

@keyframes blink {
    50% { opacity: 0.15; }
}

h1 {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    text-align: left;
    margin: 0 0 4px;
    font-size: 26px;
    letter-spacing: 0.03em;
    color: #fff;
    text-shadow:
        0 0 6px rgba(0, 240, 255, 0.9),
        0 0 22px rgba(0, 240, 255, 0.45);
}

.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.top-bar h1 {
    margin-bottom: 0;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Share Tech Mono", monospace;
    font-size: 12px;
    color: var(--ink-dim);
    white-space: nowrap;
}

.username::before {
    content: "USER://";
    color: var(--purple);
}

.logout-link {
    color: var(--pink);
    text-decoration: none;
    letter-spacing: 0.06em;
    border: 1px solid rgba(255, 46, 136, 0.4);
    padding: 4px 8px;
    text-transform: uppercase;
}

.logout-link:hover {
    background: rgba(255, 46, 136, 0.12);
    box-shadow: 0 0 10px rgba(255, 46, 136, 0.35);
}

/* ── forms & inputs ───────────────────────────────────────────────── */

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

input[type="text"],
input[type="password"] {
    font-family: "Share Tech Mono", monospace;
    background: #0d0f16;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 11px 12px;
    font-size: 14px;
    outline: none;
    transition: box-shadow 0.15s, border-color 0.15s;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--ink-dim);
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 1px var(--cyan), 0 0 14px rgba(0, 240, 255, 0.35);
}

.add-form input {
    flex: 1;
}

button {
    cursor: pointer;
    border: 1px solid var(--cyan);
    background: rgba(0, 240, 255, 0.08);
    color: var(--cyan);
    font-family: "Rajdhani", sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 16px;
    font-size: 13px;
    transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}

button:hover {
    background: var(--cyan);
    color: #06131a;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.55);
}

/* ── todo list ────────────────────────────────────────────────────── */

.todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--pink);
}

.todo-item.done {
    border-left-color: var(--cyan);
    opacity: 0.55;
}

.todo-item.done .edit-form input {
    text-decoration: line-through;
    color: var(--ink-dim);
}

.check-btn {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.todo-item.done .check-btn {
    background: var(--cyan);
    color: #06131a;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.55);
}

.edit-form {
    flex: 1;
    display: flex;
}

.edit-form input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 6px;
}

.edit-form input:focus {
    box-shadow: none;
    border: none;
}

.edit-form button {
    border-color: var(--purple);
    color: var(--purple);
    background: rgba(179, 54, 255, 0.08);
    font-size: 11px;
    padding: 8px 12px;
}

.edit-form button:hover {
    background: var(--purple);
    color: #fff;
    box-shadow: 0 0 16px rgba(179, 54, 255, 0.55);
}

.delete-btn {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 59, 92, 0.08);
    font-size: 11px;
    padding: 8px 12px;
}

.delete-btn:hover {
    background: var(--danger);
    color: #1a0508;
    box-shadow: 0 0 16px rgba(255, 59, 92, 0.55);
}

.empty {
    text-align: center;
    color: var(--ink-dim);
    padding: 26px 0;
    list-style: none;
    font-family: "Share Tech Mono", monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.empty::before {
    content: "[ ";
}
.empty::after {
    content: " ]";
}

/* ── auth pages ───────────────────────────────────────────────────── */

.auth-container {
    max-width: 360px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form button {
    margin-top: 6px;
}

.auth-switch {
    text-align: center;
    font-family: "Share Tech Mono", monospace;
    font-size: 12px;
    color: var(--ink-dim);
    margin-bottom: 0;
}

.auth-switch a {
    color: var(--cyan);
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.5);
}

.auth-switch a:hover {
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
}

.error-message {
    background: rgba(255, 59, 92, 0.1);
    color: #ffb3c0;
    border: 1px solid rgba(255, 59, 92, 0.5);
    padding: 10px 12px;
    font-family: "Share Tech Mono", monospace;
    font-size: 12.5px;
    margin-top: 0;
    letter-spacing: 0.02em;
}

.error-message::before {
    content: "!! ";
    color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
    .eyebrow::before {
        animation: none;
    }
}
