:root {
    --bg: #0c0c0c;
    --bg-dim: #111111;
    --fg: #cccccc;
    --fg-dim: #888888;
    --fg-muted: #555555;
    --accent: #ccaa66;
    --accent-dim: #554422;
    --blue: #77aadd;
    --gold: #ddbb77;
    --red: #dd7777;
    --border: #222222;
    --border-light: #333333;
    --font: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    --radius: 0px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ffffff; text-decoration: underline; }
::selection { background: var(--accent-dim); color: var(--bg); }
::placeholder { color: var(--fg-muted); }

/* === STATUS BAR === */
.term-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--bg-dim);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    user-select: none;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--fg-dim);
}

.status-indicator {
    width: 7px;
    height: 7px;
    background: var(--fg-muted);
}

.status-indicator.active {
    background: var(--accent);
}

.status-user { color: var(--accent); font-weight: 600; }
.status-path { color: var(--blue); }
.status-sep { color: var(--fg-muted); }

.status-center {
    color: var(--fg-dim);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.status-right {
    color: var(--fg-muted);
    font-size: 11px;
}

/* === SCREEN === */
.term-screen {
    margin-top: 26px;
    margin-bottom: 52px;
    flex: 1;
    padding: 24px;
    max-width: 960px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.term-page {
    display: none;
}

.term-page.active {
    display: block;
}

/* === SECTION LABEL === */
.section-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
}

.label-bracket {
    color: var(--fg-muted);
    font-weight: 400;
}

.label-text {
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* === LINES === */
.term-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.prompt {
    color: var(--accent);
    flex-shrink: 0;
    font-weight: 500;
    white-space: nowrap;
}

.cmd-text {
    color: var(--fg);
}

/* === OUTPUT BLOCKS === */
.term-output-block {
    padding: 10px 14px;
    margin-bottom: 18px;
    border-left: 2px solid var(--border-light);
    background: rgba(255, 255, 255, 0.015);
}

.term-output-block p {
    color: var(--fg-dim);
    margin-bottom: 4px;
    font-size: 13px;
}

.term-output-block p:last-child {
    margin-bottom: 0;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.highlight-alt {
    color: var(--blue);
}

/* === HERO === */
.term-hero {
    margin-top: 4px;
}

.term-actions {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.term-actions.center {
    justify-content: center;
}

.term-btn {
    display: inline-block;
    padding: 7px 18px;
    border: 1px solid var(--border-light);
    color: var(--fg);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.1s ease;
    background: transparent;
}

.term-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.term-btn.large {
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
}

/* === STAT TABLE === */
.stat-table {
    width: 100%;
    border-collapse: collapse;
}

.stat-table tr td {
    padding: 5px 0;
    font-size: 13px;
}

.stat-key {
    color: var(--fg-muted);
    width: 100px;
    font-weight: 500;
}

.stat-val {
    color: var(--fg);
    font-weight: 600;
}

.stat-val.community {
    color: var(--blue);
}

/* === FEATURE TABLE === */
.feature-table {
    display: flex;
    flex-direction: column;
}

.feat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.feat-row:last-child {
    border-bottom: none;
}

.feat-icon {
    flex-shrink: 0;
    width: 28px;
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.feat-name {
    flex-shrink: 0;
    width: 100px;
    color: var(--fg);
    font-weight: 600;
    font-size: 13px;
}

.feat-desc {
    flex: 1;
    color: var(--fg-dim);
    font-size: 12px;
}

.feat-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border: 1px solid var(--border);
    font-size: 10px;
    color: var(--fg-muted);
    letter-spacing: 0.5px;
}

/* === TABS === */
.term-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.term-tab {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg-dim);
    font-family: var(--font);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.term-tab:hover {
    border-color: var(--border-light);
    color: var(--fg);
}

.term-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

/* === COMMAND LIST === */
.cmd-list-container {
    margin-bottom: 18px;
}

.cmd-panel {
    display: none;
}

.cmd-panel.active {
    display: block;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    font-size: 13px;
}

.cmd-item code {
    font-family: var(--font);
    color: var(--fg);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    font-size: 12px;
    flex-shrink: 0;
}

.cmd-item .cmd-desc {
    flex: 1;
    color: var(--fg-dim);
    font-size: 12px;
}

.cmd-item-daily {
    padding: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
    margin-bottom: 4px;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cmd-item-daily .cmd-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.cmd-item-daily .cmd-desc {
    flex: 1;
}

.cmd-pill {
    padding: 3px 12px;
    border: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.1s ease;
    white-space: nowrap;
    display: inline-block;
}

.cmd-pill:hover {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent-dim);
}

/* === CREDITS === */
.credits-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.credit-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.credit-entry:last-child {
    border-bottom: none;
}

.credit-entry img {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.credit-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.credit-info strong {
    font-size: 13px;
    color: var(--fg);
    font-weight: 600;
}

.credit-role {
    font-size: 10px;
    color: var(--fg-muted);
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
    padding: 2px 6px;
}

/* === INPUT BAR === */
.term-input-bar {
    position: fixed;
    bottom: 26px;
    left: 0;
    right: 0;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: var(--bg-dim);
    border-top: 1px solid var(--border);
    z-index: 1000;
}

.input-prompt {
    color: var(--accent);
    font-size: 13px;
    flex-shrink: 0;
    font-weight: 500;
    white-space: nowrap;
}

.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-family: var(--font);
    font-size: 13px;
    caret-color: transparent;
}

.term-input:focus + .input-cursor {
    animation: blink 0.8s step-end infinite;
}

.input-cursor {
    color: var(--fg);
    font-size: 13px;
    font-weight: 700;
    animation: blink 0.8s step-end infinite;
    flex-shrink: 0;
    margin-right: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* === FOOTER === */
.term-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--bg-dim);
    border-top: 1px solid var(--border);
    font-size: 11px;
    z-index: 1000;
    user-select: none;
}

.footer-left {
    color: var(--fg-muted);
}

.footer-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link {
    color: var(--fg-dim);
    font-size: 11px;
}

.footer-link:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-sep {
    color: var(--fg-muted);
    font-size: 10px;
}

.footer-right {
    color: var(--fg-muted);
    font-size: 10px;
}

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 24px;
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.modal-border {
    font-family: var(--font);
    font-size: 12px;
    color: var(--fg-muted);
    text-align: left;
    margin-bottom: 8px;
}

.modal-border.bottom {
    margin-bottom: 0;
    margin-top: 16px;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--fg);
    font-family: var(--font);
}

.modal-desc {
    color: var(--fg-dim);
    margin-bottom: 8px;
    line-height: 1.5;
    font-size: 13px;
}

.modal-warning {
    color: var(--fg-muted);
    font-size: 11px;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 7px 18px;
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.1s ease;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--fg);
}

.modal-btn:hover {
    border-color: var(--fg-dim);
}

.modal-btn.accept {
    border-color: var(--accent);
    color: var(--accent);
}

.modal-btn.accept:hover {
    background: var(--accent-dim);
    color: var(--bg);
}

.modal-btn.deny:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* === POLICY PAGES === */
.policy-main {
    margin-top: 26px;
    margin-bottom: 52px;
    flex: 1;
    padding: 24px;
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    min-height: 100vh;
}

.policy-container {
    width: 100%;
}

.policy-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--accent);
    font-family: var(--font);
}

