* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a2e;
    line-height: 1.5;
}

/* 隐藏动态背景画布 */
#starCanvas, #particleCanvas, .bg-overlay, .ripple, .logo-glow, .footer-glow {
    display: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* ========= 导航栏 ========= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: #3b82f6;
    font-size: 1.6rem;
}

.logo span {
    background: linear-gradient(135deg, #1e293b, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    border-radius: 2rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    white-space: nowrap;
}

.nav-btn i {
    font-size: 0.9rem;
}

.nav-btn.active {
    background: #ffffff;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-btn:hover:not(.active) {
    color: #1e293b;
    background: #e2e8f0;
}

/* ========= 页面切换 ========= */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active-page {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========= 首页样式 ========= */
.hero-section {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero-badge {
    margin-bottom: 1.5rem;
}

.badge-glow {
    background: #eef2ff;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: #3b82f6;
    font-weight: 500;
    letter-spacing: 1px;
    display: inline-block;
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.title-line {
    display: inline-block;
    background: linear-gradient(135deg, #1e293b, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0.2rem;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.hero-divider i {
    color: #94a3b8;
    font-size: 0.8rem;
}

.hero-divider span {
    width: clamp(40px, 10vw, 60px);
    height: 1px;
    background: #cbd5e1;
}

.hero-sub {
    font-size: clamp(0.85rem, 4vw, 1rem);
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

/* 统计卡片 - 修复布局 */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.stat-item {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    text-align: center;
    min-width: 120px;
    flex: 0 1 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.stat-icon {
    font-size: 1.3rem;
    color: #3b82f6;
    margin-bottom: 0.6rem;
}

.stat-number {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.3rem;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========= 页面头部 ========= */
.page-header {
    text-align: center;
    margin: 1rem 0 2rem;
}

.page-header h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-header h2 i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

.page-header p {
    color: #64748b;
    font-size: 0.9rem;
}

/* ========= 筛选栏 ========= */
.filter-bar {
    background: #ffffff;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 类型筛选栏特殊样式 */
.target-filter-bar {
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    padding-right: 0.5rem;
    border-right: 1px solid #e2e8f0;
}

.filter-label i {
    color: #3b82f6;
}

.search-box {
    flex: 2;
    min-width: 200px;
    background: #f8fafc;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box i {
    color: #94a3b8;
    margin-right: 0.5rem;
}

.search-box input {
    background: transparent;
    border: none;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    color: #1e293b;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-chip {
    background: #f8fafc;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
}

.filter-chip.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-chip:hover:not(.active) {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* ========= 附魔卡片网格 ========= */
.enchant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.enchant-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.enchant-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.card-header {
    padding: 1rem 1.2rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 附魔标题区域 - 包含图标 */
.enchant-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enchant-title i {
    font-size: 1.1rem;
    color: #f59e0b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.enchant-name {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    color: #1e293b;
}

.max-level {
    font-size: 0.7rem;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    color: #64748b;
    white-space: nowrap;
}

.rarity-badge {
    display: inline-block;
    margin: 0.8rem 1.2rem 0.3rem;
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    width: fit-content;
}

/* 稀有度配色 */
.rarity-legendary { background: #fef3c7; color: #b45309; }
.rarity-epic { background: #fae8ff; color: #a21caf; }
.rarity-rare { background: #e0e7ff; color: #4338ca; }
.rarity-common { background: #f1f5f9; color: #475569; }
.rarity-uncommon { background: #dcfce7; color: #15803d; }
.rarity-special { background: #cffafe; color: #0e7490; }
.rarity-veryspecial { background: #fce7f3; color: #be185d; }

.card-description {
    padding: 0.2rem 1.2rem 0.8rem;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    flex: 1;
}

.card-footer {
    padding: 0.6rem 1.2rem 0.9rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    gap: 0.5rem;
}

.targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.target-tag {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    color: #3b82f6;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.max-lvl {
    font-size: 0.7rem;
    color: #94a3b8;
}

.max-lvl i {
    margin-right: 0.2rem;
}

/* ========= Coming Soon 页面 ========= */
.coming-soon {
    text-align: center;
    padding: 4rem 1rem;
}

.coming-icon {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.coming-soon h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.coming-divider {
    width: 60px;
    height: 2px;
    background: #cbd5e1;
    margin: 1rem auto;
}

.coming-soon p {
    color: #64748b;
    margin: 0.5rem 0;
}

.coming-soon .highlight {
    color: #3b82f6;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 1.1rem;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    text-decoration: none;
}

.social-link:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

/* ========= 页脚 ========= */
footer {
    margin: 4rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.footer-content {
    font-size: clamp(0.7rem, 3vw, 0.8rem);
    color: #64748b;
    margin-bottom: 0.5rem;
}

.footer-content i {
    color: #3b82f6;
    margin-right: 0.3rem;
}

.copyright {
    font-size: clamp(0.6rem, 3vw, 0.7rem);
    color: #94a3b8;
}

.copyright p {
    margin: 0.2rem 0;
}

/* ========= 加载/空状态 ========= */
.loading-state, .empty-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    grid-column: 1/-1;
}

.loading-state i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

/* ========= 移动端适配 ========= */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .navbar {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }
    
    .logo {
        justify-content: center;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .nav-btn i {
        font-size: 0.85rem;
    }
    
    .hero-section {
        padding: 1rem 0 2rem;
    }
    
    .hero-badge {
        margin-bottom: 1rem;
    }
    
    .badge-glow {
        font-size: 0.7rem;
        padding: 0.3rem 1rem;
    }
    
    .hero-divider {
        margin: 1rem 0;
    }
    
    .hero-sub {
        margin-bottom: 1.8rem;
    }
    
    /* 统计卡片 - 移动端2x2网格 */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        max-width: 360px;
        margin: 0 auto;
    }
    
    .stat-item {
        padding: 0.8rem 0.5rem;
        min-width: auto;
    }
    
    .stat-number {
        font-size: 0.9rem;
        white-space: normal;
        word-break: keep-all;
    }
    
    .stat-icon {
        font-size: 1.2rem;
    }
    
    /* 筛选栏 */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
    }
    
    /* 类型筛选栏移动端 */
    .target-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-label {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-group {
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 0.3rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-chip {
        white-space: nowrap;
    }
    
    /* 卡片 */
    .enchant-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .targets {
        margin-bottom: 0.3rem;
    }
    
    /* 页脚 */
    footer {
        margin: 2rem 0 1.5rem;
        padding-top: 1.5rem;
    }
}

/* ========= 小屏手机 (≤480px) ========= */
@media (max-width: 480px) {
    .stats-grid {
        gap: 0.6rem;
        max-width: 300px;
    }
    
    .stat-item {
        padding: 0.6rem 0.3rem;
    }
    
    .stat-number {
        font-size: 0.8rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .stat-icon {
        font-size: 1rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .page-header {
        margin: 0.5rem 0 1rem;
    }
    
    .enchant-name {
        font-size: 1rem;
    }
}

/* ========= 平板适配 ========= */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .enchant-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.2rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.9rem 1rem;
        min-width: 110px;
    }
}

/* ========= 大屏优化 ========= */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .enchant-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.8rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .stats-grid {
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1.2rem 1.8rem;
        min-width: 140px;
    }
}