/* 全局样式 */
* {
    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, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    margin-top: 10px;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 主要内容区域 */
main {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    margin: 20px 0;
    padding: 30px;
    backdrop-filter: blur(10px);
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* 表单样式 */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

input[type="file"] {
    padding: 15px;
    border: 2px dashed #667eea;
    border-radius: 10px;
    background: #f8f9ff;
    transition: all 0.3s ease;
    font-size: 1rem;
}

input[type="file"]:hover {
    border-color: #764ba2;
    background: #f0f2ff;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* 分析日志 */
#analysisLog {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.log-entry {
    margin-bottom: 5px;
    padding: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.5);
}

.log-info {
    color: #007bff;
    border-left: 3px solid #007bff;
}

.log-success {
    color: #28a745;
    border-left: 3px solid #28a745;
}

.log-error {
    color: #dc3545;
    border-left: 3px solid #dc3545;
}

/* 计划样式 */
.plan-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid #e0e5ee;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e5ee;
}

.plan-content {
    line-height: 1.8;
}

/* 每日计划样式 */
.day-plan, .day-meal-plan {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.day-plan h4, .day-meal-plan h4 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表格样式 */
.exercise-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.exercise-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
}

.exercise-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.exercise-table tr:nth-child(even) {
    background: #f8f9ff;
}

.exercise-table tr:hover {
    background: #eef1ff;
}

/* 打印按钮 */
#printPlans {
    background: linear-gradient(135deg, #28a745 0%, #23bf5a 100%);
    float: right;
    margin-top: 20px;
}

#printPlans:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* 报告输出 */
#reportOutput {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    min-height: 300px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

#reportOutput h3 {
    color: #667eea;
    margin-bottom: 20px;
}

#reportOutput ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

#reportOutput li {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .container {
        width: 95%;
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .plan-card {
        padding: 20px;
    }
    
    .exercise-table {
        font-size: 0.9rem;
    }
    
    .exercise-table th, .exercise-table td {
        padding: 8px;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.plan-card, .day-plan, .day-meal-plan {
    animation: fadeIn 0.5s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 卡片悬停效果 */
.plan-card, .day-plan, .day-meal-plan {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.plan-card:hover, .day-plan:hover, .day-meal-plan:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}