/* CSS Variables for Theme System */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border: #e2e8f0;
    --shadow: rgba(0,0,0,0.1);
    --overlay: rgba(0,0,0,0.7);
}

[data-theme="dark"] {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --border: #4a5568;
    --shadow: rgba(0,0,0,0.3);
}

[data-theme="night"] {
    --primary: #4299e1;
    --secondary: #2c5282;
    --accent: #63b3ed;
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --border: #2d3748;
    --shadow: rgba(0,0,0,0.5);
}

[data-theme="blueprint"] {
    --primary: #3182ce;
    --secondary: #2c5282;
    --accent: #4299e1;
    --bg-primary: #1e3a5f;
    --bg-secondary: #2c5282;
    --text-primary: #e6f2ff;
    --text-secondary: #90cdf4;
    --border: #4299e1;
    --shadow: rgba(0,0,0,0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 2px 10px var(--shadow);
}

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

.nav-brand {
    font-size: 24px;
    font-weight: bold;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/zy.webp') center/cover no-repeat;
    z-index: -1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-slogan {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #48bb78;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

.btn-video {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

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

.feature-card {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

/* Gallery */
.gallery {
    background: var(--bg-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 3/2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Map */
.map-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.map-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 20px;
}

.btn-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-primary);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    transition: transform 0.3s;
}

/* Form */
.apply {
    background: var(--bg-secondary);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.contact-item {
    text-align: center;
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 2px solid var(--border);
}

.contact-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 18px;
    font-weight: 600;
}

.apply-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
}

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

.btn-submit {
    width: 100%;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #c6f6d5;
    color: #22543d;
    display: block;
}

.form-message.error {
    background: #fed7d7;
    color: #742a2a;
    display: block;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.team-member {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.member-avatar {
    font-size: 64px;
    margin-bottom: 15px;
}

.member-role {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.member-id {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.sponsors {
    text-align: center;
    padding: 40px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.sponsor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.sponsor-tag {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Utilities */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.theme-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 999;
}

.theme-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 50px var(--shadow);
    z-index: 1001;
    transition: transform 0.3s;
}

.theme-panel.show {
    transform: translate(-50%, -50%) scale(1);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.theme-option {
    padding: 15px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-option:hover {
    border-color: var(--primary);
}

.theme-close {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox.show {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    color: white;
    font-size: 18px;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav-menu.active {
        max-height: 500px;
        border-bottom: 1px solid var(--border);
    }

    /* Hero优化 - 减少高度 */
    .hero {
        min-height: 60vh;
        margin-top: 56px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-slogan {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    /* 单列布局 */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* 特色改为2列紧凑布局 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .feature-card {
        padding: 12px;
    }

    .feature-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .feature-card h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .feature-card p {
        font-size: 12px;
        line-height: 1.3;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* 增大触摸区域 */
    .nav-menu a,
    .faq-question,
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 优化卡片间距 */
    .feature-card,
    .contact-item,
    .team-member {
        padding: 20px;
    }

    /* 地图容器优化 */
    .map-wrapper {
        padding-bottom: 75%;
    }

    /* 浮动按钮优化 */
    .theme-toggle {
        bottom: 100px;
    }

    /* Logo大小 */
    .nav-brand .logo {
        height: 32px;
    }

    /* 导航栏padding */
    .navbar .container {
        padding: 12px 20px;
    }
}

@media (max-width: 430px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0;
    }

    /* Hero进一步优化 */
    .hero {
        min-height: 50vh;
        margin-top: 52px;
    }

    .hero-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    /* 浮动按钮优化 */
    .back-to-top,
    .theme-toggle {
        width: 45px;
        height: 45px;
        right: 15px;
        font-size: 20px;
    }

    .theme-toggle {
        bottom: 75px;
    }

    /* Logo更小 */
    .nav-brand .logo {
        height: 28px;
    }

    /* 卡片优化 */
    .feature-card,
    .contact-item,
    .team-member {
        padding: 15px;
    }

    .feature-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .feature-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .feature-card p {
        font-size: 14px;
        line-height: 1.4;
    }

    .features-grid {
        gap: 15px;
    }

    /* 图片画廊优化 */
    .gallery-grid {
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 16/9;
    }

    /* FAQ优化 */
    .faq-question {
        padding: 15px;
        font-size: 16px;
    }

    .faq-answer {
        font-size: 14px;
    }

    /* 按钮优化 */
    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    /* 联系信息优化 */
    .contact-info {
        gap: 15px;
    }

    .contact-item h3 {
        font-size: 16px;
    }

    .contact-item p {
        font-size: 16px;
    }

    /* 团队成员优化 */
    .team-grid {
        gap: 15px;
    }

    .member-avatar {
        font-size: 48px;
    }

    /* 地图全屏按钮 */
    .btn-fullscreen {
        padding: 8px 12px;
        font-size: 18px;
    }

    /* 主题面板优化 */
    .theme-panel {
        width: 90%;
        padding: 20px;
    }

    .theme-options {
        gap: 8px;
    }

    .theme-option {
        padding: 12px;
        font-size: 14px;
    }
}
