/* ============================================================
   ETNS TODO — CYBERPUNK THEME
   Orbitron(제목/버튼) + Share Tech Mono(본문/데이터) 네온 팔레트
   ============================================================ */

:root {
    --bg: #05060a;
    --panel: #0b0f1a;
    --panel-2: #0e1424;
    --border: rgba(0, 255, 242, 0.35);
    --border-soft: rgba(0, 255, 242, 0.14);
    --cyan: #00fff2;
    --pink: #ff2079;
    --yellow: #e8ff29;
    --green: #39ff8f;
    --text: #d8ecff;
    --muted: #6f88ad;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        repeating-linear-gradient(0deg, rgba(0, 255, 242, 0.035) 0px, rgba(0, 255, 242, 0.035) 1px, transparent 1px, transparent 3px),
        linear-gradient(rgba(0, 255, 242, 0.05) 1px, transparent 1px) 0 0 / 100% 42px,
        radial-gradient(ellipse at top, #0d1526 0%, var(--bg) 60%);
    font-family: "Share Tech Mono", "Consolas", monospace;
    color: var(--text);
    padding: 40px 16px;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px;
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 0 24px rgba(0, 255, 242, 0.18),
        0 0 60px rgba(255, 32, 121, 0.08),
        inset 0 0 40px rgba(0, 255, 242, 0.03);
    position: relative;
}

/* HUD 코너 브래킷 */
.container::before,
.container::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--cyan);
    opacity: 0.8;
}
.container::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.container::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

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

.header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.username {
    font-size: 12px;
    color: var(--cyan);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.username::before { content: "> "; color: var(--muted); }

.logout-btn {
    padding: 7px 12px;
    background: transparent;
    color: var(--pink);
    border: 1px solid var(--pink);
    border-radius: 2px;
    font-size: 11px;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.logout-btn:hover {
    background: var(--pink);
    color: #05060a;
    box-shadow: 0 0 14px rgba(255, 32, 121, 0.6);
}

header h1 {
    margin: 0 0 6px 0;
    font-family: "Orbitron", sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #eafcff;
    text-shadow:
        0 0 6px rgba(0, 255, 242, 0.9),
        0 0 22px rgba(0, 255, 242, 0.45),
        0 0 44px rgba(255, 32, 121, 0.25);
}

.subtitle {
    margin: 0 0 20px 0;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.02em;
}
.subtitle::before { content: "// "; color: var(--pink); }

.flash {
    background: rgba(255, 32, 121, 0.08);
    border: 1px solid var(--pink);
    border-left-width: 4px;
    color: #ffc2dd;
    padding: 10px 14px;
    border-radius: 2px;
    margin-bottom: 16px;
    font-size: 13px;
}
.flash p { margin: 0; }
.flash p::before { content: "[!] "; color: var(--pink); }

.summary {
    background: rgba(0, 255, 242, 0.06);
    border: 1px solid var(--border-soft);
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 2px;
    margin-bottom: 20px;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.summary strong {
    color: var(--cyan);
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0, 255, 242, 0.6);
}

.add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.add-form input[type="text"],
.auth-form input,
.edit-input {
    background: #05070d;
    color: var(--text);
    caret-color: var(--cyan);
}

.add-form input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
}

.add-form input[type="text"]:focus,
.auth-form input:focus,
.edit-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 1px var(--cyan), 0 0 12px rgba(0, 255, 242, 0.4);
}

.add-form input[type="text"]::placeholder,
.auth-form input::placeholder {
    color: #3d4d68;
}

.add-form button,
.auth-form button {
    padding: 12px 22px;
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    border-radius: 2px;
    font-family: "Orbitron", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-form button:hover,
.auth-form button:hover {
    background: var(--cyan);
    color: #05060a;
    box-shadow: 0 0 18px rgba(0, 255, 242, 0.7);
}

.todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-soft);
    border-left: 2px solid var(--cyan);
    background: rgba(0, 255, 242, 0.02);
    transition: background 0.15s ease;
}

.todo-item:hover {
    background: rgba(0, 255, 242, 0.06);
}

.todo-item.done {
    border-left-color: var(--green);
}

.todo-item.done .todo-title {
    text-decoration: line-through;
    color: var(--muted);
}

.toggle-form {
    margin: 0;
}

.check-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(0, 255, 242, 0.6);
}

.todo-item.done .check-btn {
    color: var(--green);
    text-shadow: 0 0 8px rgba(57, 255, 143, 0.6);
}

.todo-title {
    flex: 1 1 120px;
    min-width: 0;
    font-size: 14px;
}

.todo-date {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.edit-form {
    display: none;
    gap: 6px;
    margin: 0;
    flex-basis: 100%;
}

.todo-item:hover .edit-form {
    display: flex;
}

.edit-input {
    width: 110px;
    padding: 6px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    font-size: 12px;
    font-family: inherit;
}

.edit-btn, .delete-btn {
    padding: 6px 10px;
    border-radius: 2px;
    font-size: 11px;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    background: transparent;
    transition: all 0.15s ease;
}

.edit-btn {
    border: 1px solid var(--yellow);
    color: var(--yellow);
}
.edit-btn:hover {
    background: var(--yellow);
    color: #05060a;
    box-shadow: 0 0 14px rgba(232, 255, 41, 0.6);
}

.delete-form {
    margin: 0;
}

.delete-btn {
    border: 1px solid var(--pink);
    color: var(--pink);
}
.delete-btn:hover {
    background: var(--pink);
    color: #05060a;
    box-shadow: 0 0 14px rgba(255, 32, 121, 0.6);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 32px 0;
    list-style: none;
    font-size: 13px;
}
.empty::before { content: "// "; color: var(--pink); }

/* 로그인 / 회원가입 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-form input {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
}

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

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--muted);
}

.auth-link a {
    color: var(--cyan);
    font-weight: 600;
    text-decoration: none;
    text-shadow: 0 0 6px rgba(0, 255, 242, 0.5);
}

.auth-link a:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
    header h1 {
        animation: flicker 6s infinite;
    }
}
@keyframes flicker {
    0%, 92%, 100% { opacity: 1; }
    93% { opacity: 0.75; }
    94% { opacity: 1; }
    95% { opacity: 0.85; }
    96% { opacity: 1; }
}

@media (max-width: 480px) {
    .container { padding: 22px; }
    header h1 { font-size: 21px; }
}
