:root { --bg: #0d1117; --surface: #161b22; --border: #30363d; --text: #e6edf3; --muted: #8b949e; --accent: #58a6ff; --green: #3fb950; --yellow: #d29922; --red: #f85149; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 0; margin-bottom: 24px; }
header .container { display: flex; align-items: center; gap: 16px; padding-top: 0; padding-bottom: 0; }
header h1 { font-size: 20px; font-weight: 600; } header h1 a { color: var(--text); }
nav a { color: var(--muted); font-size: 14px; } nav a:hover { color: var(--text); }
.stats { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px 24px; min-width: 140px; }
.stat .value { font-size: 28px; font-weight: 700; } .stat .label { font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
th, td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(88,166,255,0.04); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-done { background: rgba(63,185,80,0.15); color: var(--green); }
.badge-pending { background: rgba(210,153,34,0.15); color: var(--yellow); }
.badge-failed { background: rgba(248,81,73,0.15); color: var(--red); }
.badge-processing { background: rgba(88,166,255,0.15); color: var(--accent); }
.progress-bar { width: 100%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width 0.3s; }
.page-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.page-image { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; }
.page-image img { max-width: 100%; height: auto; border-radius: 4px; }
.page-text { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.page-text pre { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.8; font-family: Georgia, serif; color: var(--text); }
.page-text .empty { color: var(--muted); font-style: italic; }
.page-nav { display: flex; justify-content: space-between; margin: 16px 0; }
.page-nav a, .page-nav span { padding: 6px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.page-nav span { color: var(--muted); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); } .breadcrumb a:hover { color: var(--accent); }
@media (max-width: 768px) { .page-detail { grid-template-columns: 1fr; } }

/* Word cloud */
.cloud-container { width: 100%; height: 700px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: grab; position: relative; }
.metadata-section { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.metadata-section h3 { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.metadata-row { margin-bottom: 8px; }
.status-badge { margin-bottom: 12px; }
.error-message { margin-top: 12px; color: var(--red); }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.user-menu a { color: var(--muted); } .user-menu a:hover { color: var(--text); }
.user-menu form { display: inline; }
.user-menu button { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); padding: 4px 10px; font-size: 13px; cursor: pointer; }
.user-menu button:hover { color: var(--text); border-color: var(--muted); }
.flash { background: rgba(63,185,80,0.12); border: 1px solid var(--green); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.auth-card { max-width: 380px; margin: 48px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 28px; }
.auth-card h2 { font-size: 20px; margin-bottom: 20px; }
.auth-card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.auth-card input { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 15px; outline: none; }
.auth-card input:focus { border-color: var(--accent); }
.auth-card button { width: 100%; margin-top: 20px; padding: 10px; background: var(--accent); border: none; border-radius: 6px; color: var(--bg); font-size: 15px; font-weight: 600; cursor: pointer; }
.auth-card .errorlist { list-style: none; color: var(--red); font-size: 13px; margin-top: 6px; }
.auth-card .helptext, .auth-card .helptext ul { color: var(--muted); font-size: 12px; margin-top: 4px; padding-left: 16px; }
