/* ============================================
   Anything Search Documentation Styles
   ============================================ */

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --secondary: #0F172A;
    --accent: #22C55E;

    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F1F5F9;

    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;

    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --success: #22C55E;

    --sidebar-width: 280px;
    --content-max-width: 800px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* Layout */
.docs-layout { display: flex; min-height: 100vh; background: var(--bg); }

/* Sidebar */
.docs-sidebar {
    position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh;
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; z-index: 100; overflow: hidden;
}

.docs-sidebar__header {
    padding: 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}

.docs-sidebar__logo {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
    color: var(--text-primary); font-weight: 600; font-size: 16px;
}

.docs-sidebar__logo-icon { font-size: 24px; }

.docs-sidebar__version {
    padding: 4px 8px; font-size: 11px; font-weight: 600;
    color: var(--text-muted); background: var(--bg); border-radius: 4px;
}

.docs-sidebar__search {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}

.docs-sidebar__search svg { color: var(--text-muted); flex-shrink: 0; }

.docs-sidebar__search input {
    flex: 1; border: none; background: transparent; font-size: 14px;
    color: var(--text-primary); outline: none;
}

.docs-sidebar__search input::placeholder { color: var(--text-muted); }

.docs-nav { flex: 1; overflow-y: auto; padding: 16px 0; }
.docs-nav__section { margin-bottom: 24px; }

.docs-nav__title {
    padding: 8px 20px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
}

.docs-nav__list { list-style: none; padding: 0; margin: 0; }

.docs-nav__link {
    display: block; padding: 8px 20px; font-size: 14px; color: var(--text-secondary);
    text-decoration: none; transition: var(--transition); border-left: 3px solid transparent;
}

.docs-nav__link:hover { color: var(--text-primary); background: var(--bg); }

.docs-nav__link.active {
    color: var(--primary); background: rgba(37, 99, 235, 0.05);
    border-left-color: var(--primary); font-weight: 500;
}

.docs-sidebar__footer { padding: 16px 20px; border-top: 1px solid var(--border); }

.docs-sidebar__back {
    display: flex; align-items: center; gap: 8px; font-size: 13px;
    color: var(--text-secondary); text-decoration: none; transition: var(--transition);
}

.docs-sidebar__back:hover { color: var(--primary); }

/* Mobile Toggle */
.docs-mobile-toggle {
    display: none; position: fixed; bottom: 24px; right: 24px;
    width: 56px; height: 56px; background: var(--primary); color: white;
    border: none; border-radius: 50%; cursor: pointer; z-index: 200;
    box-shadow: var(--shadow-lg); align-items: center; justify-content: center;
}

/* Main Content */
.docs-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; }
.docs-content__container { max-width: var(--content-max-width); margin: 0 auto; padding: 40px; }

/* Breadcrumb */
.docs-breadcrumb { margin-bottom: 32px; }
.docs-breadcrumb ol { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; font-size: 14px; }
.docs-breadcrumb li { display: flex; align-items: center; gap: 8px; }
.docs-breadcrumb li:not(:last-child)::after { content: "/"; color: var(--text-muted); }
.docs-breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.docs-breadcrumb a:hover { color: var(--primary); }
.docs-breadcrumb li[aria-current="page"] { color: var(--text-primary); font-weight: 500; }

/* Hero */
.docs-hero { margin-bottom: 40px; }
.docs-hero__badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
    font-size: 12px; font-weight: 600; color: var(--primary);
    background: rgba(37, 99, 235, 0.1); border-radius: 20px; margin-bottom: 16px;
}
.docs-hero__title { font-size: 36px; font-weight: 700; color: var(--text-primary); margin: 0 0 16px; line-height: 1.2; }
.docs-hero__desc { font-size: 18px; color: var(--text-secondary); margin: 0 0 20px; line-height: 1.6; }
.docs-hero__meta { display: flex; gap: 24px; font-size: 14px; color: var(--text-muted); }
.docs-hero__meta span { display: flex; align-items: center; gap: 6px; }

/* TOC */
.docs-toc { padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 40px; }
.docs-toc__title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 16px; }
.docs-toc__list { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
.docs-toc__list a { font-size: 14px; color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.docs-toc__list a:hover { color: var(--primary); }

/* Article */
.docs-article { line-height: 1.7; }
.docs-section { margin-bottom: 64px; scroll-margin-top: 24px; }
.docs-section h2 { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 700; color: var(--text-primary); margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.docs-section__icon { font-size: 28px; }
.docs-section h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin: 32px 0 16px; }
.docs-section h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 24px 0 12px; }
.docs-section p { font-size: 16px; color: var(--text-secondary); margin: 0 0 16px; }

/* Callouts */
.docs-callout { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius); margin: 24px 0; }
.docs-callout__icon { font-size: 24px; flex-shrink: 0; }
.docs-callout__content { flex: 1; }
.docs-callout__content strong { display: block; margin-bottom: 8px; color: var(--text-primary); }
.docs-callout__content p { margin: 0; }
.docs-callout__content ul { margin: 8px 0 0; padding-left: 20px; }
.docs-callout__content li { margin-bottom: 4px; }
.docs-callout--info { background: rgba(59, 130, 246, 0.1); border-left: 4px solid var(--info); }
.docs-callout--success { background: rgba(34, 197, 94, 0.1); border-left: 4px solid var(--success); }
.docs-callout--warning { background: rgba(245, 158, 11, 0.1); border-left: 4px solid var(--warning); }
.docs-callout--danger { background: rgba(239, 68, 68, 0.1); border-left: 4px solid var(--danger); }

