/* ===== CSS 变量 ===== */
:root {
    /* 浅色主题 */
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7ff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-tertiary: #8a8aaa;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --accent-glow: rgba(108, 92, 231, 0.15);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(108, 92, 231, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-accent: 0 4px 20px rgba(108, 92, 231, 0.2);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --modal-bg: rgba(0, 0, 0, 0.6);
    --telegram-color: #0088cc;
    --discord-color: #5865F2;
    --github-color: #24292e;
    --bg-circle-1: rgba(108, 92, 231, 0.08);
    --bg-circle-2: rgba(162, 155, 254, 0.06);
    --bg-circle-3: rgba(0, 200, 83, 0.05);
}

[data-theme="dark"] {
    /* 深色主题 */
    --bg-primary: #0d0d1a;
    --bg-secondary: #13132a;
    --bg-tertiary: #1a1a35;
    --bg-card: #16162e;
    --bg-card-hover: #1e1e3a;
    --text-primary: #e8e8f5;
    --text-secondary: #b0b0cc;
    --text-tertiary: #6a6a8a;
    --accent: #a29bfe;
    --accent-light: #6c5ce7;
    --accent-gradient: linear-gradient(135deg, #a29bfe, #6c5ce7);
    --accent-glow: rgba(162, 155, 254, 0.2);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(162, 155, 254, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(162, 155, 254, 0.25);
    --nav-bg: rgba(13, 13, 26, 0.85);
    --modal-bg: rgba(0, 0, 0, 0.8);
    --telegram-color: #0088cc;
    --discord-color: #5865F2;
    --github-color: #e8e8f5;
    --bg-circle-1: rgba(162, 155, 254, 0.1);
    --bg-circle-2: rgba(108, 92, 231, 0.08);
    --bg-circle-3: rgba(0, 200, 83, 0.05);
}

/* ===== 重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

/* ===== 背景装饰 ===== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float-bg 20s ease-in-out infinite;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    background: var(--bg-circle-1);
    top: 10%;
    right: -100px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 350px;
    height: 350px;
    background: var(--bg-circle-2);
    bottom: 20%;
    left: -80px;
    animation-delay: -7s;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    background: var(--bg-circle-3);
    top: 50%;
    left: 40%;
    animation-delay: -14s;
}

@keyframes float-bg {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.nav-logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-github {
    display: flex;
    align-items: center;
    padding: 8px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

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

.nav-mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero 区域 ===== */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 100vh;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--accent-glow);
    border: 1px solid var(--border-hover);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.title-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(108, 92, 231, 0.35);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* Hero 看板娘 */
.hero-mascot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 1s ease 0.3s both;
}

.mascot-float {
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px var(--accent-glow));
}

.mascot-img {
    width: 280px;
    height: auto;
    border-radius: 24px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.mascot-bubble {
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    position: relative;
}

.mascot-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

/* ===== 通用 Section ===== */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-tertiary);
}

/* ===== 表情包画廊 ===== */
.gallery-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

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

.sticker-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease both;
}

.sticker-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.sticker-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.sticker-card:hover::before {
    opacity: 0.03;
}

.sticker-img-wrapper {
    position: relative;
    z-index: 1;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.sticker-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sticker-card:hover .sticker-img {
    transform: scale(1.08);
}

.sticker-name {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.sticker-card:hover .sticker-name {
    color: var(--accent);
}

/* ===== 关于区域 ===== */
.about-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.about-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.about-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s ease;
}

.about-link:hover {
    text-decoration: underline;
}

/* ===== 获取链接区域 ===== */
.links-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.link-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: block;
}

.link-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.link-card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    transition: opacity 0.3s ease;
}

.link-card:hover .link-card-bg {
    opacity: 0.15;
}

.link-telegram .link-card-bg { background: var(--telegram-color); }
.link-discord .link-card-bg { background: var(--discord-color); }
.link-github .link-card-bg { background: var(--github-color); }

.link-card-content {
    position: relative;
    z-index: 1;
    padding: 32px;
    background: var(--bg-card);
}

.link-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #fff;
}

.link-telegram .link-icon { background: var(--telegram-color); }
.link-discord .link-icon { background: var(--discord-color); }
.link-github .link-icon { background: var(--github-color); }

.link-card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.link-card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.link-action {
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.2s ease;
    display: inline-block;
}

.link-telegram .link-action { color: var(--telegram-color); }
.link-discord .link-action { color: var(--discord-color); }
.link-github .link-action { color: var(--accent); }

.link-card:hover .link-action {
    transform: translateX(4px);
}

/* ===== 页脚 ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 40px 24px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.footer-name {
    font-weight: 700;
    font-size: 1rem;
}

.footer-license {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

.footer-copy p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
}

.modal-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.modal-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-accent);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

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

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 100px;
        min-height: auto;
    }

    .hero-content {
        order: 2;
    }

    .hero-mascot {
        order: 1;
        margin-bottom: 20px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .mascot-img {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 1.5rem;
    }

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

    .sticker-card {
        padding: 10px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .about-card,
    .link-card-content {
        padding: 24px;
    }

    .footer-links {
        gap: 16px;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== 选中文字 ===== */
::selection {
    background: var(--accent);
    color: #fff;
}