.policy-updated {
    color: var(--fg-muted);
    margin-bottom: 28px;
    font-size: 12px;
}

.policy-section {
    border-left: 2px solid var(--border-light);
    padding: 14px 18px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.015);
}

.policy-section h2 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--fg);
    font-family: var(--font);
}

.policy-section p {
    color: var(--fg-dim);
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 13px;
}

.policy-section ul {
    list-style: none;
    padding: 0;
}

.policy-section ul li {
    color: var(--fg-dim);
    padding: 3px 0;
    padding-left: 18px;
    position: relative;
    font-size: 13px;
}

.policy-section ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.policy-section a {
    color: var(--accent);
    font-weight: 500;
}

.policy-section a:hover {
    color: #ffffff;
}

.policy-section code {
    font-family: var(--font);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 4px;
    font-size: 12px;
}

.policy-back {
    text-align: center;
    margin-top: 28px;
}

.policy-back a {
    display: inline-block;
    padding: 7px 18px;
    border: 1px solid var(--border-light);
    color: var(--fg);
    font-family: var(--font);
    font-size: 13px;
    transition: all 0.1s ease;
}

.policy-back a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.policy-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--bg-dim);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    user-select: none;
}

.policy-status .status-center {
    color: var(--fg-dim);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.policy-status .status-right {
    color: var(--fg-muted);
    font-size: 11px;
}

.policy-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--bg-dim);
    border-top: 1px solid var(--border);
    font-size: 11px;
    z-index: 1000;
    user-select: none;
}

/* === CENTER HELPER === */
.centered {
    text-align: center;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .term-screen {
        padding: 16px;
    }

    .term-status {
        font-size: 10px;
        padding: 0 8px;
    }

    .status-center {
        display: none;
    }

    .feat-row {
        flex-wrap: wrap;
    }

    .feat-name {
        width: auto;
    }

    .feat-desc {
        width: 100%;
        padding-left: 40px;
    }

    .cmd-item {
        flex-wrap: wrap;
    }

    .cmd-item .cmd-desc {
        width: 100%;
        padding-left: 0;
        margin-top: -4px;
    }

    .cmd-item code {
        font-size: 11px;
    }

    .cmd-item-daily {
        flex-direction: column;
    }

    .cmd-item-daily .cmd-main {
        width: 100%;
        min-width: unset;
    }

    .cmd-item-daily .cmd-pill {
        width: 100%;
        text-align: center;
        white-space: normal;
        word-break: break-all;
    }

    .term-tabs {
        gap: 3px;
    }

    .term-tab {
        padding: 4px 9px;
        font-size: 11px;
    }

    .credit-info {
        flex-wrap: wrap;
    }

    .footer-center {
        display: none;
    }

    .term-actions {
        flex-direction: column;
    }

    .term-btn.large {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .term-screen {
        padding: 12px;
    }

    .term-output-block {
        padding: 8px 10px;
    }

    .stat-table tr td {
        padding: 4px 0;
        font-size: 12px;
    }

    .stat-key {
        width: 80px;
    }
}