:root {
    /* ===== 核心品牌色 ===== */
    --klein-blue: #002FA7;
    --light-blue: rgba(230, 240, 255, 0.8);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 8px 32px rgba(0, 47, 167, 0.3);
    --bg-gradient: linear-gradient(135deg, #001A5E 0%, #0038CC 100%);
    --bg-radial: radial-gradient(circle at 20% 30%, rgba(0, 150, 255, 0.15) 0%, transparent 40%),
                 radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    --container-bg: rgba(255, 255, 255, 0.15);
    --text-color: white;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(255, 255, 255, 0.15);
    --input-border: 1px solid rgba(255, 255, 255, 0.2);
    --button-bg: linear-gradient(135deg, rgba(0, 47, 167, 0.8) 0%, rgba(0, 80, 255, 0.7) 100%);
    --refund-bg: rgba(0, 47, 167, 0.2);
    --info-bg: rgba(0, 47, 167, 0.1);

    /* ===== 结果区域 ===== */
    --result-bg: rgba(255, 255, 255, 0.1);
    --result-border: 1px solid rgba(255, 255, 255, 0.2);
    --deduction-bg: rgba(255, 255, 255, 0.05);
    --api-detail-bg: rgba(255, 255, 255, 0.08);
    --api-detail-item-bg: rgba(255, 255, 255, 0.03);
    --usage-table-header-bg: rgba(255, 255, 255, 0.1);
    --usage-table-row-bg: rgba(255, 255, 255, 0.05);

    /* ===== 语义图标色（一般不随品牌改变） ===== */
    --color-success: #4CAF50;
    --color-warning: #FFC107;
    --color-danger: #E91E63;
    --color-info: #2196F3;
    --color-purple: #9C27B0;
    --color-orange: #FF9800;

    /* ===== 强调/高亮色（退款金额、墨点数值） ===== */
    --accent-color: #ffd700;
    --accent-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
    --orange-accent: #ffb74d;
    --orange-shadow: 0 0 6px rgba(255, 183, 77, 0.7);

    /* ===== 分隔线 ===== */
    --divider-color: rgba(255, 255, 255, 0.1);
    --divider-strong: rgba(255, 255, 255, 0.2);
    --divider-light: rgba(255, 255, 255, 0.05);

    /* ===== 滚动条 ===== */
    --scrollbar-track: rgba(255, 255, 255, 0.1);
    --scrollbar-thumb: rgba(255, 255, 255, 0.3);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.4);

    /* ===== 输入框聚焦 ===== */
    --input-focus-border: rgba(255, 255, 255, 0.4);
    --input-focus-bg: rgba(255, 255, 255, 0.25);
    --input-focus-shadow: 0 8px 20px rgba(0, 47, 167, 0.5);

    /* ===== 下拉菜单 ===== */
    --dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --brand-item-hover: rgba(255, 255, 255, 0.1);
    --brand-divider: rgba(255, 255, 255, 0.1);
    --dark-select-bg: rgba(0, 47, 167, 0.8);
    --dark-select-option-bg: rgba(0, 20, 80, 0.95);
    --dark-select-option-checked: rgba(37, 99, 235, 0.9);

    /* ===== 工具栏 ===== */
    --toolbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    /* ===== 文本阴影 ===== */
    --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    --header-text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --logo-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --button-hover-shadow: 0 8px 20px rgba(0, 47, 167, 0.5);
    --button-hover-border: 1px solid rgba(255, 255, 255, 0.2);

    /* ===== 弹窗 ===== */
    --modal-overlay: rgba(0, 0, 0, 0.4);
    --clear-btn-bg: rgba(255, 152, 0, 0.8);
    --close-btn-bg: rgba(255, 255, 255, 0.2);

    /* ===== 其他 ===== */
    --button-disabled-opacity: 0.6;
}

