/* 豇豆先生派对 - 移动端样式 */

/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 丰富多彩的派对主题配色 */
    --primary-color: #ff6b35; /* 主橙色 */
    --primary-dark: #e55a2b;
    --primary-light: #ff8a65;
    --secondary-color: #f06292; /* 粉红色 */
    --accent-color: #9c27b0; /* 紫色 */
    --tertiary-color: #29b6f6; /* 蓝色 */
    --quaternary-color: #66bb6a; /* 绿色 */
    --quinary-color: #ffca28; /* 黄色 */
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-color: #fafafa;
    --white: #ffffff;
    --border-color: #f0f0f0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --border-radius: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 容器和布局 */
.container {
    max-width: 100%;
    padding: 0 10px; /* 减小左右内边距，减少两侧留白 */
    margin: 0 auto;
}

/* 页面布局 */
.page {
    padding-top: 60px; /* 为固定头部留出空间 */
    padding-bottom: 70px; /* 为底部导航留出空间 */
    min-height: 100vh;
}

/* 头部 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 15px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.header-back {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
    text-decoration: none;
}

/* 首页横幅 */
.banner {
    background: linear-gradient(135deg, #ff6b35, #f06292);
    color: white;
    padding: 50px 20px 40px;
    text-align: center;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 80%, rgba(252, 228, 138, 0.3) 0%, rgba(255, 255, 255, 0) 70%),
                radial-gradient(circle at 70% 20%, rgba(156, 39, 176, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner h1 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 25px;
    line-height: 1.6;
}

.banner-cta {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.banner-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* 分类导航 */
.category-nav {
    padding: 25px 15px 30px;
    background: var(--bg-color);
}

.category-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0 auto;
}

.category-item {
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

/* 彩色分类块 */
/* 彩色分类块 */
.category-item:nth-child(1),
.category-color-1 {
    background: linear-gradient(135deg, #ff6b35, #ff9800);
}

.category-item:nth-child(2),
.category-color-2 {
    background: linear-gradient(135deg, #f06292, #ec407a);
}

.category-item:nth-child(3),
.category-color-3 {
    background: linear-gradient(135deg, #29b6f6, #0288d1);
}

.category-item:nth-child(4),
.category-color-4 {
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

.category-item:nth-child(5),
.category-color-5 {
    background: linear-gradient(135deg, #ffca28, #fbc02d);
}

.category-item:nth-child(6),
.category-color-6 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-item:active {
    transform: translateY(-2px);
}

.category-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.category-count {
    font-size: 13px;
    opacity: 0.9;
}

/* 作品卡片（最新素材） */
.work-grid {
    padding: 30px 15px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 140, 90, 0.08));
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 0 15px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title span {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-muted);
}

.work-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.work-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.work-card:active {
    transform: translateY(-2px);
}

.work-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
    z-index: 1;
}

.work-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-card:hover .work-image {
    transform: scale(1.05);
}

.work-info {
    padding: 15px;
}

.work-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.work-size {
    font-size: 14px;
    color: var(--text-light);
}

.work-price {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
}

/* 文章列表（经验分享） */
.article-list {
    padding: 30px 15px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 107, 53, 0.1));
}

.article-card {
    padding: 20px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    background: var(--white);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.article-card:last-child {
    margin-bottom: 0;
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-color);
}

.article-excerpt {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 详情页面 */
.detail-header {
    position: relative;
}

.detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.detail-content {
    padding: 20px 15px;
}

.detail-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.3;
}

.detail-price {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.detail-size {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.detail-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.detail-gallery {
    margin-top: 20px;
}

.gallery-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 0 3px 3px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:hover {
    color: var(--secondary-color);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 3px;
    display: block;
    filter: grayscale(100%) opacity(0.7);
}

.nav-item.active .nav-icon {
    filter: grayscale(100%) opacity(1);
}

.nav-text {
    font-size: 12px;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 30px 0;
}

.load-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 5px;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--white);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pagination a.current {
    background: var(--primary-color);
    color: white;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--white);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:active {
    background: var(--primary-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

/* 登录页面 */
.login-page {
    padding: 60px 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    font-weight: bold;
}

.login-title {
    font-size: 24px;
    color: var(--text-color);
}

/* 文章页面样式 */
.article-content {
    line-height: 1.8;
}

.article-content h2, .article-content h3 {
    margin: 25px 0 15px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 15px 0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.empty-text {
    color: var(--text-muted);
}

/* 响应式调整 */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .category-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .work-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .banner h1 {
        font-size: 32px;
    }
    
    .category-list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .work-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .banner {
        padding: 70px 20px 60px;
    }
    
    .banner h1 {
        font-size: 38px;
    }
    
    .banner p {
        font-size: 18px;
    }
    
    .category-list {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .work-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .category-list {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .work-list {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 小屏幕设备优化 */
@media (max-width: 575px) {
    .banner {
        padding: 40px 15px 30px;
    }
    
    .banner h1 {
        font-size: 24px;
    }
    
    .banner p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .banner-cta {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .category-item {
        padding: 20px 15px;
    }
    
    .category-icon {
        font-size: 28px;
    }
    
    .work-image {
        height: 140px;
    }
    
    .article-card {
        padding: 15px;
        gap: 12px;
    }
    
    .article-number {
        font-size: 28px;
    }
}

/* 超小屏幕设备 */
@media (max-width: 480px) {
    .banner h1 {
        font-size: 20px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .work-title {
        font-size: 14px;
    }
    
    .work-price {
        font-size: 16px;
    }
    
    .work-size {
        font-size: 11px;
    }
    
    .article-title {
        font-size: 15px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.6s ease-in-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 色彩过渡动画 */
.color-transition {
    background: linear-gradient(-45deg, #ff6b35, #f06292, #9c27b0, #29b6f6, #66bb6a);
    background-size: 400% 400%;
    animation: colorWave 10s ease infinite;
}

@keyframes colorWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 视频板块 */
.video-section {
    padding: 30px 15px;
    background: var(--white);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
    height: 200px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-direction: column;
    gap: 10px;
}

.video-play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}