* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --link: #2563eb;
    --card-bg: #f9fafb;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --text: #f8fafc;
        --text-muted: #94a3b8;
        --border: #1e293b;
        --link: #60a5fa;
        --card-bg: #1e293b;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 3rem 1.5rem;
}

.container {
    max-width: 640px;
    margin: 0 auto;
}

/* Header */
.header {
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.links {
    display: flex;
    gap: 1.25rem;
}

.links a {
    color: var(--link);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.links a:hover {
    text-decoration: underline;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0;
}

.text-btn:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Prompt Box / Auth Gate */
.prompt-box {
    margin-bottom: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.prompt-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 0.75rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-symbol {
    font-family: monospace;
    color: var(--text-muted);
    font-weight: bold;
}

.input-row input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-size: 0.95rem;
    font-family: monospace;
    outline: none;
}

.input-row input:focus {
    border-color: var(--link);
}

.input-row button {
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.input-row button:hover {
    opacity: 0.9;
}

.error-msg {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #ef4444;
    min-height: 1.25rem;
}

/* Auth Overlay for Protected Pages */
.auth-overlay {
    max-width: 480px;
    margin: 4rem auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.auth-box h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.auth-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.gate-back {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.gate-back:hover {
    color: var(--text);
    text-decoration: underline;
}

.public-links-section {
    margin-bottom: 2.5rem;
    text-align: center;
}

.theoritos-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(4, 195, 209, 0.08);
    border: 1px solid rgba(4, 195, 209, 0.3);
    color: #04c3d1;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.theoritos-banner-btn:hover {
    background: rgba(4, 195, 209, 0.16);
    border-color: rgba(4, 195, 209, 0.5);
    color: #a1eaf0;
    text-decoration: none;
    transform: translateY(-1px);
}

.hidden {
    display: none !important;
}

/* Section */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
