/* MiMotion 自定义样式 — 支持 dark/light 双主题 */

body {
    min-height: 100vh;
}

/* ===== 暗色主题覆盖 ===== */
[data-bs-theme="dark"] body {
    background-color: #212529;
}

[data-bs-theme="dark"] .card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .table > :not(caption) > * > * {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] pre {
    background-color: #1a1d23;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] code {
    color: #e685b5;
}

[data-bs-theme="dark"] .card-header {
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .bg-dark {
    background-color: #1a1d23 !important;
}

/* ===== 亮色主题覆盖 ===== */
[data-bs-theme="light"] body {
    background-color: #f5f6fa;
}

[data-bs-theme="light"] .card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .table > :not(caption) > * > * {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] pre {
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] code {
    color: #d63384;
}

[data-bs-theme="light"] .card-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="light"] .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* ===== 通用样式 ===== */
pre {
    padding: 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    max-height: 600px;
    overflow-y: auto;
}

.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
}

/* 表格垂直居中 */
.table td, .table th {
    vertical-align: middle;
}

.alert {
    border: none;
}

/* 数字等宽字体 */
.font-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* 主题切换按钮 */
#themeToggle {
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0.5rem 0.75rem;
    transition: opacity 0.2s;
}

#themeToggle:hover {
    opacity: 0.7;
}

/* 亮色主题下 navbar-dark 的兼容 */
[data-bs-theme="light"] .navbar-dark .navbar-brand,
[data-bs-theme="light"] .navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

[data-bs-theme="light"] .navbar-light .navbar-brand,
[data-bs-theme="light"] .navbar-light .nav-link {
    color: rgba(0, 0, 0, 0.75);
}
