body {
    background-color: #fcfcfc;
    color: #333;
    font-family: 'IBM Plex Mono', monospace;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.stats-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.stats-title {
    color: #1e2329;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}
.input-section {
    background: white;
    border-radius: 12px;
}

.result-table {
    background: white;
    overflow: hidden;
    margin-top: 30px;
}

.result-table .stats-title {
    margin-bottom: 20px;
}

.table {
    margin-bottom: 0;
    border: 1px solid #dee2e6;
    color: #333333;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #000;
    font-weight: 500;
}

.table td {
    border: 1px solid #dee2e6;
}

.table th {
    border: 1px solid #dee2e6;
}

.preset-amount {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 8px 8px 0;
    border-radius: 6px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border: 1px solid #f8f9fa;
}

.preset-amount:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
    text-decoration: none;
}

.preset-amount.active {
    background-color: #000;
    border-color: #000;
    color: #fff;
    font-weight: 500;
}

.preset-amount:active {
    background-color: #000;
    border-color: #000;
    color: #fff;
}

.page-title {
    color: #1e2329;
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0;

    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.page-title img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer {
    text-align: left;
    padding: 20px 0;
    color: #000;
    font-size: 14px;
}
.footer a {
    color: #000;
    text-decoration: underline;
}
.footer a:hover {
    color: #333;
    text-decoration: none;
}
.tab-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.tab-button {
    width: 90px;
    padding: 8px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    cursor: pointer;

    text-align: left;
    margin-right: 20px;
}

.tab-button.active {
    color: #1e2329;
    border-bottom-color: #1e2329;
    font-weight: 500;
    margin-right: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fee-animate {
    animation: fadeIn 0.5s ease-in;
}

.title-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.app-header {
    margin-bottom: 20px;
}
.app-header a {
    color: #000;
    text-decoration: none;
}
.app-header a:hover {
    color: #333;
    text-decoration: underline;
}

.bookmark-btn {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #1e2329;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.bookmark-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 修改年化利率输入框的宽度 */
#interest-rate,
#amount {
    width: 180px;
}

/* 如果需要，也可以调整整个输入组的宽度 */
.input-group {
    max-width: 250px;
}

/* 添加响应式样式 */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    
    .stats-card {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    .page-title {
        font-size: 20px;
        margin: 20px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .title-content {
        width: 100%;
    }
    
    .bookmark-btn {
        width: 100%;
        padding: 10px;
        text-align: center;
    }
    
    /* 优化表格在移动端的显示 */
    .table {
        font-size: 14px;
    }
    
    .table th {
        white-space: normal;
        min-width: 80px;
    }
    
    /* 优化预设金额按钮在移动端的显示 */
    .btn-group-sm {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }
    
    .preset-amount {
        margin: 0;
        text-align: center;
        width: 100%;
        font-size: 14px;
        color: #333;
        border: 1px solid #f8f9fa;
    }
    
    /* 优化输入框在移动端的显示 */
    .input-group {
        width: 100% !important;
        max-width: none !important;
    }
    
    #amount {
        width: auto !important;
    }
    
    /* 优化标签页在移动端的显示 */
    .tab-container {
        display: flex;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .tab-button {
        flex: 1;
        text-align: center;
        padding: 10px;
    }
    
    /* 在移动端保持输入框的宽度 */
    #interest-rate,
    #amount {
        width: 180px !important;
    }
    
    .input-group {
        max-width: none !important;
    }
}

/* 添加触摸设互优化 */
@media (hover: none) {
    .preset-amount:active,
    .tab-button:active,
    .bookmark-btn:active {
        background-color: rgba(0, 0, 0, 0.1);
    }
    
    .btn-primary:active {
        opacity: 0.8;
    }
}

/* 优化表格在窄屏设备上的滚动 */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* 添加表格横向滚动提示 */
@media (max-width: 576px) {
    .table-responsive::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .table-responsive:not(:hover)::after {
        opacity: 1;
    }
}

/* 修改键盘提示样式 */
.keyboard-tips {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c757d;
}

/* 在移动端保持相同的间距 */
@media (max-width: 768px) {
    .keyboard-tips {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 14px;
    }
}

/* 修改预设金额标签的样式 */
.mt-2 small.text-muted {
    display: block;  /* 让标签独占一行 */
    margin-top: 0;   /* 将上边距设置为 0 */
    color: #000;     /* 改变字体颜色 */
}

/* 在移动端保持一致的间距 */
@media (max-width: 768px) {
    .mt-2 small.text-muted {
        margin-top: 0;  /* 保持相同的间距 */
    }
}

/* 添加利率差异提示样式 */
.rate-diff-tip {
    margin-top: 6px;
    font-size: 12px;
    color: #dc3545;
}

/* 添加金额警告提示样式 */
.amount-warning-tip {
    margin-top: 6px;
    font-size: 12px;
    color: #dc3545;
}

/* 添加免责声明样式 */
.disclaimer {
    margin-top: 8px;
    text-align: left;
    font-size: 12px;
    color: #6c757d;
}

/* 在移动端调整样式 */
@media (max-width: 768px) {
    .disclaimer {
        text-align: left;
    }
}

/* 修改预设金额按钮的样式 */
.preset-amount {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 8px 8px 0;
    border-radius: 6px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border: 1px solid #f8f9fa;
}

/* 修改激活状态样式 */
.preset-amount.active {
    background-color: #000;
    border-color: #000;
    color: #fff;
    font-weight: 500;
}

/* 在移动端保持相同的样式 */
@media (max-width: 768px) {
    .preset-amount {
        margin: 0;
        text-align: center;
        width: 100%;
        font-size: 14px;
        color: #333;
        border: 1px solid #f8f9fa;
    }
    
    .preset-amount.active {
        background-color: #000;
        border-color: #000;
        font-weight: 500;
        color: #fff;
    }
}

/* 添加计算按钮样式 */
.btn-primary {
    background-color: #333;  /* 从 #666 改为 #333 */
    border-color: #333;
    color: #fff;
}

.btn-primary:hover {
    background-color: #555;  /* 悬停时颜色稍微变浅 */
    border-color: #555;
}

.btn-primary:active,
.btn-primary:focus {
    background-color: #333 !important;
    border-color: #333 !important;
    box-shadow: 0 0 0 0.25rem rgba(51, 51, 51, 0.25) !important;  /* 阴影颜色也相应调整 */
}

.iconfont {
    font-family: 'iconfont';  /* 使用 iconfont 字体 */
    font-size: 16px;  /* 设置图标大小 */
    margin-right: 5px;  /* 添加右边距 */
    vertical-align: middle;  /* 垂直居中对齐 */
}

.tab-button img {
    width: 16px;  /* 确保图标大小一致 */
    height: 16px; /* 确保图标大小一致 */
    vertical-align: middle;  /* 垂直居中对齐 */
    margin-right: 5px;  /* 添加右边距 */
    opacity: 0.7;  /* 默认透明度为 70% */
    transition: opacity 0.3s;  /* 添加过渡效果 */
    transform: translateY(-2px);
}

.tab-button.active img {
    opacity: 1;  /* 选中态透明度为 100% */
    transform: translateY(-2px);
}

/* 网站通用头部样式 */
.page-title {
    margin-bottom: 2rem;
}

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

/* 如果是第二个标题，增加一些上边距 */

/* 确保链接样式正确 */
.title-content a {
    text-decoration: none;
    color: inherit;
}

.title-content a:hover {
    text-decoration: none;
    color: inherit;
} 
.app-title {
    font-size: 16px;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 5px 0 15px 0;
}
.app-title img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.intro-content{
    font-size: 14px;
}

/* 工具网格布局 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* 工具卡片样式 */
.tool-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 250px;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 卡片背景图标样式 */
.card-bg {
    position: absolute;
    right: -20px;
    bottom: -50px;
    width: 160px;
    height: 160px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 百万计划卡片背景旋转 */
.tool-card:nth-child(2) .card-bg img {
    transform: rotate(35deg);
}

/* 卡片内容区域 */
.tool-card-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.tool-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-title img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.tool-description {
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-meta {
    font-size: 0.875rem;
    color: #888;
}

.tool-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

.tool-button:hover {
    background-color: #444;
    color: white;
}

/* 站点介绍样式 */
.intro-content {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tools-grid {
        gap: 15px;
        margin: 15px 0;
    }
    
    .tool-card {
        padding: 15px;
    }
    
    .tool-title {
        font-size: 1.1rem;
    }
    
    .tool-description {
        min-height: auto;
    }
}

/* 修复 app-title 样式中的错误 */
.app-title {
    font-size: 16px;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

/* 计算按钮容器样式 */
.btn-container {
    margin-top: 5px;
}

/* 修复应用标题的样式 */
.app-title .title-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 500;
}

/* 推荐工具模块样式 */
.recommend-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.recommend-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.recommend-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 300px;
}

.recommend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.recommend-card .tool-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.recommend-card .tool-description {
    font-size: 0.875rem;
    min-height: auto;
    margin-bottom: 0.75rem;
}

.recommend-card .tool-meta {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .recommend-section {
        margin-top: 30px;
        padding-top: 20px;
    }

    .recommend-card {
        max-width: none;
    }
}

/* 卡片底部区域 */
.tool-card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

/* 支出设置样式 */
.expenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* 支出输入框样式 */
.expense-item .input-group {
    width: 100%;
    min-width: 120px;
}

.expense-item .form-control {
    min-width: 80px;
}

.expense-label {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .expenses-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .expense-item .input-group {
        width: 100%;
        max-width: none;
    }
    
    .expense-label {
        font-size: 14px;
        white-space: normal;
    }
}

/* 百万计划特有样式 */
.stats-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.stats-title {
    color: #1e2329;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* 输入区域样式 */
.input-section {
    background: white;
    border-radius: 12px;
}

/* 结果展示区域样式 */


/* 进度显示样式 */
.progress-block {
    min-height: 100%;
}

.info-item {
    text-align: center;
    padding: 10px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.info-value-xl {
    font-size: 64px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.motivation-text {
    font-size: 16px;
    color: #666;
    margin-top: 10px;
    min-height: 20px;
}

/* 支出设置样式 */
.expenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.expense-item {
    margin-bottom: 5px;
}

.expense-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

/* 庆祝提示样式 */
.celebration-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 2s ease;
}

.celebration-toast.show {
    display: block;
    opacity: 1;
    animation: toastFadeIn 0.3s ease;
}

.celebration-toast.hide {
    opacity: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .info-value-xl {
        font-size: 48px;
    }

    .expenses-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .input-group {
        max-width: 100%;
    }
}

/* 动画效果 */
@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% - 20px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 数字输入动画 */
.fee-animate {
    animation: numberChange 0.3s ease-out;
}

@keyframes numberChange {
    0% {
        transform: scale(1.1);
        color: #007bff;
    }
    100% {
        transform: scale(1);
    }
}

/* 计算结果卡片样式 */
.result-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 确保结果标签和数值都居中对齐 */
.result-label,
.result-value {
    width: 100%;
    text-align: center;
}

/* 确保数值显示正确的字体和大小 */
.result-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 28px;
    font-weight: 500;
    color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-card {
        padding: 15px;
    }
    
    .result-value {
        font-size: 24px;
    }
}

/* 统一结果卡片样式 */
.stats-block {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 进度模块特殊样式 */
.progress-block {
    min-height: 100%;
    background: #f8f8f8;
}

/* 目标金额、当前存款、还需存款模块样式 */
.info-item {
    text-align: center;
    padding: 10px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* 确保所有数值显示正确的字体和大小 */
.info-value,
.info-value-xl,
.info-value-lg,
.info-value-success,
.info-value-danger {
    font-family: 'IBM Plex Mono', monospace;
    width: 100%;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-block {
        padding: 15px;
    }
    
    .info-value-xl {
        font-size: 48px;
    }
    
    .info-value-lg {
        font-size: 24px;
    }
}

/* 见字如卡片样式 */
.tool-card.jzr .card-bg {
    transform: rotate(10deg) translateX(-20px);
    opacity: 0.1;
}

.tool-card.jzr .card-bg img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.tool-card.jzr:hover .card-bg {
}