/* 全局样式 */
:root {
    --primary-color: #ff66aa;
    --secondary-color: #ff99cc;
    --background-color: #fff6f9;
    --text-color: #333333;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --title-font: "华文行楷", "楷体", "STKaiti", serif;
    --body-font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* 标题样式 */
h1,
h2,
h3,
h4 {
    font-family: var(--title-font);
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(255, 102, 170, 0.2);
    font-weight: normal;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(120deg, var(--primary-color), #ff99ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
}

h2 {
    font-size: 2.2rem;
    margin: 1.5rem 0;
    position: relative;
    display: inline-block;
    letter-spacing: 2px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 3px;
}

h3 {
    font-size: 1.8rem;
    margin: 1rem 0;
    color: #ff6699;
    letter-spacing: 1px;
}

/* 导航栏样式 */
.main-nav {
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--title-font);
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: normal;
    transition: all 0.3s;
    position: relative;
    letter-spacing: 2px;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: titleFloat 3s ease-in-out infinite;
}

.hero p {
    font-size: 1.5rem;
    font-family: var(--title-font);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
}

.featured-characters,
.latest-news {
    padding: 3rem 2rem;
    width: 1200px;
    margin: 0 auto;
}

.character-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.character-card,
.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.character-card:hover,
.news-card:hover {
    transform: translateY(-5px);
}

.character-card img,
.news-card img {
    width: 380px;
    height: 200px;
    object-fit: cover;
}

/* 角色介绍页样式 */
.character-intro {
    padding: 2rem;
    width: 1200px;
    margin: 0 auto;
}

.character-section {
    margin: 3rem 0;
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
}

.character-info {
    display: grid;
    grid-template-columns: 300px 2fr;
    gap: 3rem;
    align-items: start;
}

.character-image {
    position: sticky;
    top: 2rem;
}

.character-image img {
    width: 300px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.character-details {
    padding-right: 1rem;
}

.character-details h2 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

.character-profile {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 102, 170, 0.05);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.character-profile p {
    margin: 1rem 0;
    display: flex;
    align-items: baseline;
    line-height: 1.8;
}

.character-profile strong {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 5em;
    margin-right: 1rem;
    display: inline-block;
}

.character-story {
    margin-top: 2.5rem;
}

.character-story h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-left: 1.5rem;
}

.character-story h3::before {
    content: '♥';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    opacity: 0.6;
}

.character-story p {
    font-size: 1.1rem;
    line-height: 2;
    text-indent: 2em;
    margin: 1rem 0;
    letter-spacing: 0.5px;
    color: #444;
}

/* 周边产品页样式 */
.products-page {
    padding: 2rem;
    width: 1200px;
    margin: 0 auto;
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.category-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--body-font);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.product-image img {
    width: 380px;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-family: var(--body-font);
    font-size: 1.4rem;
    color: var(--text-color);
    transition: color 0.3s;
    font-weight: bold;
}

.product-card:hover .product-info h3 {
    color: var(--primary-color);
}

.description {
    font-size: 1.05rem;
    color: #666;
    margin: 0.8rem 0;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.wishlist-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: var(--body-font);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.wishlist-btn:hover {
    background: var(--secondary-color);
}

/* 人物列表页样式 */
.character-list-page {
    padding: 2rem;
    width: 1200px;
    margin: 0 auto;
}

.search-section {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

#character-search {
    padding: 0.5rem 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    width: 300px;
    font-family: var(--body-font);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

#character-filter {
    padding: 0.5rem 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    background: white;
    font-family: var(--body-font);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* 人物列表卡片样式 */
.character-list-page .character-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem;
}

.character-list-page .character-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.character-list-page .character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255, 102, 170, 0.2);
}

.character-list-page .character-image {
    position: relative;
    width: 380px;
    height: 250px;
    overflow: hidden;
}

.character-list-page .character-image img {
    width: 380px;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.character-list-page .character-card:hover .character-image img {
    transform: scale(1.05);
}

.character-list-page .character-info {
    padding: 1.5rem;
    background: white;
    display: block;
}

.character-list-page .character-text {
    text-align: center;
}

.character-list-page .character-text h3 {
    font-family: var(--title-font);
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    transition: color 0.3s;
}

.character-list-page .character-text p {
    font-size: 1.1rem;
    color: #666;
    margin: 0.5rem 0;
    line-height: 1.5;
    font-family: var(--body-font);
}

/* 页脚样式 */
footer {
    background: white;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    font-family: var(--body-font);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--text-color);
    text-decoration: none;
}

.social-link:hover {
    color: var(--primary-color);
}

.social-links a {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* 动画效果 */
@keyframes titleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 文字选中效果 */
::selection {
    background: var(--secondary-color);
    color: white;
}

/* 特殊文字装饰 */
.character-name {
    position: relative;
    display: inline-block;
}

.character-name::before {
    content: '❤';
    position: absolute;
    left: -20px;
    color: var(--primary-color);
    opacity: 0.6;
}

/* 可爱的列表样式 */
.character-profile ul {
    list-style: none;
    padding-left: 1.5em;
}

.character-profile ul li::before {
    content: '🌸';
    margin-right: 8px;
    font-size: 0.9em;
}