/* Base Styles */
:root {
    --docs-bg: #ffffff;
    --docs-text: #1a1a1a;
    --docs-sidebar-bg: #f8f9fa;
    --docs-sidebar-text: #4a5568;
    --docs-sidebar-active: #2563eb;
    --docs-sidebar-hover: #e2e8f0;
    --docs-border: #e2e8f0;
    --docs-code-bg: #1e293b;
    --docs-header-bg: #ffffff;
    --docs-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --docs-card-bg: #ffffff;
    --docs-card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --docs-success: #10b981;
    --docs-warning: #f59e0b;
    --docs-danger: #ef4444;
    --docs-info: #3b82f6;
}

/* CSS Reset (Modern) */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: var(--docs-bg);
  color: var(--docs-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  min-height: 100vh;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  box-sizing: border-box;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        /* Remove these styles as they're now handled by data-theme */
    }
}

/* Layout */
.docs-container {
    display: grid;
    min-height: 100vh;
    background-color: var(--docs-bg);
    color: var(--docs-text);
}

/* Sidebar */
.docs-sidebar {
    background-color: var(--docs-sidebar-bg);
    border-right: 1px solid var(--docs-border);
    padding: 1rem;
    position: fixed;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--docs-border);
}

.logo {
    display: inline-block;
    width: 130px;
    margin-top: 10px;
}

.version {
    font-size: 0.875rem;
    color: var(--docs-sidebar-text);
    margin: 1.25rem 0 0;
    float: right;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h2 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--docs-sidebar-text);
    margin-bottom: 1rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    color: var(--docs-sidebar-text);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background-color: var(--docs-sidebar-hover);
    color: var(--docs-text);
}

.sidebar-nav a.active {
    background-color: var(--docs-sidebar-active);
    color: white;
}

.sidebar-nav i {
    margin-right: 0.75rem;
    width: 1rem;
    text-align: center;
}

/* Main Content */
.docs-main {
    margin-left: 280px;
    min-height: 100vh;
}

/* Header */
.docs-header {
    background-color: var(--docs-header-bg);
    border-bottom: 1px solid var(--docs-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--docs-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.header-search {
    position: relative;
    width: 300px;
    margin-right: 8px;
}

.header-search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--docs-border);
    border-radius: 0.375rem;
    background-color: var(--docs-bg);
    color: var(--docs-text);
}

.header-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--docs-sidebar-text);
}

.github-link {
    display: flex;
    align-items: center;
    color: var(--docs-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-size: 2rem;
}

.github-link:hover {
    background-color: var(--docs-sidebar-hover);
}

.github-link i {
    margin-right: 0.5rem;
}

/* Content */
.docs-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.docs-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.section-header .lead {
    font-size: 1.25rem;
    color: var(--docs-sidebar-text);
    margin: 0;
}

/* Features Grid */
.features-grid, .features-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.features-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.feature-card {
    background-color: var(--docs-card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: none;
    transition: all 0.2s ease;
    border: 1px solid var(--docs-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border-color: var(--docs-sidebar-active);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--docs-sidebar-active);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
    color: var(--docs-text);
}

.feature-card p {
    color: var(--docs-sidebar-text);
    margin: 0;
    font-size: 0.95rem;
}

/* Component Demo */
.component-demo {
    background-color: var(--docs-card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--docs-card-shadow);
    margin-bottom: 2rem;
}

.demo-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--docs-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.copy-code-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--docs-sidebar-bg);
    border: 1px solid var(--docs-border);
    border-radius: 0.375rem;
    color: var(--docs-text);
    cursor: pointer;
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background-color: var(--docs-sidebar-hover);
}

.copy-code-btn i {
    margin-right: 0.5rem;
}

.demo-content {
    padding: 1.5rem;
    background-color: var(--docs-card-bg);
    border: 1px solid var(--docs-border);
    border-radius: 0.5rem;
    box-shadow: var(--docs-card-shadow);
}

.demo-code {
    background-color: var(--docs-code-bg);
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: auto;
}

.demo-code pre {
    margin: 0;
    padding: 1.5rem;
    color: #e2e8f0;
}

/* Playground */
.component-playground {
    background-color: var(--docs-card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--docs-card-shadow);
    padding: 1.5rem;
}

.component-playground h3 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
}

.playground-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.875rem;
    color: var(--docs-sidebar-text);
}

.control-group select,
.control-group input[type="text"] {
    padding: 0.5rem;
    border: 1px solid var(--docs-border);
    border-radius: 0.375rem;
    background-color: var(--docs-bg);
    color: var(--docs-text);
}

