/* ============================================
   DOCS SITE GENERATOR — DESIGN SYSTEM
   Dark theme, glassmorphism, premium aesthetics
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-sidebar: rgba(15, 20, 40, 0.95);
    --bg-code: #0d1117;
    --text-primary: #e8edf5;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #22d3ee;
    --accent-teal: #2dd4bf;
    --accent-amber: #fbbf24;
    --accent-violet: #a78bfa;
    --accent-rose: #fb7185;
    --border-color: rgba(148, 163, 184, 0.1);
    --border-active: rgba(34, 211, 238, 0.4);
    --gradient-accent: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
    --gradient-card: linear-gradient(145deg, rgba(26, 32, 53, 0.8), rgba(15, 20, 40, 0.6));
    --gradient-hero: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(45, 212, 191, 0.05));
    --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.4);
    --sidebar-width: 280px;
    --header-height: 56px;
    --content-max-width: 900px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: rgba(34, 211, 238, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.35);
}

/* --- Layout --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-smooth);
}

.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* --- Sidebar Header --- */
.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 2px 0;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    text-decoration: none;
    user-select: none;
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(34, 211, 238, 0.06);
    border-left-color: rgba(34, 211, 238, 0.3);
}

.nav-item.active {
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    border-left-color: var(--accent-cyan);
    font-weight: 600;
}

.nav-item .nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 14px;
}

/* --- Sidebar Footer --- */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.github-link:hover {
    color: var(--text-primary);
    background: rgba(148, 163, 184, 0.08);
}

.github-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* --- Mobile Header --- */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 0 16px;
    height: var(--header-height);
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    justify-content: space-between;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.lang-btn {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    background: rgba(34, 211, 238, 0.2);
}

.lang-btn.lang-en {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--accent-amber);
}

/* --- Sidebar Overlay (Mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* --- Content Header --- */
.content-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px;
}

.content-header-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.content-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.content-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.lang-toggle-btn:hover {
    background: rgba(34, 211, 238, 0.15);
    box-shadow: var(--shadow-glow);
}

.lang-toggle-btn.lang-en {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--accent-amber);
}

.scroll-top-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn:hover {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-cyan);
    border-color: var(--border-active);
}

/* --- Content Area --- */
.content-area {
    padding: 32px 40px 60px;
}

.article {
    max-width: var(--content-max-width);
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Article Typography --- */
.article h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 20px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.02em;
}

.article h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin: 28px 0 12px;
}

.article h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 20px 0 8px;
}

.article p {
    margin: 0 0 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article em {
    color: var(--accent-teal);
    font-style: italic;
}

.article a {
    color: var(--accent-cyan);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.article a:hover {
    border-bottom-color: var(--accent-cyan);
}

/* --- Lists --- */
.article ul, .article ol {
    margin: 0 0 16px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article li {
    margin: 6px 0;
    line-height: 1.7;
}

.article li::marker {
    color: var(--accent-cyan);
}

.article ul ul, .article ol ol, .article ul ol, .article ol ul {
    margin: 4px 0 4px 0;
}

/* --- Code --- */
.article code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88em;
    background: rgba(34, 211, 238, 0.08);
    color: var(--accent-cyan);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(34, 211, 238, 0.12);
}

.article pre {
    margin: 0 0 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-code);
}

.article pre code {
    display: block;
    padding: 20px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.65;
    background: none;
    color: var(--text-secondary);
    border: none;
    border-radius: 0;
}

/* --- Tables --- */
.article table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.article thead {
    position: sticky;
    top: 0;
}

.article th {
    background: rgba(34, 211, 238, 0.08);
    color: var(--accent-cyan);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.article tr:hover td {
    background: rgba(34, 211, 238, 0.03);
}

/* --- Blockquotes --- */
.article blockquote {
    margin: 0 0 20px;
    padding: 16px 20px;
    border-left: 3px solid var(--accent-cyan);
    background: rgba(34, 211, 238, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article blockquote p {
    margin: 0;
}

/* --- Horizontal Rule --- */
.article hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 32px 0;
}

/* --- Images --- */
.article img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin: 8px 0;
}

/* ==================================
   PROMPTS PAGE — Cards & Detail
   ================================== */

/* --- Prompts Grid --- */
.prompts-header {
    text-align: center;
    margin-bottom: 40px;
}

.prompts-header h1 {
    font-size: 36px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.prompts-header p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.prompts-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--gradient-accent);
    color: #0a0e1a;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-active);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.btn-outline:hover {
    background: rgba(34, 211, 238, 0.08);
}

.section-divider {
    margin: 40px 0 24px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* --- Prompt Card --- */
.prompt-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.prompt-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.prompt-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.card-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.08);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.card-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.3;
}

.card-info .card-role {
    font-size: 12.5px;
    color: var(--accent-teal);
    font-weight: 500;
}

.card-description {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    text-align: center;
    border: none;
}

.card-btn-view {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.card-btn-view:hover {
    background: rgba(34, 211, 238, 0.2);
}

.card-btn-download {
    background: rgba(45, 212, 191, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.card-btn-download:hover {
    background: rgba(45, 212, 191, 0.2);
}

/* --- Prompt Detail Page --- */
.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 24px;
    transition: color var(--transition-fast);
    background: none;
    border: none;
    font-family: inherit;
}

.detail-back:hover {
    color: var(--accent-cyan);
}

.detail-hero {
    background: var(--gradient-hero);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 28px;
}

.detail-hero-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.detail-icon {
    font-size: 40px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.1);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.detail-meta h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.detail-meta .detail-role {
    font-size: 14px;
    color: var(--accent-teal);
    font-weight: 500;
    margin-bottom: 12px;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-agent {
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent-violet);
    border: 1px solid rgba(167, 139, 250, 0.25);
}

.badge-skill {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-amber);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge-file {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
}

/* --- Tabs --- */
.tabs-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    font-weight: 600;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.active {
    display: block;
}

/* --- Raw Code Panel --- */
.raw-code-container {
    position: relative;
}

.raw-code-container pre {
    max-height: 600px;
    overflow: auto;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    z-index: 5;
}

.copy-btn:hover {
    background: rgba(34, 211, 238, 0.2);
}

.copy-btn.copied {
    background: rgba(45, 212, 191, 0.2);
    color: var(--accent-teal);
    border-color: rgba(45, 212, 191, 0.3);
}

/* ==================================
   RESPONSIVE — Mobile (<= 900px)
   ================================== */

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .mobile-header {
        display: flex;
    }

    .content-header {
        display: none;
    }

    .content-area {
        padding: 20px 16px 40px;
    }

    .article h1 {
        font-size: 24px;
    }

    .article h2 {
        font-size: 19px;
    }

    .prompts-grid {
        grid-template-columns: 1fr;
    }

    .prompts-header h1 {
        font-size: 28px;
    }

    .detail-hero {
        padding: 20px;
    }

    .detail-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-badges {
        justify-content: center;
    }

    .tabs-bar {
        gap: 0;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 12.5px;
    }

    .card-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .prompts-grid {
        gap: 14px;
    }

    .prompt-card {
        padding: 18px;
    }

    .article pre code {
        font-size: 12px;
        padding: 14px;
    }
}