/* 浅色主题变量 */
[data-theme="light"] {
    --klein-blue: #1a73e8;
    --light-blue: rgba(24, 90, 188, 0.2);
    --glass-border: 1px solid rgba(0, 0, 0, 0.15);
    --shadow: 0 8px 32px rgba(66, 133, 244, 0.2);
    --bg-gradient: linear-gradient(135deg, #f5f9ff 0%, #e3f2fd 100%);
    --bg-radial: radial-gradient(circle at 20% 30%, rgba(66, 133, 244, 0.1) 0%, transparent 40%),
                 radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 40%);
    --container-bg: rgba(255, 255, 255, 0.9);
    --text-color: #202124;
    --text-secondary: rgba(32, 33, 36, 0.8);
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-border: 1px solid rgba(0, 0, 0, 0.15);
    --button-bg: linear-gradient(135deg, rgba(26, 115, 232, 0.9) 0%, rgba(66, 133, 244, 0.8) 100%);
    --refund-bg: rgba(66, 133, 244, 0.15);
    --info-bg: rgba(66, 133, 244, 0.1);
    --result-bg: rgba(66, 133, 244, 0.06);
    --result-border: 1px solid rgba(66, 133, 244, 0.15);
    --deduction-bg: rgba(66, 133, 244, 0.04);
    --api-detail-bg: rgba(66, 133, 244, 0.05);
    --api-detail-item-bg: rgba(66, 133, 244, 0.03);
    --usage-table-header-bg: rgba(66, 133, 244, 0.08);
    --usage-table-row-bg: rgba(66, 133, 244, 0.04);
    --divider-color: rgba(0, 0, 0, 0.1);
    --divider-strong: rgba(0, 0, 0, 0.15);
    --divider-light: rgba(0, 0, 0, 0.05);
    --scrollbar-track: rgba(0, 0, 0, 0.08);
    --scrollbar-thumb: rgba(0, 0, 0, 0.2);
    --scrollbar-thumb-hover: rgba(0, 0, 0, 0.3);
    --input-focus-border: rgba(66, 133, 244, 0.5);
    --input-focus-bg: rgba(255, 255, 255, 1);
    --input-focus-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
    --dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    --brand-item-hover: rgba(0, 0, 0, 0.05);
    --brand-divider: rgba(0, 0, 0, 0.08);
    --toolbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    --header-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --logo-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --button-hover-shadow: 0 8px 20px rgba(66, 133, 244, 0.4);
    --button-hover-border: 1px solid rgba(66, 133, 244, 0.3);
    --modal-overlay: rgba(0, 0, 0, 0.3);
    --close-btn-bg: rgba(0, 0, 0, 0.08);
    --accent-color: #1a73e8;
    --accent-shadow: 0 0 6px rgba(26, 115, 232, 0.4);
    --orange-accent: #e65100;
    --orange-shadow: 0 0 6px rgba(230, 81, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

h4 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

/* 图标样式 */
h2 i, h4 i, .receipt-item i, .deduction-title i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
    display: inline-block;
}

html {
    background: var(--bg-gradient);
}

body {
    background: var(--bg-gradient);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--text-color);
    transition: background 0.3s ease;
    box-sizing: border-box;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-radial);
    z-index: -1;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* ===== 右上角浮动工具栏 ===== */
.top-toolbar {
    position: fixed;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

/* 品牌切换按钮（只显示图标） */
.brand-switch-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--toolbar-shadow);
    transition: var(--transition);
    flex-shrink: 0;
    color: var(--text-color);
    font-size: 18px;
    position: relative;
}
.brand-switch-btn:hover {
    transform: scale(1.1);
}

/* 设置按钮 */
.settings-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--toolbar-shadow);
    transition: var(--transition);
    flex-shrink: 0;
    color: var(--text-color);
    font-size: 18px;
}
.settings-btn:hover {
    transform: scale(1.1);
}

/* 品牌切换下拉菜单 */
.brand-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--container-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--dropdown-shadow);
    padding: 6px 0;
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.brand-switch-container:hover .brand-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ===== 隐形桥：覆盖按钮与菜单之间的 8px 空隙 ===== */
.brand-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.brand-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 14px;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.brand-dropdown-item:hover {
    background: var(--brand-item-hover);
}
.brand-dropdown-item.active {
    font-weight: 600;
}
.brand-dropdown-item.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 12px;
    opacity: 0.7;
}
.brand-dropdown-item .point-name-tag {
    font-size: 11px;
    opacity: 0.6;
    margin-left: auto;
    white-space: nowrap;
}
.brand-dropdown-divider {
    height: 1px;
    background: var(--brand-divider);
    margin: 4px 12px;
}

/* 主题切换按钮 */
.theme-switcher {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--toolbar-shadow);
    transition: var(--transition);
    flex-shrink: 0;
}
.theme-switcher:hover {
    transform: scale(1.1);
}
.theme-switcher i {
    font-size: 20px;
}

@media (max-height: 600px) {
    .calculator-container {
        padding: 15px;
    }
    .calculator-header h1 {
        font-size: 24px;
    }
}

