/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff6b6b;
    text-align: center;
}

/* 主要内容区域 */
.main {
    padding: 2rem 0;
}

/* 英雄区域 */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* 计算器区域 */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 面板样式 */
.input-panel,
.result-panel,
.info-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.input-panel:hover,
.result-panel:hover,
.info-panel:hover {
    transform: translateY(-5px);
}

.input-panel h3,
.result-panel h3,
.info-panel h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

/* 输入区域样式 */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
}

/* 计算按钮 */
#calculateBtn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#calculateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* 结果区域样式 */
.result-content {
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-content p {
    color: #7f8c8d;
    font-style: italic;
}

.age-result {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.human-age {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 1rem;
}

.life-stage {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.birth-info {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* 信息面板样式 */
.stage-info {
    min-height: 200px;
}

.stage-info p {
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
}

/* 猫咪人生进度区域 */
.progress-section {
    margin-bottom: 2rem;
}

.progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.progress-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.progress-card:hover {
    transform: translateY(-5px);
}

.progress-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.time-display {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1rem 0;
}

.time-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
}

.time-unit {
    font-size: 1.2rem;
    opacity: 0.9;
}

.progress-bar-container {
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    border-radius: 15px;
    transition: width 1s ease-in-out;
    position: relative;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-note {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
}

/* 健康建议区域 */
.advice-section {
    margin-bottom: 2rem;
}

.section-title {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.advice-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.advice-placeholder {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* 历史记录区域 */
.history-section {
    margin-bottom: 2rem;
}

.history-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    min-height: 200px;
}

.history-placeholder {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-info {
    flex: 1;
}

.history-age {
    font-weight: bold;
    color: #2c3e50;
}

.history-time {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.history-birth {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-top: 0.2rem;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* 分享区域 */
.share-section {
    margin-bottom: 2rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn,
.copy-btn {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.share-btn:hover,
.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.copy-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.copy-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

/* 错误和成功提示 */
.error-message {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.success-message {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 复制模态框 */
.copy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.copy-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.copy-modal-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.copy-textarea {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    resize: none;
    margin-bottom: 1rem;
    font-family: inherit;
}

.copy-textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.copy-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.copy-select-btn,
.copy-close-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.copy-select-btn {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.copy-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.4);
}

.copy-close-btn {
    background: #95a5a6;
    color: white;
}

.copy-close-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* 底部样式 */
.footer {
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .info-panel {
        grid-column: 1 / -1;
    }
    
    .progress-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .progress-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .input-panel,
    .result-panel,
    .info-panel,
    .progress-card {
        padding: 1.5rem;
    }
    
    .age-result {
        font-size: 2rem;
    }
    
    .time-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .input-panel,
    .result-panel,
    .info-panel {
        padding: 1rem;
    }
}
