/* 漫糖屋 - 基础样式 */

:root {
    --primary-pink: #FF9EB5;
    --light-pink: #FFD1DC;
    --mint: #B5E4CA;
    --cream: #FFF9F0;
    --yellow: #FFE4A1;
    --purple: #D4B5F0;
    --text: #5D4E6D;
    --text-light: #8B7B9E;
    --shadow: rgba(255, 158, 181, 0.3);
}

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-pink) 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

/* 扁平化图标样式 */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.icon-candy {
    width: 32px;
    height: 32px;
}

.icon-search {
    width: 20px;
    height: 20px;
}

.icon-heart {
    width: 16px;
    height: 16px;
    fill: var(--primary-pink);
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--purple) 100%);
    padding: 15px 0;
    box-shadow: 0 4px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.logo:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.9);
    font-size: 1rem;
    width: 250px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    width: 300px;
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

.search-btn {
    background: var(--yellow);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 主容器 */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 页面标题 */
.page-title {
    text-align: center;
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 2.5rem;
    color: var(--primary-pink);
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 var(--light-pink);
}

.page-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 158, 181, 0.4);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--purple) 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 158, 181, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--mint) 0%, #98D8C8 100%);
    color: var(--text);
}

/* 标签样式 */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    background: var(--light-pink);
    color: var(--primary-pink);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin: 3px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-pink);
    color: white;
    transform: scale(1.05);
}

.tag.active {
    background: var(--primary-pink);
    color: white;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    padding: 10px 18px;
    background: white;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-pink);
    color: white;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--purple) 0%, var(--primary-pink) 100%);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 60px;
}

.footer p {
    opacity: 0.9;
}

.footer-heart {
    display: inline-block;
    width: 16px;
    height: 16px;
    fill: white;
    vertical-align: middle;
    margin: 0 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        width: 200px;
    }
    
    .search-input:focus {
        width: 220px;
    }
    
    .page-title h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 20px 15px;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 装饰元素 */
.deco-bubble {
    position: fixed;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--light-pink), var(--primary-pink));
    opacity: 0.3;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}
