/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #16c79a;
}

.nav-links .btn {
    background: #16c79a;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
}

.nav-links .btn:hover {
    background: #13b38a;
    color: white;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 - 保留后面的定义 */
.btn {
    display: inline-block;
    padding: 15px 35px;
    background: #16c79a;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 199, 154, 0.3);
}

.btn-secondary {
    background: white;
    color: #667eea;
}

.btn-secondary:hover {
    background: #f0f0f0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-third {
    width: 100%;
    padding: 14px;
    background: #16c79a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-third:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 199, 154, 0.3);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

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

.feature-card h3 {
    color: #1a1a2e;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-link {
    color: #16c79a;
    font-weight: 600;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-top: 80px;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Main content */
main {
    min-height: 60vh;
}

/* 以下是前面定义但后面没有重复的样式，需要保留 */

/* 容器变体 */
.container-sm {
    max-width: 500px;
    margin: 80px auto;
    padding: 20px;
}

.container-md {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.container-lg {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* 欢迎横幅 */
.welcome {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.welcome h2 {
    color: #1a1a2e;
    margin-bottom: 10px;
}

.welcome p {
    color: #666;
}
/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #16c79a;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #16c79a;
}

.stat-label {
    color: #666;
    margin-top: 10px;
    font-size: 0.95rem;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* 图表相关 */
.chart-container {
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 40px;
    color: #888;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 标题样式 - 补充后面没有的 */
h1 {
    color: #1a1a2e;
    margin-bottom: 20px;
}

h2 {
    color: #1a1a2e;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

h3 {
    color: #1a1a2e;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* 按钮变体 - 补充后面没有的 */
.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* 提示框 */
.hint {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #0c4a6e;
}

.hint code {
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.hint-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}

.hint-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.hint-error {
    background: #fef2f2;
    border-left-color: #dc2626;
    color: #991b1b;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a1a2e;
}

tr:hover {
    background: #f8f9fa;
}

.profit-positive {
    color: #16c79a;
    font-weight: 600;
}

.profit-negative {
    color: #dc2626;
    font-weight: 600;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #16c79a;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover {
    background: #f0fdf8;
}

.upload-area.dragover {
    background: #f0fdf8;
    border-color: #13b38a;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #16c79a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 隐藏类 */
.hidden {
    display: none;
}

/* 返回链接 */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
}

.back-link:hover {
    color: #16c79a;
}

/* 快捷链接 */
.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 12px;
}

.quick-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.quick-links a:hover {
    text-decoration: underline;
}

/* 页面样式 */
.page-content {
    line-height: 1.8;
    color: #555;
}

.page-content p {
    margin-bottom: 15px;
}

.page-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-content li {
    margin-bottom: 8px;
}

/* 页脚样式 */
.footer {
    background: white;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: #666;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* 响应式导航 */
@media (max-width: 768px) {
    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .nav-links span {
        display: none;
    }
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tool-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.tool-card h3 {
    color: #1a1a2e;
    margin-bottom: 10px;
}

.tool-card p {
    color: #666;
    font-size: 0.95rem;
}