/* SentimentWiki - Main Styles */
:root {
    --bg-primary: #0f1117;
    --bg-card: #1a1d2e;
    --bg-input: #252836;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #eab308;
    --border: #2d3348;
    --radius: 8px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

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

a:hover {
    color: var(--accent-hover);
}

code, .mono {
    font-family: var(--font-mono);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links .active {
    color: var(--accent);
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Label buttons */
.label-btn {
    flex: 1;
    padding: 1.5rem;
    font-size: 1.25rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.label-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.label-btn.bullish:hover {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.label-btn.bearish:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.label-btn.neutral:hover {
    border-color: var(--warning);
    background: rgba(234, 179, 8, 0.1);
}

.label-btn.irrelevant:hover {
    border-color: var(--text-muted);
    background: rgba(100, 116, 139, 0.1);
}

.label-btn-emoji {
    font-size: 2rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Hero */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Demo widget */
.demo-widget {
    max-width: 700px;
    margin: 2rem auto;
}

.demo-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.demo-row {
    display: flex;
    gap: 1rem;
}

.demo-row select {
    width: 200px;
    flex-shrink: 0;
}

.demo-row .btn {
    flex-shrink: 0;
}

/* Result card */
.result-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.direction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1.1rem;
}

.direction-badge.bullish {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.direction-badge.bearish {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.direction-badge.neutral {
    background: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

/* Score bars */
.score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.score-label {
    width: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.score-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.score-value {
    width: 50px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.result-reasoning {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.result-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

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

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Security cards */
.security-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.symbol-badge {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
}

.security-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item span {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-pending {
    background: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

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

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Label queue */
.label-queue {
    padding: 2rem 0;
}

.queue-card {
    max-width: 800px;
    margin: 0 auto;
}

.queue-text {
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.queue-security {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.queue-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.queue-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.queue-stat {
    text-align: center;
}

.queue-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.queue-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Code blocks */
pre {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

code {
    background: var(--bg-input);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
}

/* API page */
.api-section {
    margin-bottom: 3rem;
}

.api-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Auth pages */
.auth-page {
    padding: 4rem 0;
}

.auth-card {
    max-width: 400px;
    margin: 0 auto;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Flash messages */
.flash {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.flash-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* HTMX loading */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* Page header */
.page-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
}

/* Security detail */
.security-detail {
    padding: 2rem 0;
}

.security-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.security-detail-info {
    flex: 1;
}

.section {
    margin-bottom: 2rem;
}

.section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .demo-row {
        flex-direction: column;
    }
    
    .demo-row select {
        width: 100%;
    }
    
    .queue-buttons {
        flex-direction: column;
    }
    
    .label-btn {
        flex-direction: row;
        justify-content: center;
    }
    
    .nav-links {
        gap: 0.75rem;
        font-size: 0.85rem;
    }
}









.btn-skip {
    background: transparent;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 0.6rem 2.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-block;
}
.btn-skip:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99,102,241,0.08);
}
