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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

h1 {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.menu-item {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.menu-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.menu-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.menu-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.menu-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.header {
    padding: 20px 30px;
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
}

.back-link:hover {
    text-decoration: underline;
}

.content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
}

.info-box h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.info-box p {
    color: #666;
    line-height: 1.6;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 20px;
}

.upload-section h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.upload-area {
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    background: #e8eeff;
    border-color: #5568d3;
}

.upload-area.drag-over {
    background: #e8eeff;
    border-color: #5568d3;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
}

.upload-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: #5568d3;
}

.upload-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8eeff;
    padding: 15px 20px;
    border-radius: 10px;
    border: 2px solid #667eea;
}

.file-name {
    color: #333;
    font-weight: 500;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #ff3838;
}

/* 图表区域样式 */
/* .chart-section 样式在 analyse.html 中定义，这里不设置通用样式 */

.chart-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* height: 500px; 移除固定高度，由 analyse.html 中的样式控制 */
}

/* 统一页眉样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.home-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-link:hover {
    color: #5568d3;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.settings-button {
    padding: 6px 10px;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-button:hover {
    background: #f5f5f5;
    color: #333;
}

.logout-button {
    padding: 6px 10px;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.logout-button:hover {
    background: #f5f5f5;
    color: #333;
}

.logout-button:hover svg {
    stroke: #333;
}

.login-button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-button:hover {
    background: #5568d3;
}
}