/* Clean Minimal Documentation Theme - Agent Context System Aesthetic */

:root {
    /* Core Colors - Dark, Professional with Teal & Purple Accents */
    --bg: #0a0a0a;
    --surface: #18181b;
    --surface-elevated: #27272a;
    --border-color: #3f3f46;
    --accent: #14b8a6;
    --accent-2: #a855f7;
    --fg: #fafafa;
    --muted: #a1a1aa;
    --danger-color: #ff6b6b;
    --warning-color: #ffd93d;
    --success-color: #10b981;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --radius: 10px;
    --font-size: 16px;

    /* Code block colors */
    --code-bg: #18181b;
    --code-border: #3f3f46;

    /* Diagram accent colors */
    --accent-green-stroke: #10b981;
    --accent-green-fill: #10b981;
    --accent-blue-stroke: #14b8a6;
    --accent-blue-fill: #14b8a6;
    --accent-red-stroke: #ff6b6b;
    --accent-red-fill: #ff6b6b;
    --accent-amber-stroke: #ffd93d;
    --accent-amber-fill: #ffd93d;

    /* Button shadows */
    --button-primary-shadow: #0d9488;
    --button-secondary-shadow: #7e22ce;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    min-height: 100vh;
    font-size: var(--font-size);
}

/* Container & Layout - Full Width */
.container {
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation - Refined with better hover states */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.25s ease;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    position: relative;
}

.menu-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--fg);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}

.hamburger-icon {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--fg);
    transition: all 0.3s;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--fg);
    left: 0;
    transition: all 0.3s;
}

.hamburger-icon::before {
    top: -7px;
}

.hamburger-icon::after {
    bottom: -7px;
}

.menu-toggle.active .hamburger-icon {
    background: transparent;
}

.menu-toggle.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    width: 250px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    z-index: 1001;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    text-decoration: none;
    color: var(--fg);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--surface-elevated);
}

/* Header - Full Screen Hero */
header {
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    padding: 6rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: none;
}

header h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

header h1 .accent {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 700px;
    margin-bottom: 2rem;
    line-height: 1.6;
}
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

header p {
    font-size: 1rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

main {
    flex: 1;
    padding: 0;
    max-width: 100%;
}

/* Cards & Sections - Enhanced Depth & Hierarchy */
.card,
.section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover,
.section:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}

.card.elevated {
    background: var(--surface-elevated);
    box-shadow: var(--shadow);
}

.card.highlight {
    border-color: var(--accent);
    border-width: 2px;
}

.card.success {
    border-color: var(--success-color);
    border-width: 2px;
}

.card.warning {
    border-color: var(--warning-color);
    border-width: 2px;
}

.card.danger {
    border-color: var(--danger-color);
    border-width: 2px;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Typography - Refined Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--fg);
    line-height: 1.25;
    margin-bottom: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.375rem;
    font-weight: 700;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    color: var(--fg);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.highlight {
    color: var(--accent);
}

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

.accent-2 {
    color: var(--accent);
}

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

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

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

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

/* Code blocks - GitHub style */
code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    border: 1px solid var(--code-border);
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.9rem;
}

/* Buttons - Refined & Interactive */
.btn,
button {
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--fg);
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.btn:hover,
button:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn:active,
button:active {
    transform: translateY(0);
}

.btn.primary {
    background: var(--accent);
    color: #000000;
    border-color: var(--accent);
    font-weight: 700;
}

.btn.primary:hover {
    background: #0d9488;
    border-color: #0d9488;
    box-shadow: 0 0 24px rgba(20, 184, 166, 0.4);
}

.btn.secondary {
    background: transparent;
    color: var(--fg);
    border-color: var(--border-color);
}

.btn.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(20, 184, 166, 0.08);
}

/* Forms - Refined & Accessible */
input,
textarea,
select {
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--fg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
    background: var(--surface);
}

label {
    color: var(--fg);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* Tables - Refined with better contrast */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

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

th {
    background: var(--surface-elevated);
    color: var(--fg);
    font-weight: 700;
    letter-spacing: -0.3px;
}

td {
    color: var(--fg);
}

tr:hover {
    background: rgba(20, 184, 166, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

th[scope="row"] {
    font-weight: 700;
}

/* Progress Bars - Minimal */
.progress-bar {
    height: 4px;
    background: var(--surface-elevated);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
}

/* Footer - Minimal */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    color: var(--muted);
    margin-bottom: 0;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Utilities */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* Back to top button - Refined */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: #000000;
    border: none;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 700;
}

.back-to-top-btn.visible {
    display: flex;
}

.back-to-top-btn:hover {
    background: #0d9488;
    transform: translateY(-3px);
    box-shadow: 0 0 28px rgba(20, 184, 166, 0.4);
}

/* Mobile Styles */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    header {
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    main {
        padding: 1rem;
    }

    .card,
    .section {
        padding: 1.5rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .card,
    .section {
        padding: 1rem;
    }
}

/* Lists - Clean spacing */
ul,
ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--fg);
}

/* Links - Standard blue */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-style: italic;
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}
