/* styles.css */
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --text-color: #f5f6fa;
    --text-secondary: #b2bec3;
    --bg-color: #2d3436;
    --bg-secondary: #353b48;
    --card-bg: rgba(45, 52, 54, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --text-color: #2d3436;
    --text-secondary: #636e72;
    --bg-color: #f5f6fa;
    --bg-secondary: #dfe6e9;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

.minecraft-font {
    font-family: 'Minecraft', monospace;
    letter-spacing: 1px;
}

/* 加载动画 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

.minecraft-logo {
    font-family: 'Minecraft', monospace;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

.loading-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(45, 52, 54, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* 主题切换按钮 */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: none;
}

.theme-label {
    display: block;
    width: 60px;
    height: 30px;
    background: var(--bg-secondary);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sun-moon {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f1c40f;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.sun {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f1c40f;
    box-shadow: 0 0 10px #f1c40f;
}

.moon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-secondary);
    transform: translateX(15px);
    transition: var(--transition);
}

.theme-switch:checked + .theme-label .sun-moon {
    transform: translateX(30px);
    background: #7f8c8d;
}

.theme-switch:checked + .theme-label .sun {
    box-shadow: none;
    background: #bdc3c7;
}

.theme-switch:checked + .theme-label .moon {
    transform: translateX(0);
}

/* 主内容区域 */
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

.section {
    display: none;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 英雄区域 */
.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* 特性区域 */
.features-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* 社区区域 */
.community-section {
    padding: 4rem 0;
    text-align: center;
}

.community-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.community-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.community-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.community-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.community-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.community-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
}

.community-btn:hover {
    background-color: var(--secondary-color);
}

/* 文件下载区域 */
.file-categories {
    margin-top: 2rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-tab {
    background-color: var(--bg-secondary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.category-tab:hover {
    background-color: var(--primary-color);
    color: white;
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.file-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.file-image {
    height: 160px;
    overflow: hidden;
}

.file-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.file-card:hover .file-image img {
    transform: scale(1.05);
}

.file-icon {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 3px solid var(--primary-color);
}

.file-card-content {
    padding: 3rem 1.5rem 1.5rem;
    text-align: center;
}

.file-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.file-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    width: 100%;
}

.download-btn:hover {
    background-color: var(--secondary-color);
}

/* 赞助部分 */
.sponsor-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.donation-info, .order-info {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.donation-info h3, .order-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.order-subtitle {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.donation-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.donation-option {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.donation-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.donate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    width: 100%;
}

.donate-btn:hover {
    background-color: var(--secondary-color);
}

.order-table {
    margin-top: 1.5rem;
    width: 100%;
    border-collapse: collapse;
}

.order-header, .order-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-header {
    font-weight: bold;
    background-color: var(--bg-secondary);
    border-radius: 8px 8px 0 0;
}

.order-row:last-child {
    border-bottom: none;
}

.order-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.order-btn:hover {
    background-color: var(--secondary-color);
}

.order-btn.special {
    background-color: var(--accent-color);
}

.order-btn.special:hover {
    background-color: #e84393;
}

.consult-btn {
    background-color: var(--secondary-color);
}

.consult-btn:hover {
    background-color: #8a7cff;
}

.order-note {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

/* 会员服务 */
.membership-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.membership-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.membership-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.membership-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.membership-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.membership-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.membership-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.membership-header h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.membership-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
}

.membership-features {
    list-style: none;
    margin-bottom: 2rem;
}

.membership-features li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.membership-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.membership-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-weight: bold;
    font-size: 1rem;
}

.membership-btn:hover {
    background-color: var(--secondary-color);
}

/* 页脚 */
.footer {
    background-color: var(--bg-secondary);
    padding: 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-icon {
    font-size: 1.2rem;
}

/* 背景图片 */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.background-image.active {
    opacity: 0.2;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* 口算验证样式 */
.math-container {
    margin: 1.5rem 0;
    text-align: center;
}

.math-question {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.math-input {
    margin-bottom: 1.5rem;
}

.math-input input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-color);
    font-size: 1rem;
    text-align: center;
}

.math-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 支付弹窗样式 */
.payment-info {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: center;
}

.payment-instruction {
    text-align: center;
    margin: 1.5rem 0;
}

.qrcode-container {
    margin: 1.5rem 0;
    text-align: center;
}

.qrcode-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.payment-options {
    margin: 1.5rem 0;
    text-align: left;
}

.payment-options ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.payment-options li {
    margin-bottom: 0.5rem;
}

.payment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.payment-actions .btn {
    flex: 1;
}

/* Toast 样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1000;
}

.toast.success {
    background-color: #4caf50;
}

.toast.error {
    background-color: #f44336;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .sponsor-content {
        grid-template-columns: 1fr;
    }
    
    .donation-options {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .order-header, .order-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .membership-container {
        grid-template-columns: 1fr;
    }
    
    .membership-card.featured {
        transform: scale(1);
    }
    
    .membership-card.featured:hover {
        transform: translateY(-10px);
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .category-tab {
        width: 100%;
        max-width: 300px;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .community-options {
        grid-template-columns: 1fr;
    }
}