/* Buttons */
.docs-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; font-size: 15px; font-weight: 600; text-decoration: none; border-radius: var(--radius); transition: var(--transition); }
.docs-btn--primary { background: var(--primary); color: white; }
.docs-btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Steps */
.docs-steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: step; }
.docs-steps li { position: relative; padding: 16px 0 16px 48px; border-left: 2px solid var(--border); margin-left: 16px; counter-increment: step; }
.docs-steps li::before { content: counter(step); position: absolute; left: -17px; top: 16px; width: 32px; height: 32px; background: var(--primary); color: white; font-size: 14px; font-weight: 600; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.docs-steps li strong { display: block; font-size: 16px; color: var(--text-primary); margin-bottom: 4px; }
.docs-steps li p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Lists */
.docs-list { padding-left: 24px; margin: 16px 0; }
.docs-list li { margin-bottom: 8px; color: var(--text-secondary); }
.docs-list li strong { color: var(--text-primary); }

/* Tables */
.docs-table-wrapper { overflow-x: auto; margin: 24px 0; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-table th, .docs-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.docs-table th { background: var(--bg); font-weight: 600; color: var(--text-primary); }
.docs-table td { color: var(--text-secondary); }
.docs-table tbody tr:hover { background: var(--bg); }

/* Code */
.docs-code { display: inline-block; padding: 8px 16px; background: var(--secondary); color: #E5E7EB; border-radius: var(--radius); font-family: 'Consolas', monospace; font-size: 14px; margin: 8px 0; }
.docs-code-block { margin: 16px 0; }
.docs-code-block pre { background: var(--secondary); color: #E5E7EB; padding: 20px; border-radius: var(--radius); overflow-x: auto; font-family: 'Consolas', monospace; font-size: 14px; line-height: 1.6; margin: 0; }
kbd { display: inline-block; padding: 3px 8px; font-size: 12px; font-family: 'Consolas', monospace; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 1px 0 var(--border); }

/* Diagram */
.docs-diagram { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 32px; background: var(--bg); border-radius: var(--radius-lg); margin: 24px 0; flex-wrap: wrap; }
.docs-diagram__step { text-align: center; }
.docs-diagram__number { width: 48px; height: 48px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; margin: 0 auto 8px; }
.docs-diagram__label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.docs-diagram__arrow { font-size: 24px; color: var(--text-muted); }

/* Quick Start */
.docs-quick-start { margin: 24px 0; }
.docs-quick-start__item { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.docs-quick-start__item:last-child { border-bottom: none; }
.docs-quick-start__step { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; flex-shrink: 0; }
.docs-quick-start__content h4 { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 8px; }
.docs-quick-start__content p { font-size: 15px; color: var(--text-secondary); margin: 0 0 12px; }
.docs-quick-start__image { margin-top: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.docs-quick-start__image img { display: block; max-width: 100%; }

/* Example */
.docs-example { margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.docs-example__header { padding: 10px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border); }
.docs-example__content { padding: 20px; }
.docs-example__search { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg); border-radius: var(--radius); margin-bottom: 16px; }
.docs-example__icon { font-size: 18px; }
.docs-example__query { font-size: 16px; font-weight: 500; color: var(--text-primary); }
.docs-example__results { display: flex; flex-direction: column; gap: 8px; }
.docs-example__result { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--text-primary); }

/* Syntax Cards */
.docs-syntax-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.docs-syntax-card { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.docs-syntax-card h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 12px; }
.docs-syntax-card p { font-size: 13px; color: var(--text-secondary); margin: 8px 0 0; }

/* Feature Box */
.docs-feature-box { display: flex; gap: 16px; padding: 20px; background: rgba(34, 197, 94, 0.1); border: 1px solid var(--success); border-radius: var(--radius); margin: 16px 0; }
.docs-feature-box--disabled { background: var(--bg); border-color: var(--border); }
.docs-feature-box__icon { font-size: 24px; flex-shrink: 0; }
.docs-feature-box__content h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0 0 8px; }
.docs-feature-box__content ul { margin: 0; padding-left: 20px; }
.docs-feature-box__content li { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }

/* Menu Preview */
.docs-menu-preview { max-width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: 24px 0; overflow: hidden; }
.docs-menu-preview__header { padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border); }
.docs-menu-preview__list { list-style: none; padding: 8px 0; margin: 0; }
.docs-menu-preview__list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14px; color: var(--text-secondary); }
.docs-menu-preview__list li strong { color: var(--text-primary); }
.docs-menu-preview__separator { height: 1px; background: var(--border); margin: 8px 0; }

/* Settings */
.docs-settings-list { margin: 24px 0; }
.docs-setting { padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.docs-setting__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.docs-setting__header h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0; }
.docs-setting__type { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg); padding: 4px 8px; border-radius: 4px; }
.docs-setting p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Shortcuts */
.docs-shortcuts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin: 24px 0; }
.docs-shortcuts__group h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.docs-shortcut { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.docs-shortcut__keys { display: flex; gap: 4px; }
.docs-shortcut__desc { font-size: 14px; color: var(--text-secondary); }

/* Tips */
.docs-tips { margin: 24px 0; }
.docs-tip { display: flex; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.docs-tip__number { width: 32px; height: 32px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.docs-tip__content h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0 0 8px; }
.docs-tip__content p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Troubleshooting */
.docs-troubleshooting { margin: 24px 0; }
.docs-trouble-item { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.docs-trouble-item h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0 0 12px; }
.docs-trouble-solution { padding-top: 12px; border-top: 1px solid var(--border); }
.docs-trouble-solution strong { font-size: 14px; color: var(--success); }
.docs-trouble-solution ol { margin: 8px 0 0; padding-left: 20px; }
.docs-trouble-solution li { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }

/* FAQ */
.docs-faq { margin: 24px 0; }
.docs-faq__item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.docs-faq__question { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 20px; font-size: 15px; font-weight: 500; color: var(--text-primary); background: var(--bg); border: none; cursor: pointer; text-align: left; transition: var(--transition); }
.docs-faq__question:hover { background: var(--border-light); }
.docs-faq__question svg { color: var(--text-muted); transition: var(--transition); flex-shrink: 0; }
.docs-faq__item.active .docs-faq__question svg { transform: rotate(180deg); }
.docs-faq__answer { display: none; padding: 0 20px 16px; background: var(--surface); }
.docs-faq__item.active .docs-faq__answer { display: block; }
.docs-faq__answer p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Contact */
.docs-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }
.docs-contact-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; text-decoration: none; transition: var(--transition); }
.docs-contact-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.docs-contact-card__icon { font-size: 32px; margin-bottom: 12px; }
.docs-contact-card h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0 0 8px; }
.docs-contact-card p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Changelog */
.docs-changelog { margin: 24px 0; }
.docs-changelog__item { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.docs-changelog__item--latest { border-color: var(--primary); border-width: 2px; }
.docs-changelog__header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.docs-changelog__version { padding: 6px 14px; font-size: 14px; font-weight: 600; color: white; background: var(--primary); border-radius: 20px; }
.docs-changelog__date { font-size: 14px; color: var(--text-muted); }
.docs-changelog__badge { padding: 4px 10px; font-size: 11px; font-weight: 600; color: white; background: var(--success); border-radius: 4px; }
.docs-changelog__content h4 { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 16px; }
.docs-changelog__content ul { margin: 0; padding-left: 20px; }
.docs-changelog__content li { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }

/* Next Steps */
.docs-next { margin-top: 64px; padding-top: 40px; border-top: 2px solid var(--border); }
.docs-next h3 { font-size: 22px; font-weight: 600; color: var(--text-primary); margin: 0 0 24px; }
.docs-next__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.docs-next__card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: var(--transition); }
.docs-next__card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.docs-next__icon { font-size: 28px; }
.docs-next__content { flex: 1; }
.docs-next__content h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 4px; }
.docs-next__content p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.docs-next__card svg { color: var(--text-muted); flex-shrink: 0; }

