/* public/css/style.css */
:root {
    --bg: #111215;
    --text: #d8dee9;
    --muted: #7e889b;
    --link: #88c0d0;
    --border: #2e3440;
    --error: #bf616a;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "SF Mono", "Fira Code", "Roboto Mono", Consolas, monospace;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

main {
    max-width: 580px;
    width: 100%;
}

header {
    margin-bottom: 2.5rem;
}

h1 {
    font-family: var(--mono);
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

p.intro {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

ul.directory {
    list-style: none;
    border-top: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

ul.directory li {
    border-bottom: 1px solid var(--border);
}

.dir-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.9rem 0;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.dir-row:hover {
    color: var(--link);
}

.label {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 500;
}

.meta {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Inline Expanding Panels */
.expand-panel {
    display: none;
    padding: 0.5rem 0 1.2rem 0;
}

.expand-panel.open {
    display: block;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 4px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.input-group label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: #ffffff;
    padding: 0.6rem 0.8rem;
    font-family: var(--mono);
    font-size: 0.9rem;
    border-radius: 3px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--link);
}

/* Recursive Descent: 80x30 fixed-pitch terminal grid */
#rdescent-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    /* Focusable (via tabindex, see rdescent.js) so arrow-key input keeps
       reaching it even after focus drifts elsewhere; suppress the
       default focus ring since this isn't a real form control. */
    outline: none;
}

#message-log,
#playing-field {
    font-family: var(--mono);
    white-space: pre;
    font-size: 0.85rem;
    line-height: 1.15;
}

#playing-field {
    display: inline-block;
    width: 80ch;
    height: calc(1.15em * 30);
    overflow: hidden;
}

.auth-form button {
    align-self: flex-start;
    background-color: transparent;
    border: 1px solid var(--link);
    color: var(--link);
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 0.3rem;
}

.auth-form button:hover {
    background-color: rgba(136, 192, 208, 0.1);
}

.error-banner {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--error);
    display: none;
}

footer {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}
    
