* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0a0a0a;
    --bg2: #111111;
    --card: #1a1a1a;
    --border: rgba(255,255,255,0.08);
    --text: #e5e5e5;
    --text2: #888;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --accent: #f87171;
    --success: #4ade80;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
}
.nav-logo {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    gap: 8px;
    margin-left: 40px;
    flex: 1;
}
.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text2);
    transition: all 0.15s;
    cursor: pointer;
}
.nav-link:hover, .nav-link.active {
    background: rgba(99,102,241,0.15);
    color: var(--primary-hover);
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-balance {
    font-size: 14px;
    color: var(--text2);
    padding: 6px 12px;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.nav-balance span { color: var(--accent); font-weight: 600; }
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
    position: relative;
    z-index: 100;
}
.nav-dropdown {
    display: block;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    margin-top: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    min-width: 120px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 101;
}
.nav-dropdown-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.nav-dropdown-item:hover { background: rgba(99,102,241,0.15); }
.nav-login-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

/* Page container */
.page { display: none; padding-top: 56px; min-height: 100vh; }
.page.active { display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    transition: all 0.15s;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active {
    background: rgba(99,102,241,0.2);
    border-color: var(--primary);
    color: var(--primary-hover);
}

/* Recharge package selection */
.recharge-pkg {
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.recharge-pkg:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.recharge-pkg.active {
    border-color: var(--primary);
    background: rgba(99,102,241,0.15);
    box-shadow: 0 0 0 2px var(--primary);
}

/* Prompt grid */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.prompt-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.prompt-card:hover {
    border-color: rgba(99,102,241,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.prompt-card-img {
    width: 100%;
    aspect-ratio: 1;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
}
.prompt-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prompt-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.prompt-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.prompt-card:hover .prompt-card-overlay { display: flex; }
.prompt-card-overlay .prompt-text {
    font-size: 13px;
    line-height: 1.6;
    color: #ddd;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.prompt-card-overlay .prompt-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.prompt-card-body { padding: 12px; }
.prompt-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}
.prompt-card-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    background: rgba(99,102,241,0.15);
    color: var(--primary-hover);
}

/* Button styles */
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color: #0a0a0a; }
.btn-danger {
    background: rgba(248,113,113,0.2);
    color: var(--accent);
    border: 1px solid rgba(248,113,113,0.3);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 900px;
    width: 95%;
    display: flex;
}
.prompt-modal-img { flex: 1; min-height: 0; border-radius: 12px; overflow: hidden; margin-left: 20px; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.prompt-modal-img img { width: 100%; height: 100%; max-height: 70vh; object-fit: contain; }
.prompt-modal-text { background: var(--bg); border-radius: 12px; padding: 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.7; color: var(--text2); max-height: 300px; overflow-y: auto; word-break: break-word; }
.prompt-modal-actions { display: flex; gap: 12px; }
.prompt-modal-actions .btn { flex: 1; justify-content: center; }
.prompt-modal-left { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; }
.modal-title { font-size: 20px; font-weight: 600; margin-bottom: 24px; }
.modal-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.15s;
}
.modal-input:focus { border-color: var(--primary); }
.modal-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}
.modal-link {
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    margin-top: 16px;
    text-align: center;
}
.modal-link:hover { color: var(--primary-hover); }
.modal-divider { border-top: 1px solid var(--border); margin: 16px 0; }
.modal-hint { font-size: 12px; color: var(--text2); text-align: center; margin-top: 12px; }

/* 注册模态框 */
.register-modal .modal-input {
    margin-bottom: 12px;
}
.code-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.code-row .modal-input {
    flex: 1;
    margin-bottom: 0;
}
.send-code-btn {
    padding: 0 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

/* 密码显示切换 */
.pwd-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.pwd-input {
    width: 100%;
    padding-right: 44px !important;
}
.pwd-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.send-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Generate page */
.generate-container { max-width: 800px; margin: 0 auto; padding: 24px; }
.generate-header { text-align: center; margin-bottom: 32px; }
.generate-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.generate-header p { color: var(--text2); font-size: 15px; }
.generate-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.generate-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    font-family: inherit;
}
.generate-textarea:focus { border-color: var(--primary); }
.generate-options {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.generate-option { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.size-select {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    outline: none;
}
.ref-img-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    width: auto;
}
.ref-img-input::placeholder { color: var(--text2); }
.ref-img-area {
    margin-top: 16px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s;
}
.ref-img-area.has-image { border-style: solid; border-color: rgba(99,102,241,0.5); }
.ref-img-drop {
    text-align: center;
    padding: 20px;
    color: var(--text2);
    cursor: pointer;
    border: 1px dashed var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
}
.ref-img-drop:hover { color: var(--primary); border-color: var(--primary); }
.ref-img-drop p { margin-top: 8px; font-size: 13px; }
.ref-img-link { color: var(--primary); text-decoration: underline; }
.ref-img-hint { font-size: 11px !important; color: var(--text2) !important; }
.ref-img-preview {
    position: relative;
    display: inline-block;
}
.ref-img-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    display: block;
}
.ref-img-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    line-height: 24px;
}
.ref-img-url-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.ref-img-validate-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.ref-img-validate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ref-img-error { color: var(--accent); font-size: 12px; margin-top: 8px; }
.generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
}
.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}
.generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.generate-result { margin-top: 24px; text-align: center; }
.generate-result img { max-width: 100%; max-height: 512px; border-radius: 12px; border: 1px solid var(--border); }
.generate-result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* Profile page */
.profile-container { max-width: 700px; margin: 0 auto; padding: 24px; }
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}
.profile-info h2 { font-size: 20px; margin-bottom: 4px; }
.profile-info p { color: var(--text2); font-size: 14px; }
.profile-balance {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.profile-balance-left h3 { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.profile-balance .amount { font-size: 36px; font-weight: 700; color: var(--accent); }
.profile-balance .amount span { font-size: 16px; font-weight: 400; color: var(--text2); }
.profile-balance .stats { display: flex; gap: 24px; }
.profile-balance .stat-item { text-align: center; }
.profile-balance .stat-item .num { font-size: 20px; font-weight: 700; color: var(--primary); }
.profile-balance .stat-item .label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.profile-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.profile-section h3 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.profile-section h3 svg { color: var(--primary); }
.apikey-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 8px; margin-bottom: 8px; }
.apikey-key { flex: 1; font-family: monospace; font-size: 13px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.history-item { background: var(--bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.history-thumb { width: 100%; aspect-ratio: 1; background: var(--bg); overflow: hidden; }
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-info { padding: 10px; }
.history-info .prompt-preview { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-info .time { font-size: 11px; color: var(--text2); margin-top: 4px; opacity: 0.6; }
.history-info .cost { font-size: 11px; color: var(--accent); margin-top: 2px; }

/* History preview modal */
.history-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 90vh;
    overflow: auto;
}
.history-preview-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    transition: transform 0.3s;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Loading */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; gap: 16px; }
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--text2); font-size: 14px; }

/* Prompt modal */
.prompt-modal-img { flex: 1; min-height: 300px; border-radius: 12px; overflow: hidden; margin-left: 20px; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.prompt-modal-img img { width: 100%; height: 100%; object-fit: contain; }
.prompt-modal-text { background: var(--bg); border-radius: 12px; padding: 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.7; color: var(--text2); max-height: 400px; overflow-y: auto; word-break: break-word; }
.prompt-modal-actions { display: flex; gap: 12px; flex-shrink: 0; }
.prompt-modal-actions .btn { flex: 1; justify-content: center; }
.prompt-modal-left { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; }
.prompt-modal-actions { display: flex; gap: 12px; }
.prompt-modal-actions .btn { flex: 1; justify-content: center; }

/* Quick login hint */
.quick-login-hint { text-align: center; color: var(--text2); font-size: 13px; margin-bottom: 16px; }

/* Consume table */
.consume-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.consume-table th { text-align: left; padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--border); color: var(--text2); font-weight: 500; }
.consume-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.consume-table tr:last-child td { border-bottom: none; }
.consume-table tr:hover td { background: rgba(99,102,241,0.05); }
.type-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: rgba(99,102,241,0.15); color: var(--primary-hover); }

