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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #172d36, #030d11 80%);
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(3, 13, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 231, 0.1);
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(90deg, #00ffe7, #0072ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav-link {
    color: #b0bec5;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #00ffe7;
    background: rgba(0, 255, 231, 0.05);
}

.nav-link.active {
    color: #00ffe7;
    background: rgba(0, 255, 231, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #00ffe7, #0072ff);
    border-radius: 1px;
}

/* 主要内容区域 */
main, header.hero {
    flex: 1;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

header.hero {
    text-align: center;
    padding-top: 10rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: 0.15em;
    background: linear-gradient(90deg, #00ffe7, #0072ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(0, 255, 231, 0.3);
}

h2 {
    font-size: 1.8rem;
    color: #00ffe7;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #b0bec5;
}

/* 按钮样式 */
.button {
    background: linear-gradient(135deg, #00ffe7, #00b8d4);
    color: #0f2027;
    border: none;
    padding: 0.9em 2.2em;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 255, 231, 0.2);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.button:hover::before {
    left: 100%;
}

.button:hover {
    background: linear-gradient(135deg, #0072ff, #0056b3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 114, 255, 0.3);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 231, 0.2);
}

/* 介绍框样式 */
.intro-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 231, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 4px 30px rgba(0, 255, 231, 0.08);
    backdrop-filter: blur(5px);
}

.intro-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.intro-box p {
    text-align: justify;
}

/* 快速导航 */
.quick-nav {
    text-align: center;
    margin-top: 3rem;
}

.quick-nav-title {
    font-size: 1.2rem;
    color: #b0bec5;
    margin-bottom: 1.5rem;
}

.quick-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* 卡片通用样式 */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 231, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffe7, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #00ffe7;
    box-shadow: 0 12px 40px rgba(0, 255, 231, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.card-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #00ffe7;
    margin-bottom: 0.8rem;
}

.card-desc {
    font-size: 1rem;
    color: #b0bec5;
    line-height: 1.6;
}

.card-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 231, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.card-detail.active {
    max-height: 2000px;
    opacity: 1;
    pointer-events: auto;
}

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

.card-detail p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.card-detail .detail-label {
    color: #00ffe7;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* 角色卡片 */
.character-card {
    text-align: center;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 255, 231, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: #00ffe7;
    box-shadow: 0 0 15px rgba(0, 255, 231, 0.2);
}

.search-box::placeholder {
    color: #607d8b;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 255, 231, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #00ffe7;
}

.filter-select option {
    background: #0f2027;
    color: #fff;
}

/* 故事展开 */
.story-expand {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 231, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.story-expand.active {
    max-height: 3000px;
    opacity: 1;
}

.expand-btn {
    background: none;
    border: 1px solid rgba(0, 255, 231, 0.3);
    color: #00ffe7;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: rgba(0, 255, 231, 0.1);
    border-color: #00ffe7;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(0, 255, 231, 0.1);
    margin-top: auto;
}

footer p {
    font-size: 0.9rem;
    color: #607d8b;
}

/* 返回按钮 */
.back-btn {
    display: inline-block;
    margin-top: 3rem;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .intro-box {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .quick-nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .button {
        width: 100%;
        max-width: 250px;
        margin: 0.5rem 0;
    }
    
    .card-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.2rem;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    main, header.hero {
        padding: 7rem 1rem 3rem;
    }
    
    header.hero {
        padding-top: 9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .character-img {
        width: 100px;
        height: 100px;
    }
}

/* 角色详情按钮样式 */
.detail-button-container {
    margin-top: 1.5rem;
    text-align: center;
}

.detail-link-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 255, 231, 0.2), rgba(0, 114, 255, 0.2));
    border: 1px solid rgba(0, 255, 231, 0.5);
    border-radius: 8px;
    color: #00ffe7;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.detail-link-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 231, 0.4), rgba(0, 114, 255, 0.3));
    border-color: #00ffe7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 231, 0.3);
}

/* 卡片内按钮区域 */
.card-action {
    margin-top: 1.2rem;
    text-align: center;
}