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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* 导航栏 */
.navbar {
    background: #2c3e50;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #ecf0f1;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #3498db;
    color: #fff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #667eea;
}

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

.btn-outline {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

.btn-outline:hover {
    background: #fff;
    color: #667eea;
    transform: translateY(-2px);
}

/* 学习模块 */
.modules {
    padding: 80px 0;
    background: #fff;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #3498db;
    margin: 1rem auto 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.module-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.module-card:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.module-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.module-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-link {
    color: #3498db;
    font-weight: 600;
}

.btn-link:hover {
    color: #2980b9;
}

/* 学习要点 */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.features-list {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.feature-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.feature-item p {
    color: #666;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem 0;
}

/* 页面样式 */
.page {
    padding: 40px 0;
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.content {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
}

.content h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

.content p {
    margin-bottom: 1rem;
    color: #555;
}

.content ul, .content ol {
    margin: 1rem 0 1rem 2rem;
}

.content li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

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

table th {
    background: #3498db;
    color: #fff;
    font-weight: 600;
}

table tr:nth-child(even) {
    background: #f8f9fa;
}

table tr:hover {
    background: #e8f4f8;
}

/* 模拟器样式 */
.simulator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.simulator-form,
.simulator-history {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

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

.transaction-table th,
.transaction-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.transaction-table th {
    background: #2c3e50;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #27ae60;
    color: #fff;
}

.badge-danger {
    background: #e74c3c;
    color: #fff;
}

.badge-warning {
    background: #f39c12;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .simulator-container {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }
}