/* ==========================================
   粉色主题CMS - 样式表
   ========================================== */

/* 变量定义 */
:root {
    --pink-50: #fdf2f8;
    --pink-100: #fce7f3;
    --pink-200: #fbcfe8;
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --pink-700: #be185d;
    --pink-800: #9d174d;
    --pink-900: #831843;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-pink: 0 4px 14px 0 rgba(236, 72, 153, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--pink-50) 0%, var(--white) 50%, var(--pink-50) 100%);
    color: var(--gray-700);
    line-height: 1.8;
    min-height: 100vh;
}

a {
    color: var(--pink-500);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--pink-700);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--pink-100);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pink-600);
}

.logo-icon {
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--pink-100);
    color: var(--pink-600);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--pink-500);
    cursor: pointer;
}

/* 主内容区 */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Hero区域 */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--pink-100) 0%, var(--pink-50) 50%, var(--white) 100%);
    border-radius: var(--radius);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--pink-200) 0%, transparent 70%);
    opacity: 0.5;
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--pink-700);
    margin-bottom: 16px;
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* 文章卡片 */
.section-title {
    font-size: 1.8rem;
    color: var(--pink-700);
    margin-bottom: 30px;
    padding-left: 16px;
    border-left: 4px solid var(--pink-400);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--pink-100);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-pink);
}

.article-card .card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--pink-200), var(--pink-100));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.article-card .card-body {
    padding: 24px;
}

.article-card .card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--pink-100);
    color: var(--pink-600);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.article-card .card-title {
    font-size: 1.2rem;
    color: var(--gray-800);
    margin-bottom: 10px;
    font-weight: 600;
}

.article-card .card-title a {
    color: inherit;
}

.article-card .card-title a:hover {
    color: var(--pink-500);
}

.article-card .card-excerpt {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* 文章详情 */
.article-detail {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--pink-100);
    max-width: 800px;
    margin: 0 auto;
}

.article-detail h1 {
    font-size: 2rem;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.article-detail .meta {
    color: var(--gray-400);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pink-100);
}

.article-detail .content {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--gray-700);
}

.article-detail .content p {
    margin-bottom: 16px;
}

.article-detail .content img {
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

/* 页面内容 */
.page-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--pink-100);
    max-width: 800px;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2rem;
    color: var(--pink-700);
    margin-bottom: 24px;
}

.page-content .content {
    line-height: 2;
}

/* 联系表单 */
.contact-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--pink-100);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--pink-100);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pink-400);
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: var(--white);
    box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--pink-500), var(--pink-600));
    transform: translateY(-2px);
    color: var(--white);
}

.btn-secondary {
    background: var(--pink-100);
    color: var(--pink-600);
}

.btn-secondary:hover {
    background: var(--pink-200);
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

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

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.pagination a {
    background: var(--white);
    color: var(--pink-500);
    border: 1px solid var(--pink-200);
}

.pagination a:hover {
    background: var(--pink-100);
}

.pagination .current {
    background: var(--pink-500);
    color: var(--white);
}

/* 页脚 */
.footer {
    background: var(--white);
    border-top: 1px solid var(--pink-100);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--pink-600);
    margin-bottom: 12px;
}

.footer-section h4 {
    color: var(--gray-700);
    margin-bottom: 12px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--gray-500);
}

.footer-section ul li a:hover {
    color: var(--pink-500);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--pink-100);
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* 侧边栏 */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.sidebar .widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--pink-100);
}

.sidebar .widget h3 {
    color: var(--pink-600);
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.sidebar .widget ul {
    list-style: none;
}

.sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--pink-50);
}

.sidebar .widget ul li:last-child {
    border-bottom: none;
}

.sidebar .widget ul li a {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--pink-100);
        box-shadow: var(--shadow);
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

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

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .article-detail,
    .page-content,
    .contact-form {
        padding: 24px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

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

.article-card {
    animation: fadeIn 0.5s ease forwards;
}

.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.2s; }
.article-card:nth-child(4) { animation-delay: 0.3s; }

/* 装饰元素 */
.decoration {
    position: fixed;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.decoration-1 {
    width: 300px;
    height: 300px;
    background: var(--pink-300);
    top: 10%;
    right: -100px;
}

.decoration-2 {
    width: 200px;
    height: 200px;
    background: var(--pink-400);
    bottom: 20%;
    left: -50px;
}

/* 消息提示 */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: var(--pink-50);
    color: var(--pink-700);
    border: 1px solid var(--pink-200);
}
