/* Annotated Listening Platform — Shared Stylesheet */

:root {
    --bg: #0a0a0a;
    --bg-card: #1a1a1a;
    --border: #333;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-dim: #808080;
    --text-bold: #ffffff;
    --accent: #e07b4f;
    --accent-dim: rgba(224, 123, 79, 0.15);
    --header-bg: linear-gradient(135deg, #2d1b4e 0%, #e07b4f 100%);
}

[data-theme="light"] {
    --bg: #f5f5f5;
    --bg-card: #ffffff;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #4a4a4a;
    --text-dim: #777777;
    --text-bold: #e07b4f;
    --accent: #c0602e;
    --accent-dim: rgba(224, 123, 79, 0.1);
    --header-bg: linear-gradient(135deg, #e07b4f 0%, #2d1b4e 100%);
}

/* Password Form (Centered Card) */
html.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

html.auth-page body {
    width: 100%;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Auth Card */
.card {
    background: var(--bg-card);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: min(90vw, 360px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.error {
    color: #f88;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    padding: 0.75rem;
    background: rgba(255, 136, 136, 0.1);
    border-radius: 4px;
}

input[type=password] {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

button {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    opacity: 0.9;
}

/* Hub Page */
header {
    background: var(--header-bg);
    color: white;
    padding-top: 16px;
    padding-bottom: 16px;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(224, 123, 79, 0.3);
    position: relative;
}

#dark-mode-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    margin: 0;
}

header .tagline {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    color: rgba(255, 255, 255, 1);
}

header .container {
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 0 1rem;
}

section {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: none;
    transition: background-color 0.3s, border-color 0.3s;
}

.highlight-section {
    border-left: 4px solid var(--accent);
}

.pitch {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0;
}

h2 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

h3 {
    color: #b85c3a;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] h3 {
    color: #e8a07a;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

ul, ol {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-muted);
}

li {
    margin-bottom: 0.5rem;
    margin-left: 1rem;
}

.highlight {
    background: var(--accent-dim);
    border-left: 4px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.document-list {
    margin-top: 1rem;
}

.document-list ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.document-list .doc-section {
    font-weight: 600;
    color: var(--text);
}

.document-list li {
    margin-bottom: 0.35rem;
}

.document-list a {
    color: var(--accent);
    text-decoration: none;
}

.document-list a:hover {
    text-decoration: underline;
}

.documents {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.doc-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(224, 123, 79, 0.15);
    transform: translateY(-2px);
}

.doc-card .icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.doc-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.doc-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.read-link {
    color: var(--accent);
    font-weight: 600;
    transition: all 0.2s;
}

.doc-card:hover .read-link {
    text-decoration: underline;
}

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
}

footer p {
    margin-bottom: 0.5rem;
}

footer strong {
    color: var(--text-bold);
    font-weight: 700;
}

.status-badge {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Markdown Viewer */
header a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.75rem;
}

header a:hover {
    color: white;
    text-decoration: underline;
}

.content {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
    border: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
}

h4, h5, h6 {
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

.code-block {
    background: var(--accent-dim);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre;
    font-family: 'Monaco', 'Courier New', monospace;
}

.code-block code {
    background: none;
    color: var(--accent);
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    white-space: inherit;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: var(--accent-dim);
    border-radius: 4px;
    color: var(--text-muted);
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

th, td {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
    color: var(--text);
}

th {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

tr:hover {
    background: var(--accent-dim);
}

hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 2rem 0;
}

strong {
    color: var(--text-bold);
    font-weight: 700;
}

em {
    font-style: italic;
}

.metadata {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Prev / Next navigation */
.doc-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.doc-nav a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.doc-nav a:hover {
    text-decoration: underline;
}

.nav-next {
    margin-left: auto;
    text-align: right;
}

/* Task list */
li.task {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

li.task .task-checkbox {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 2em;
    line-height: 1.2;
    vertical-align: middle;
}

li.task-done .task-checkbox {
    color: limegreen;
}

li.task-pending .task-checkbox {
    color: var(--text-muted);
    vertical-align: sub;
}

li.task-done .task-text {
    color: var(--text-muted);
}
