/* 通用样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
}

/* 计算器卡片悬停效果 */
.calculator-card:hover {
    transform: translateY(-5px);
}

/* 计算器容器样式 */
#calculator-container {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* 返回按钮样式 */
.back-button {
    transition: all 0.2s ease;
}

.back-button:hover {
    transform: translateX(-3px);
}

/* 输入框聚焦效果 */
input:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 结果卡片样式 */
.result-card {
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 信息气泡样式 */
.info-bubble {
    position: relative;
    cursor: pointer;
}

.info-bubble::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #334155;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    margin-bottom: 5px;
    max-width: 300px;
    white-space: normal;
    text-align: center;
}

.info-bubble::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #334155;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.info-bubble:hover::after,
.info-bubble:hover::before {
    opacity: 1;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 进度条样式 */
.progress-bar {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #0ea5e9);
    transition: width 0.5s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .info-bubble::after {
        left: 0;
        transform: none;
        max-width: 250px;
    }
    
    .info-bubble::before {
        left: 20px;
        transform: none;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    #calculator-container {
        position: static;
        height: auto;
    }
}