*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0B1120;
    --card: #101827;
    --card-edge: #1E293B;
    --cyan: #22D3EE;
    --amber: #F59E0B;
    --danger: #F43F5E;
    --success: #34D399;
    --text: #E2E8F0;
    --muted: #64748B;
    --font-display: "Space Grotesk", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --font-body: "Inter", sans-serif;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.08), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(244, 63, 94, 0.06), transparent 40%),
        var(--bg);
    font-family: var(--font-body);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px;
}

/* ---------- Terminal card ---------- */
#sec1 {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.box {
    width: 420px;
    max-width: 100%;
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #0D1526;
    border-bottom: 1px solid var(--card-edge);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-r { background: var(--danger); }
.dot-y { background: var(--amber); }
.dot-g { background: var(--success); }

.titlebar-name {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
}

.box-body {
    padding: 28px 28px 24px;
}

.box-body h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 22px;
}

.cursor {
    color: var(--cyan);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ---------- Input row ---------- */
.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0D1526;
    border: 1px solid var(--card-edge);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 18px;
    transition: border-color 0.2s ease;
}

.input-row:focus-within {
    border-color: var(--cyan);
}

.prompt {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-weight: 600;
}

.input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.input-row input::placeholder {
    color: var(--muted);
}

#peekBtn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--muted);
    line-height: 1;
    padding: 4px;
}

#peekBtn:hover {
    color: var(--text);
}

/* ---------- Strength meter ---------- */
.meter {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.seg {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--card-edge);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.meter-label {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 20px;
    min-height: 1em;
}

/* ---------- Checklist ---------- */
.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
    transition: color 0.2s ease;
}

.checklist li.done {
    color: var(--text);
}

.checklist .mark {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    width: 14px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.checklist li.done .mark {
    color: var(--success);
}

/* ---------- Submit ---------- */
#submitBtn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--cyan);
    color: #0B1120;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.35);
}

#submitBtn:disabled {
    background: var(--card-edge);
    color: var(--muted);
    cursor: not-allowed;
}

/* ---------- Footer ---------- */
.footer {
    width: 90%;
    max-width: 1000px;
    margin: 60px auto 20px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-edge);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-body);
}

.footer .logo img {
    width: 100px;
    border-radius: 10px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.footer .link ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer .link ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: #e0e0e0;
    text-decoration: none;
    text-transform: capitalize;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer .link ul li a svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.footer .link ul li a:hover {
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.4);
    color: #fff;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
    transform: translateY(-4px);
}

.footer .link ul li a:hover svg {
    transform: scale(1.2);
}

.footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

@media (prefers-reduced-motion: reduce) {
    .cursor { animation: none; }
}