.calculator-container {
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    border: var(--glass-border);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 1200px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    transition: all 0.3s ease;
}

.calculator-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: linear-gradient(45deg,
              rgba(255, 255, 255, 0) 0%,
              rgba(255, 255, 255, 0.03) 50%,
              rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    animation: shine 6s ease-in-out infinite;
    z-index: -1;
}

.calculator-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

.calculator-header h1 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.custom-note {
    color: var(--text-secondary);
    font-size: 11px;
}

.form-section {
    flex: 1;
    min-width: 300px;
    padding-right: 15px;
}

.result-section {
    flex: 2;
    min-width: 300px;
    background: var(--result-bg);
    border-radius: 10px;
    display: none;
    border: var(--result-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 禁用状态的按钮样式 */
.计算按钮:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 响应式按钮布局 */
@media (max-width: 768px) {
    .form-section div[style="display: flex; gap: 10px;"] {
        flex-direction: column;
    }
}

/* 结果区背景使用变量（浅色模式通过 [data-theme="light"] 自动继承） */
.result-section {
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-group h4 {
    font-size: 14px;
    margin-bottom: 6px;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-color);
    transition: var(--transition);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
}

.form-group select:focus, .form-group input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: var(--input-focus-bg);
    box-shadow: var(--input-focus-shadow);
    transform: translateY(-3px);
}

input::placeholder {
    color: var(--text-secondary);
}

/* 下拉菜单选项样式 */
select option {
    background: var(--container-bg);
    color: var(--text-color);
    padding: 10px;
    border-bottom: 1px solid var(--input-border);
}

select option:checked {
    background: var(--button-bg);
    font-weight: 500;
}

/* 特别为暗色模式设置下拉菜单样式 - 使用变量 */
:root:not([data-theme="light"]) select {
    background-color: var(--dark-select-bg);
    color: #ffffff;
}

:root:not([data-theme="light"]) select option {
    background: var(--dark-select-option-bg);
    color: #ffffff;
}

:root:not([data-theme="light"]) select option:checked {
    background: var(--dark-select-option-checked);
    color: #ffffff;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 15px;
    font-size: 13px;
    color: var(--text-color);
    border-bottom: 1px solid var(--divider-color);
    margin: 0 15px;
}


/* 特别针对动态生成的抵扣明细 */
.deductionDetails span {
    color: inherit !important;
    display: inline-block;
    margin-right: 20px;
}

/* 抵扣明细容器样式 */
#deductionDetails {
    margin: 10px 15px 15px;
    background: var(--deduction-bg);
    border-radius: 8px;
    overflow: hidden;
}

/* 抵扣明细标题样式 */
#deductionDetails .deduction-title {
    display: block;
    padding: 8px 15px 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    text-align: center;
    border-bottom: 1px solid var(--divider-color);
    margin: 0;
}

/* 抵扣明细项样式 */
#deductionDetails .deduction-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 15px;
    font-size: 13px;
    color: var(--text-color);
    border-bottom: 1px solid var(--divider-light);
}

#deductionDetails .deduction-item:last-child {
    border-bottom: none;
}

#deductionDetails .deduction-item span:last-child {
    text-align: right;
    padding-left: 10px;
}

.receipt-item strong {
    font-weight: 600;
    color: var(--text-color);
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 15px !important;
    font-size: 16px;
    font-weight: 600;
    margin: 10px 15px 0;
    border-top: 1px solid var(--divider-strong);
    color: var(--text-color);
}

.receipt-total > span:last-child {
    min-width: 100px;
    text-align: right;
    padding-left: 10px;
}

.refund-amounts {
    margin: 15px 15px 0;
    background: var(--refund-bg);
    border-radius: 8px;
    padding: 15px;
}

.refund初步, .refund最终 {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-color);
}

.refund最终 {
    font-weight: 600;
    font-size: 18px;
}

.refund最终 span:last-child {
    font-size: 24px;
    font-weight: bold;
    color: var(--klein-blue);
}

/* 暗色模式下增强最终退款金额的可见性 */
:root:not([data-theme="light"]) .refund最终 span:last-child {
    color: var(--accent-color);
    text-shadow: var(--accent-shadow);
}

/* 暗色模式下增强最终补发墨点的可见性 */
:root:not([data-theme="light"]) #finalInkAmount {
    color: var(--accent-color);
    text-shadow: var(--accent-shadow);
}

