/* === CSS Variables === */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2236;
    --bg-hover: #232d42;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #4fc3f7;
    --accent-cyan-dim: #389bc4;
    --accent-green: #4caf50;
    --accent-orange: #ff9800;
    --accent-red: #f44336;
    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-medium: rgba(148, 163, 184, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden { display: none !important; }

.portal-loading { min-height: 100vh; }

/* === Typography === */
h1, h2, h3 { color: var(--text-primary); font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }

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

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}
.btn-primary:hover {
    background: var(--accent-cyan-dim);
    transform: translateY(-1px);
}

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

.btn-large { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-full { width: 100%; }

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

.card.featured {
    border: 2px solid var(--accent-cyan);
    position: relative;
}

/* === Badges === */
.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-cyan);
    color: var(--bg-primary);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* === Code / Monospace === */
code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* === Spinner === */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Error States === */
.error-box {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--accent-red);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    color: var(--accent-red);
    text-align: center;
}

.error-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

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

/* === Site Header === */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}
.site-header .logo {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

/* === Responsive === */
@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .container { padding: 0 1rem; }
}