/* Footer */
.docs-footer { margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--border); }
.docs-footer__content { display: flex; justify-content: space-between; align-items: center; }
.docs-footer__content p { font-size: 14px; color: var(--text-muted); margin: 0; }
.docs-footer__links { display: flex; gap: 24px; }
.docs-footer__links a { font-size: 14px; color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.docs-footer__links a:hover { color: var(--primary); }

/* Progress */
.docs-progress { position: fixed; top: 0; left: var(--sidebar-width); right: 0; height: 3px; background: var(--primary); transform-origin: left; transform: scaleX(0); z-index: 200; }

/* Responsive */
@media (max-width: 1024px) {
    .docs-sidebar { transform: translateX(-100%); transition: var(--transition); }
    .docs-sidebar.open { transform: translateX(0); }
    .docs-mobile-toggle { display: flex; }
    .docs-content { margin-left: 0; }
    .docs-progress { left: 0; }
    .docs-shortcuts, .docs-syntax-grid, .docs-contact-grid, .docs-next__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .docs-content__container { padding: 24px 16px; }
    .docs-hero__title { font-size: 28px; }
    .docs-section h2 { font-size: 24px; }
    .docs-hero__meta, .docs-toc__list { flex-direction: column; gap: 8px; }
    .docs-diagram { flex-direction: column; }
    .docs-diagram__arrow { transform: rotate(90deg); }
    .docs-footer__content { flex-direction: column; gap: 16px; text-align: center; }
}

@media print {
    .docs-sidebar, .docs-mobile-toggle, .docs-progress, .docs-toc, .docs-next { display: none; }
    .docs-content { margin-left: 0; }
    .docs-section { page-break-inside: avoid; }
}