/* 暗色模式下增强转墨点计算过程的可见性 */
:root:not([data-theme="light"]) #conversionCalculation strong {
    color: var(--accent-color);
    text-shadow: var(--accent-shadow);
}

/* 最终补发墨点样式 */
#finalInkAmount {
    font-size: 24px;
    font-weight: bold;
    color: var(--klein-blue);
}

/* 补发后墨点总量样式 */
#totalInkAfterReissue {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-orange);
}

/* 暗色模式下增强补发后墨点总量的可见性 */
:root:not([data-theme="light"]) #totalInkAfterReissue {
    color: var(--orange-accent);
    text-shadow: var(--orange-shadow);
}

.计算按钮 {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: transparent;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid transparent;
}

.计算按钮:hover {
    transform: translateY(-3px);
    box-shadow: var(--button-hover-shadow);
    background: var(--button-bg);
    color: white;
    border: var(--button-hover-border);
}

.计算按钮:active {
    transform: translateY(0);
}

.附加信息 {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 15px;
    line-height: 1.5;
    padding: 15px;
    border-top: 1px solid var(--divider-strong);
    background: var(--info-bg);
    border-radius: 8px;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.result-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 20px;
    border-bottom: 1px solid var(--divider-strong);
    padding: 15px 15px 15px;
    text-align: center;
    text-shadow: var(--header-text-shadow);
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 500px;
    padding: 20px;
}

/* 随机动画效果 */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideFromRight {
    0% { transform: translateX(50px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideFromBottom {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes flipIn {
    0% { transform: perspective(400px) rotateX(90deg); opacity: 0; }
    100% { transform: perspective(400px) rotateX(0); opacity: 1; }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
    0% { transform: scale3d(0.3, 0.3, 0.3); opacity: 0; }
    20% { transform: scale3d(1.1, 1.1, 1.1); }
    40% { transform: scale3d(0.9, 0.9, 0.9); }
    60% { transform: scale3d(1.03, 1.03, 1.03); opacity: 1; }
    80% { transform: scale3d(0.97, 0.97, 0.97); }
    100% { transform: scale3d(1, 1, 1); opacity: 1; }
}

/* 移除了可能导致滚动条不稳定的动画 */

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    20% { transform: translateX(100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
        padding: 20px;
    }

    .form-section, .result-section {
        padding: 0;
        margin-bottom: 20px;
    }

    .calculator-header h1 {
        font-size: 24px;
    }

    .计算按钮 {
        padding: 14px;
        font-size: 16px;
    }

    .theme-switcher {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}

/* 统计用量弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-overlay);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    border: var(--glass-border);
    box-shadow: var(--shadow);
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    animation: slideFromBottom 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--divider-strong);
}

.modal-header h2 {
    color: var(--text-color);
    font-size: 20px;
    margin: 0;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

/* 统计表格样式 */
.usage-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.usage-table th, .usage-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--divider-color);
}

.usage-table th {
    background-color: var(--usage-table-header-bg);
    color: var(--text-color);
    font-weight: 600;
    font-size: 13px;
}

.usage-table input {
    width: 100%;
    padding: 6px 8px;
    background: var(--input-bg);
    border: var(--input-border);
    border-radius: 4px;
    color: var(--text-color);
    text-align: center;
    font-size: 14px;
    transition: var(--transition);
}

.usage-table input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: var(--input-focus-bg);
    transform: translateY(-1px);
}

.usage-table .total-row {
    font-weight: 600;
    background-color: var(--usage-table-row-bg);
}

.usage-table .total-row td {
    padding: 10px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-buttons .clear-btn {
    background-color: var(--clear-btn-bg);
    color: white;
}

.modal-buttons .close-btn {
    background-color: var(--close-btn-bg);
    color: var(--text-color);
}

.modal-buttons .confirm-btn {
    background: var(--button-bg);
    color: white;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 47, 167, 0.3);
}

/* API用量明细样式 */
.api-usage-details {
    margin: 5px 15px;
    padding: 6px 12px;
    background: var(--api-detail-bg);
    border-radius: 6px;
    font-size: 12px;
}

.api-usage-details div {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2px;
    padding: 2px 12px 2px 15px;
    background: var(--api-detail-item-bg);
    border-radius: 4px;
    border-left: 3px solid var(--klein-blue);
}

.api-usage-details div span:last-child {
    margin-left: 15px;
    font-weight: 500;
}

.api-usage-details div:last-child {
    margin-bottom: 0;
}