/* Empty state */
.empty-state { text-align: center; padding: 40px; color: var(--text2); }
.empty-state svg { opacity: 0.3; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== Doc Page ===== */
.doc-layout {
    display: flex;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}
.doc-sidebar {
    flex-shrink: 0;
    width: 160px;
}
.doc-copy-all-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 20px 16px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}
.doc-copy-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}
.doc-copy-all-btn small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
}
.doc-main { flex: 1; min-width: 0; }
.doc-container { max-width: 860px; }
.doc-hero {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 32px;
}
.doc-hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.doc-hero p {
    color: var(--text2);
    font-size: 15px;
}
.doc-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.doc-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}
.doc-endpoint-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.doc-method-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}
.doc-method-badge.post { background: rgba(34,197,94,0.15); color: #22c55e; }
.doc-method-badge.auth { background: rgba(99,102,241,0.15); color: #818cf8; }
.doc-endpoint-code {
    font-family: monospace;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 6px;
}
.doc-auth-code {
    font-family: monospace;
    font-size: 13px;
    color: #a5d6ff;
    background: #0d0d0d;
    padding: 8px 14px;
    border-radius: 6px;
    flex: 1;
}
.doc-copy-btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.doc-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
}
.doc-subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 12px;
}
.doc-params-table {
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
}
.doc-param-row {
    display: grid;
    grid-template-columns: 120px 80px 60px 1fr;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    font-size: 13px;
}
.doc-param-row:last-child { border-bottom: none; }
.doc-param-row.header {
    background: rgba(99,102,241,0.1);
    color: var(--text2);
    font-weight: 500;
}
.doc-param-row code {
    background: rgba(99,102,241,0.15);
    color: var(--primary-hover);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}
.doc-param-row .required { color: #f87171; }
.doc-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.doc-size-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 13px;
}
.doc-size-item code {
    font-family: monospace;
    color: var(--primary);
    font-weight: 600;
}
.doc-size-item span { color: var(--text2); }
.doc-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.doc-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    transition: all 0.15s;
}
.doc-tab:hover { border-color: var(--primary); color: var(--primary); }
.doc-tab.active { background: var(--primary); border-color: var(--primary); color: white; }
.doc-code-block { display: block; }
.doc-code-block.hidden { display: none; }
.doc-code-block pre {
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-size: 13px;
    color: #a5d6ff;
    overflow-x: auto;
    margin: 0;
    line-height: 1.6;
}
.doc-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.doc-code-lang {
    font-size: 12px;
    color: var(--text2);
    font-weight: 500;
}
.doc-response-grid {
    display: grid;
    gap: 12px;
}
.doc-response-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 16px;
    position: relative;
}
.doc-response-item pre {
    font-family: monospace;
    font-size: 12px;
    color: #a5d6ff;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.doc-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}
.doc-status-badge.success { background: rgba(34,197,94,0.15); color: #22c55e; }
.doc-status-badge.error { background: rgba(248,113,113,0.15); color: #f87171; }
.doc-billing {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(248,113,113,0.1));
    border: 1px solid rgba(99,102,241,0.2);
}
.doc-billing-icon { font-size: 32px; }
.doc-billing-content h3 { font-size: 16px; margin-bottom: 6px; }
.doc-billing-content p { font-size: 14px; color: var(--text2); margin: 0; }