/* 
  DiagView Demo Suite Styles
  Centralized styles for all demo pages
*/

:root {
    --accent: #3b82f6;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --hub-btn-bg: #f1f5f9;
}

.dark {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.05);
    --hub-btn-bg: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    padding: 20px;
    transition: background 0.3s, color 0.3s;
}

/* Navigation & Controls */
.controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.brand {
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggles {
    display: flex;
    gap: 20px;
    align-items: center;
}

.toggle-btn {
    background: var(--hub-btn-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

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

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    opacity: 0.8;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Typography Helpers */
.text-center {
    text-align: center;
}

.muted {
    color: var(--muted);
}

/* Code Blocks */
pre,
code {
    font-family: 'JetBrains Mono', monospace;
}

code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-block;
}

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

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

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

/* Diagram Containers & Responsiveness */
.diagram,
.chart,
.mermaid,
.stress-test {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: zoom-in;
}

.dark .diagram,
.dark .chart,
.dark .mermaid,
.dark .stress-test {
    background: rgba(255, 255, 255, 0.02);
}

svg {
    max-width: 100%;
    height: auto !important;
}