:root {
    --primary-color: #c0392b; /* 中国红 */
    --secondary-color: #f1c40f; /* 金色 */
    --accent-color: #2980b9; /* 蓝色 */
    --bg-light: #fffdf5; /* 米白 */
    --bg-dark: #34495e; /* 深蓝灰 */
    --text-main: #2c3e50;
    --text-light: #ecf0f1;
    --border-color: #dcdde1;
    
    --font-title: 'Ma Shan Zheng', cursive;
    --font-body: 'Noto Serif SC', serif;
    
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e6e6e6' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* Header */
.header {
    background: linear-gradient(to bottom, #2c3e50, #34495e);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 3px solid var(--secondary-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    color: #bdc3c7;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '✦';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-links a:hover::after, .nav-links a.active::after {
    opacity: 1;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
}

.btn:active {
    transform: translateY(1px);
}

.btn-login {
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    color: #fff;
    border: 1px solid #d35400;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.btn-login:hover {
    filter: brightness(1.1);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 1001;
    padding: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.mobile-menu.active {
    right: 0;
}

.close-menu {
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.mobile-nav-links {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    color: var(--text-light);
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background-color: #000;
}

.slider-wrapper {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3); /* 遮罩 */
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 2rem;
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.slide-content h2 {
    font-family: var(--font-title);
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
    color: var(--secondary-color);
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.btn-primary {
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    color: #fff;
    border: 1px solid #96281b;
    box-shadow: 0 4px 0 #96281b;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #96281b;
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #96281b;
}

.btn-large {
    font-size: 1.2rem;
    padding: 0.8rem 2.5rem;
}

.slider-controls div {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.slider-controls div:hover {
    color: var(--secondary-color);
}

.prev-slide { left: 20px; }
.next-slide { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--secondary-color);
}

/* Main Content Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: -50px; /* Overlap with Hero */
    position: relative;
    z-index: 5;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.download-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.qr-code img {
    margin: 0 auto 1rem;
    border: 1px solid #eee;
    padding: 5px;
}

.download-btns {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.btn-download:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.quick-links {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quick-links h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.links-grid a {
    text-align: center;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
    color: #555;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.links-grid a:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.links-grid i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

/* News Container */
.news-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-height: 400px;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    color: #7f8c8d;
    cursor: pointer;
    position: relative;
    font-family: var(--font-body);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.news-list li {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #eee;
}

.news-list li:last-child {
    border-bottom: none;
}

.tag {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 10px;
    color: #fff;
}

.tag-new { background-color: #e74c3c; }
.tag-hot { background-color: #f39c12; }
.tag-activity { background-color: #9b59b6; }
.tag-notice { background-color: #3498db; }
.tag-guide { background-color: #2ecc71; }

.news-list a {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.news-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.news-list .date {
    color: #999;
    font-size: 0.9rem;
}

/* Characters */
.characters {
    background-color: #2c3e50;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    color: #fff;
    padding-bottom: 4rem;
}

.characters .section-title {
    color: var(--secondary-color);
}

.char-showcase {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.char-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.char-tab {
    background: rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.char-tab.active, .char-tab:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.char-display {
    position: relative;
    min-height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 2rem;
    overflow: hidden;
}

.char-info {
    display: none;
    display: flex; /* hidden by default, controlled by JS/CSS class */
    align-items: center;
    gap: 3rem;
    opacity: 0;
    transition: opacity 0.5s;
    position: absolute; /* Stack them */
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    pointer-events: none;
}

.char-info.active {
    opacity: 1;
    pointer-events: all;
    position: relative; /* Let it take space */
}

.char-text {
    flex: 1;
}

.char-text h3 {
    font-family: var(--font-title);
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.char-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #ecf0f1;
}

.char-stats li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.char-stats span {
    width: 60px;
    font-weight: bold;
    color: #bdc3c7;
}

.bar {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
    max-width: 300px;
}

.fill {
    height: 100%;
    background: linear-gradient(to right, #f1c40f, #e67e22);
    border-radius: 5px;
}

.btn-secondary {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: #2c3e50;
}

.char-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.char-image img {
    max-height: 350px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 4px solid #fff;
    transform: rotate(2deg);
    transition: transform 0.3s;
}

.char-image img:hover {
    transform: rotate(0) scale(1.05);
}

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

.feature-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.feature-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.feature-content {
    padding: 1.5rem;
    text-align: center;
}

.feature-content h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #95a5a6;
    padding: 3rem 0;
    text-align: center;
    border-top: 5px solid var(--primary-color);
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #ecf0f1;
    margin: 0 10px;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.copyright p {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Page Styles */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.5);
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--secondary-color);
    border-radius: 14px;
    z-index: -1;
    opacity: 0.7;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-text {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.logo-text:hover {
    color: #d35400;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    color: #95a5a6;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -2px;
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

.form-group {
    position: relative;
    margin-bottom: 1.2rem;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.form-options a {
    color: var(--accent-color);
}

.form-options a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
    font-weight: bold;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.social-login {
    margin-top: 2rem;
    text-align: center;
}

.social-login p {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #eee;
}

.social-login p::before { left: 0; }
.social-login p::after { right: 0; }

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.wechat { background-color: #07c160; }
.qq { background-color: #12b7f5; }
.weibo { background-color: #e6162d; }

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-footer a {
    color: #95a5a6;
}

.login-footer a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .grid-layout {
        grid-template-columns: 1fr;
        margin-top: 0;
    }
    
    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .download-box, .quick-links {
        flex: 1;
    }

    .hero-slider {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 2.5rem;
    }

    .char-info {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1rem;
    }

    .bar {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links, .header-actions {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Login Mobile */
    .login-container {
        padding: 1.5rem;
    }
}