.playground-preview {
    padding: 1.5rem;
    background-color: var(--docs-sidebar-bg);
    border-radius: 0.375rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

/* Button Variants */
.btn-primary {
    background-color: var(--docs-sidebar-active);
    color: white;
}

.btn-secondary {
    background-color: var(--docs-sidebar-text);
    color: white;
}

.btn-success {
    background-color: var(--docs-success);
    color: white;
}

.btn-danger {
    background-color: var(--docs-danger);
    color: white;
}

.btn-warning {
    background-color: var(--docs-warning);
    color: white;
}

.btn-info {
    background-color: var(--docs-info);
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-md {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Outline Buttons */
.btn-outline {
    background-color: transparent;
}

.btn-outline.btn-primary {
    border-color: var(--docs-sidebar-active);
    color: var(--docs-sidebar-active);
}

.btn-outline.btn-secondary {
    border-color: var(--docs-sidebar-text);
    color: var(--docs-sidebar-text);
}

.btn-outline.btn-success {
    border-color: var(--docs-success);
    color: var(--docs-success);
}

.btn-outline.btn-danger {
    border-color: var(--docs-danger);
    color: var(--docs-danger);
}

.btn-outline.btn-warning {
    border-color: var(--docs-warning);
    color: var(--docs-warning);
}

.btn-outline.btn-info {
    border-color: var(--docs-info);
    color: var(--docs-info);
}

/* Button Hover States */
.btn:not(.btn-outline):hover {
    opacity: 0.9;
}

.btn-outline:hover {
    background-color: currentColor;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .docs-container {
        display: block;
    }

    .docs-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }

    .docs-sidebar.active {
        transform: translateX(0);
    }

    .docs-main {
        margin-left: 0;
        width: 100%;
    }

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


    .docs-content {
        padding: 1.5rem;
    }

    .component-demo {
        margin-bottom: 1.5rem;
    }

    .demo-content {
        padding: 1rem;
    }

    .playground-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .docs-header {
        padding: 0.75rem 1rem;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .theme-toggle {
        width: 2.25rem;
        height: 2.25rem;
    }

    .github-link span {
        display: none;
    }

    .docs-content {
        padding: 1rem;
    }

    .section-header h1 {
        font-size: 1.75rem;
    }

    .section-header .lead {
        font-size: 1.125rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .demo-header {
        padding: 0.75rem 1rem;
    }

    .demo-content {
        padding: 0.75rem;
    }

    .demo-code pre {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .component-playground {
        padding: 1rem;
    }

    .playground-preview {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .docs-header {
        padding: 0.5rem;
    }

    .header-search {
        max-width: 160px;
    }

    .docs-content {
        padding: 0.75rem;
    }

    .section-header h1 {
        font-size: 1.5rem;
    }

    .section-header .lead {
        font-size: 1rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-card i {
        font-size: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.125rem;
    }

    .demo-header h3 {
        font-size: 1.125rem;
    }

    .copy-code-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

    .demo-content {
        padding: 0.5rem;
    }

    .demo-code pre {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }

    .component-playground {
        padding: 0.75rem;
    }

    .playground-preview {
        padding: 0.75rem;
    }

    .control-group label {
        font-size: 0.8125rem;
    }

    .control-group select,
    .control-group input[type="text"] {
        padding: 0.375rem;
        font-size: 0.875rem;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--docs-sidebar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--docs-sidebar-text);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--docs-sidebar-active);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    color: var(--docs-text);
    background: var(--docs-sidebar-bg);
    border: 1px solid var(--docs-border);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--docs-sidebar-hover);
}

.theme-toggle i {
    font-size: 1.25rem;
}

/* Dark Mode Styles */
[data-theme="dark"] {
    --docs-bg: #0f172a;
    --docs-text: #e2e8f0;
    --docs-sidebar-bg: #1e293b;
    --docs-sidebar-text: #94a3b8;
    --docs-sidebar-active: #3b82f6;
    --docs-sidebar-hover: #334155;
    --docs-border: #334155;
    --docs-code-bg: #0f172a;
    --docs-header-bg: #1e293b;
    --docs-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
    --docs-card-bg: #1e293b;
    --docs-card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

/* Light Mode Styles */
[data-theme="light"] {
    --docs-bg: #ffffff;
    --docs-text: #1a1a1a;
    --docs-sidebar-bg: #f8f9fa;
    --docs-sidebar-text: #4a5568;
    --docs-sidebar-active: #2563eb;
    --docs-sidebar-hover: #e2e8f0;
    --docs-border: #e2e8f0;
    --docs-code-bg: #1e293b;
    --docs-header-bg: #ffffff;
    --docs-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --docs-card-bg: #ffffff;
    --docs-card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Introduction Section */
.component-demo.introduction {
    background: var(--docs-card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--docs-card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.component-demo.introduction .demo-content {
    padding: 0;
}

.component-demo.introduction h2 {
    font-size: 2rem;
    color: var(--docs-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.component-demo.introduction h2::before {
    content: "🔷";
    font-size: 1.75rem;
}

.component-demo.introduction h3 {
    font-size: 1.5rem;
    color: var(--docs-text);
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.component-demo.introduction h3::before {
    content: "🎯";
    font-size: 1.5rem;
}

.component-demo.introduction p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--docs-text);
    margin-bottom: 1.5rem;

}

.component-demo.introduction ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.component-demo.introduction ul li {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--docs-text);
    padding: 1rem 1.5rem;
    background: var(--docs-sidebar-bg);
    border-radius: 0.375rem;
    border-left: 4px solid var(--docs-sidebar-active);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.component-demo.introduction ul li:hover {
    transform: translateX(4px);
    box-shadow: var(--docs-shadow);
}

.component-demo.introduction strong {
    color: var(--docs-sidebar-active);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .component-demo.introduction {
        padding: 1.5rem;
    }

    .component-demo.introduction h2 {
        font-size: 1.75rem;
    }

    .component-demo.introduction h3 {
        font-size: 1.25rem;
    }

    .component-demo.introduction p,
    .component-demo.introduction ul li {
        font-size: 1rem;
    }

    .component-demo.introduction ul li {
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .component-demo.introduction {
        padding: 1.25rem;
    }

    .component-demo.introduction h2 {
        font-size: 1.5rem;
    }

    .component-demo.introduction h3 {
        font-size: 1.125rem;
    }

    .component-demo.introduction p,
    .component-demo.introduction ul li {
        font-size: 0.9375rem;
    }

    .component-demo.introduction ul li {
        padding: 0.75rem 1rem;
    }
} 