/* 全局与滚动 */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 玻璃态导航 */
.glass-nav {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* 渐变文本 */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 极简网格背景 */
.bg-grid-pattern {
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 70%);
}

/* 统一过渡 */
.transition-theme {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* 代码块切换器过渡 */
.code-pane { display: none; }
.code-pane.active { display: block; animation: fadeIn 0.3s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ========== Login Modal ========== */
.login-modal-overlay { transition: opacity 0.2s ease; }
.login-modal-overlay:not(.login-modal-open) { pointer-events: none; opacity: 0; }
.login-modal-overlay.login-modal-open { display: flex !important; pointer-events: auto; opacity: 1; }
.login-modal-overlay.login-modal-open .login-modal-backdrop { opacity: 1; }
.login-modal-overlay.login-modal-open .login-modal-dialog { opacity: 1; transform: scale(1); }
.login-modal-dialog { opacity: 0; transform: scale(0.95); transition: opacity 0.2s ease, transform 0.2s ease; }
.login-modal-panel { display: block; }
.login-modal-panel.hidden { display: none !important; }
@media (max-width: 520px) {
    .login-modal-dialog { max-width: 100%; margin: 0.5rem; }
}

/* ========== Model Detail Panel (侧边栏) ========== */
.model-detail-overlay { transition: opacity 0.25s ease; }
.model-detail-overlay:not(.model-detail-open) { pointer-events: none; opacity: 0; }
.model-detail-overlay.model-detail-open { display: block !important; pointer-events: auto; opacity: 1; }
.model-detail-overlay.model-detail-open .model-detail-panel { transform: translateX(0); }
.model-detail-panel { transform: translateX(100%); will-change: transform; }

/* 卡片样式 */
.model-detail-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.model-detail-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.dark .model-detail-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 状态条 */
.model-detail-status-bar .model-detail-status-dot { width: 8px; height: 10px; border-radius: 1px; flex-shrink: 0; }
.model-detail-status-bar .model-detail-status-dot.status-ok { background-color: #22c55e; }
.model-detail-status-bar .model-detail-status-dot.status-error { background-color: #ef4444; }

/* API 代码块 */
.model-detail-api-item {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}
.dark .model-detail-api-item {
    background: #111113;
    border-color: #27272a;
}

/* 价格强调 */
.model-detail-price-main {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}
.dark .model-detail-price-main {
    color: #fff;
}
.model-detail-price-unit {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}
.dark .model-detail-price-unit {
    color: #9ca3af;
}

@media (max-width: 480px) {
    .model-detail-panel { max-width: 100%; }
}

/* ========== Console Navigation ========== */
.console-nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.console-nav-item {
    transition: all 0.2s ease;
}
.console-nav-item.active,
.console-nav-item:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
}
.dark .console-nav-item.active,
.dark .console-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 控制台页面专用样式 */
.console-page {
    background: #f9fafb;
}
.dark .console-page {
    background: #09090b;
}
.console-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}
.console-card:hover {
    border-color: #d1d5db;
}
.dark .console-card {
    background: #111113;
    border-color: #27272a;
}
.dark .console-card:hover {
    border-color: #3f3f46;
}

/* ========== Tools Module ========== */
.tool-nav-item.active,
.tool-sub-nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    font-weight: 500;
}
.dark .tool-nav-item.active,
.dark .tool-sub-nav-item.active {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}
.tool-card {
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}
.tool-card:hover {
    border-color: #71717a;
    transform: translateY(-2px);
}
.tool-page-main { padding-top: 8rem; min-height: calc(100vh - 12rem); }
.tool-sub-nav { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tool-sub-nav-item { transition: all 0.2s ease; }
.tool-sub-nav-item:hover { background: rgba(0, 0, 0, 0.06); color: #111827; }
.dark .tool-sub-nav-item:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tool-three-col { display: grid; gap: 1.5rem; min-height: calc(100vh - 14rem); }
@media (min-width: 1024px) { .tool-three-col { grid-template-columns: 300px 1fr 320px; } }
/* 资产库 */
.asset-tab { transition: all 0.2s ease; }
.asset-tab.active { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.dark .asset-tab.active { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
