/* 主要样式文件 - 基础布局和通用样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    line-height: 1.6;
    /* 移动端字体渲染优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 防止移动端缩放导致的模糊 */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 24px 32px;
    border-bottom: 4px solid #1e40af;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 4px 0 0 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.header-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* 主要内容区域 */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 120px);
}

.form-section {
    background: #fafbfc;
    border-right: 1px solid #e5e7eb;
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.result-section {
    padding: 16px;
    background: white;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '📋';
    font-size: 1rem;
}

.result-section .section-title::before {
    content: '⚙️';
}

/* 价格显示样式 */
.total-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: #2563eb;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.price-period {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 价格容器样式 */
.price-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 25px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.price-item {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.price-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 年费用特殊样式 */
.yearly-price {
    font-size: 2.8rem !important;
    color: #059669 !important;
    font-weight: 800;
}

.yearly-label {
    color: #059669 !important;
    font-weight: 600;
}

/* 计算状态指示器 */
.calculating-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.calculating-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* 错误消息样式 */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 16px;
}