* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 700px;
    padding: 40px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding-bottom: 60px;
    animation: fadeIn 0.6s ease;
}

/* 返回链接 */
.back-link {
    margin-bottom: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #2c3e50;
    border-color: #2c3e50;
    transform: translateX(-3px);
}

/* 计算器区域 */
.calculator-section {
    animation: fadeInUp 0.6s ease 0.1s both;
}

.page-title {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
}

/* 计算器卡片 */
.calculator-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.settings-button {
    padding: 10px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-button:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

/* 小标签 */
.section-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 时间统计 */
.time-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.time-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.mini-progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.mini-progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2c3e50 0%, #4a5f7f 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.stat-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}

/* 人生进度 */
.life-progress-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.life-progress-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-align: left;
    font-weight: 400;
}

.life-progress-bar-wrapper {
    margin-bottom: 8px;
}

.life-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.life-progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #9b59b6 0%, #e74c3c 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.life-progress-text {
    font-size: 12px;
    color: white;
    font-weight: 500;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.life-info {
    font-size: 12px;
    color: #999;
    text-align: left;
}

/* 进度区域 */
.progress-section {
    margin-bottom: 20px;
}

.progress-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-align: left;
    font-weight: 400;
}

/* 进度条 */
.progress-bar-wrapper {
    margin-bottom: 0;
}

.progress-bar {
    width: 100%;
    height: 32px;
    background-color: #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2c3e50 0%, #4a5f7f 100%);
    transition: width 0.3s ease;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-text {
    font-size: 14px;
    color: white;
    font-weight: 500;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 信息显示 */
.info-display {
    margin-top: 20px;
}

.salary-text {
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 500;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.modal-month-days {
    font-size: 14px;
    margin-bottom: 20px;
    color: #666;
}

/* 输入组 */
.modal-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group label {
    font-size: 14px;
    color: #2c3e50;
    min-width: 100px;
    text-align: left;
}

.input-group input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    width: 150px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* 按钮组 */
.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-buttons button {
    padding: 10px 24px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-button {
    background-color: #2c3e50;
    color: white;
}

.confirm-button:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
}

.cancel-button {
    background-color: #e9ecef;
    color: #666;
}

.cancel-button:hover {
    background-color: #d0d4d8;
    color: #2c3e50;
}

/* 数据来源说明 */
.data-source {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    color: #999;
    text-align: left;
    line-height: 1.6;
}

.data-source p {
    margin: 5px 0;
}

.data-source strong {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.footer p {
    margin: 5px 0;
    font-size: 13px;
    color: #999;
}

.footer-note {
    font-style: italic;
    opacity: 0.8;
}

.footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2c3e50;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .calculator-card {
        padding: 20px;
    }
    
    .time-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .modal-content {
        padding: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-inputs {
        gap: 12px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .input-group label {
        min-width: auto;
        font-size: 13px;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .input-group input[type="time"] {
        width: auto;
        min-width: 120px;
    }
    
    .data-source {
        font-size: 10px;
        line-height: 1.5;
    }
    
    .data-source strong {
        font-size: 11px;
    }
    
    .modal-buttons button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .page-title {
        color: #ffffff;
    }
    
    .page-subtitle {
        color: #999;
    }
    
    .back-btn {
        color: #999;
        border-color: #3c3c3c;
    }
    
    .back-btn:hover {
        color: #ffffff;
        border-color: #e0e0e0;
    }
    
    .calculator-card {
        background: #2c2c2c;
        border-color: #3c3c3c;
    }
    
    .settings-button {
        background: #e0e0e0;
        color: #1a1a1a;
    }
    
    .settings-button:hover {
        background: #ffffff;
    }
    
    .section-label {
        color: #555;
    }
    
    .time-stats {
        border-bottom-color: #3c3c3c;
    }
    
    .stat-label {
        color: #666;
    }
    
    .mini-progress-bar {
        background-color: #3c3c3c;
    }
    
    .mini-progress {
        background: linear-gradient(90deg, #e0e0e0 0%, #ffffff 100%);
    }
    
    .stat-value {
        color: #e0e0e0;
    }
    
    .life-progress-section {
        border-bottom-color: #3c3c3c;
    }
    
    .life-progress-label {
        color: #999;
    }
    
    .life-progress-bar {
        background-color: #3c3c3c;
    }
    
    .life-progress {
        background: linear-gradient(90deg, #bb8fce 0%, #ec7063 100%);
    }
    
    .life-progress-text {
        color: #1a1a1a;
    }
    
    .life-info {
        color: #666;
    }
    
    .progress-bar {
        background-color: #3c3c3c;
    }
    
    .progress {
        background: linear-gradient(90deg, #e0e0e0 0%, #ffffff 100%);
    }
    
    .progress-text {
        color: #1a1a1a;
    }
    
    .progress-label {
        color: #999;
    }
    
    .salary-text {
        color: #ffffff;
    }
    
    .modal-content {
        background-color: #2c2c2c;
    }
    
    .modal-title {
        color: #ffffff;
    }
    
    .modal-month-days {
        color: #999;
    }
    
    .input-group label {
        color: #e0e0e0;
    }
    
    .input-group input {
        background: #1a1a1a;
        border-color: #3c3c3c;
        color: #e0e0e0;
    }
    
    .input-group input:focus {
        border-color: #e0e0e0;
        box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.1);
    }
    
    .confirm-button {
        background-color: #e0e0e0;
        color: #1a1a1a;
    }
    
    .confirm-button:hover {
        background-color: #ffffff;
    }
    
    .cancel-button {
        background-color: #3c3c3c;
        color: #999;
    }
    
    .cancel-button:hover {
        background-color: #4c4c4c;
        color: #e0e0e0;
    }
    
    .data-source {
        border-top-color: #3c3c3c;
        color: #666;
    }
    
    .data-source strong {
        color: #999;
    }
    
    .footer {
        border-top-color: #3c3c3c;
    }
    
    .footer a:hover {
        color: #ffffff;
    }
}
