/* Zenith Documentation - Main Styles */
/* Version: 2.0.0 */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-body: #030712;
    --bg-panel: #111827;
    --bg-card: #1f2937;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.5);
    --secondary: #8b5cf6;
    --accent: #f43f5e;
    --border: #374151;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --font-main: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --transition-speed: 0.3s;
}

/* Developer Theme (Light) */
[data-theme="developer"] {
    --bg-body: #ffffff;
    --bg-panel: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.2);
    --secondary: #7c3aed;
    --accent: #dc2626;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Premium Purple-Magenta Theme */
[data-theme="premium"] {
    --bg-body: #0f0c29;
    --bg-panel: #1a1a2e;
    --bg-card: #16213e;
    --text-main: #e6e6ff;
    --text-muted: #a0a0cc;
    --primary: #bb86fc;
    --primary-glow: rgba(187, 134, 252, 0.3);
    --secondary: #03dac6;
    --accent: #cf6679;
    --border: #2a2a4a;
    --shadow: 0 4px 20px rgba(187, 134, 252, 0.15);
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
    transition: background var(--transition-speed);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary);
}

code {
    font-family: var(--font-code);
    background: var(--bg-card);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary);
}

pre {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-main);
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform var(--transition-speed);
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 2rem;
    text-align: center;
}

.logo span {
    color: var(--secondary);
}

.theme-switch {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.theme-btn {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-speed);
}

.theme-btn:hover,
.theme-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.nav-group:last-child {
    margin-bottom: 2rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-main);
    border-radius: 6px;
    transition: all var(--transition-speed);
    margin-bottom: 0.25rem;
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

/* ===== KEYWORD SECTIONS ===== */
.keyword-section {
    display: none;
}

.keyword-section.active {
    display: block;
}

.keyword-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .keyword-content {
        grid-template-columns: 1fr;
    }
}

.keyword-example {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.keyword-example h3 {
    margin-top: 0;
    color: var(--primary);
}

.keyword-editor {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.keyword-editor-header {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.keyword-editor-textarea {
    flex: 1;
    background: var(--bg-body);
    color: var(--text-main);
    border: none;
    padding: 1rem;
    font-family: var(--font-code);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    min-height: 200px;
}

.keyword-run-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.keyword-run-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ===== CONTENT ===== */
.content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-speed);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.25rem;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-panel);
    color: var(--primary);
    font-weight: 600;
}

tr:hover {
    background: var(--bg-card);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== KEYWORD SECTIONS ===== */
.keyword-section {
    display: none;
}

.keyword-section.active {
    display: block;
}

.keyword-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .keyword-content {
        grid-template-columns: 1fr;
    }
}

.keyword-example {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.keyword-example h3 {
    margin-top: 0;
    color: var(--primary);
}

.keyword-editor {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.keyword-editor-header {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.keyword-editor-textarea {
    flex: 1;
    background: var(--bg-body);
    color: var(--text-main);
    border: none;
    padding: 1rem;
    font-family: var(--font-code);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    min-height: 200px;
}

.keyword-run-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.keyword-run-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .content {
        margin-left: 0;
        padding: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}
