/* 香蕉配色方案 */
:root {
    --banana-yellow: #FFE135;
    --banana-dark: #F4C430;
    --banana-light: #FFF8DC;
    --banana-brown: #8B4513;
    --banana-green: #9ACD32;
    --text-dark: #2C2C2C;
    --text-light: #666;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--banana-light) 0%, var(--white) 100%);
    line-height: 1.6;
    zoom: 0.9;
}

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

/* 顶部导航 */
.header {
    background: var(--banana-light);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    padding: 0.5rem 20px;
    gap: 2rem;
    max-width: 100%;
}

.header-search {
    flex: 0 0 auto;
    width: 380px;
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    margin-left: 3.5rem;
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.header-cta .cta-icon {
    font-size: 1.5rem;
}

.cta-text-small {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    white-space: nowrap;
}

.cta-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.header-ad {
    width: 400px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    margin-right: -30px;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.banana-icon {
    font-size: 2rem;
    animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.logo-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--banana-brown);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--banana-yellow);
    border-radius: 2px;
}

.search-input {
    flex: 1;
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--banana-yellow);
    border-radius: 50px;
    font-size: 0.95rem;
    background: var(--white);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--banana-dark);
    box-shadow: 0 0 0 3px rgba(255, 225, 53, 0.2);
}

.search-btn {
    padding: 0.7rem 1.5rem;
    background: var(--banana-yellow);
    color: var(--text-dark);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* 分类筛选 */
.categories {
    padding: 2rem 0 1rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-weight: 700;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
}

.category-btn {
    padding: 0.8rem 2rem;
    background: var(--white);
    border: 2px solid var(--banana-yellow);
    border-radius: 50px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--banana-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow);
}

/* 案例展示 */
.gallery {
    padding: 1rem 0 3rem 0;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--banana-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn.active {
    background: var(--banana-yellow);
    border-color: var(--banana-yellow);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 案例卡片 */
.case-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.case-images {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--banana-light);
    height: 250px;
}

.case-image-wrapper {
    position: relative;
    overflow: hidden;
}

.case-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.case-card:hover .case-image {
    transform: scale(1.05);
}

.image-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--banana-yellow);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.case-content {
    padding: 1.5rem;
}

.case-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.case-author {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.case-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--banana-light);
    border-top-color: var(--banana-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 2rem 0;
}

.load-more-btn {
    padding: 1rem 3rem;
    background: var(--banana-yellow);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--banana-dark);
    transform: scale(1.05);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--white);
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--banana-yellow);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* 图片对比 */
.image-comparison {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-box {
    flex: 1;
}

.image-label {
    background: var(--banana-yellow);
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    border-radius: 0 0 8px 8px;
    background: var(--white);
}

.arrow-icon {
    font-size: 2rem;
    color: var(--banana-brown);
}

/* 模态框信息 */
.modal-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-box,
.description-box {
    background: var(--banana-light);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--banana-yellow);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.copy-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--banana-yellow);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: var(--banana-dark);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--banana-yellow);
    background: var(--white);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    color: var(--text-dark);
}

.action-btn:hover {
    background: var(--banana-yellow);
}

/* AI生图引导卡片 */
.generate-cta-card {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--banana-yellow) 0%, var(--banana-dark) 100%);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-icon {
    font-size: 2rem;
}

.cta-text h5 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.cta-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--banana-brown);
}

.cta-btn {
    padding: 0.8rem 2rem;
    background: var(--white);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.cta-btn:hover {
    background: var(--banana-brown);
    color: var(--white);
    transform: translateX(5px);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--banana-yellow) 0%, var(--banana-dark) 100%);
    color: var(--text-dark);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-bottom {
    text-align: center;
    font-weight: 600;
}

/* 广告图片可点击 */
.header-ad .ad-image {
    cursor: pointer;
}

/* 广告放大弹窗 - 全局样式 */
.ad-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
}

.ad-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    padding: 20px;
}

.ad-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ad-modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        zoom: 1;
    }

    .container {
        padding: 0 15px;
    }

    /* 头部导航优化 */
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 15px;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .banana-icon {
        font-size: 1.5rem;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
    }

    /* 导航菜单 */
    .nav {
        display: none;
    }

    /* 搜索框优化 */
    .header-search {
        width: 100%;
        margin-left: 0;
    }

    .search-input {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* CTA按钮优化 */
    .header-cta {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        padding: 0.6rem 1rem;
    }

    .header-cta .cta-icon {
        font-size: 1.2rem;
    }

    .cta-title {
        font-size: 0.85rem;
    }

    .cta-subtitle {
        font-size: 0.7rem;
    }

    /* 广告位悬浮 */
    .header-ad {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 120px;
        height: auto;
        margin: 0;
        z-index: 999;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        padding: 8px;
        animation: float 3s ease-in-out infinite;
    }

    .header-ad .ad-image {
        border-radius: 8px;
    }

    /* 分类筛选优化 */
    .categories {
        padding: 1.5rem 0 1rem 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .category-filters {
        gap: 0.8rem;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .category-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 案例展示优化 */
    .gallery {
        padding: 1rem 0 2rem 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .case-images {
        height: 200px;
    }

    .case-content {
        padding: 1rem;
    }

    .case-title {
        font-size: 1rem;
    }

    .case-author {
        font-size: 0.85rem;
    }

    .case-stats {
        font-size: 0.85rem;
    }

    /* 模态框优化 */
    .modal-content {
        margin: 1rem;
        max-height: 95vh;
        border-radius: 16px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .modal-section-title {
        font-size: 1rem;
    }

    .image-comparison {
        flex-direction: column;
    }

    .arrow-icon {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    .modal-image {
        max-height: 300px;
    }

    .prompt-box,
    .description-box {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* CTA卡片优化 */
    .generate-cta-card {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-text h5 {
        font-size: 1rem;
    }

    .cta-text p {
        font-size: 0.85rem;
    }

    .cta-btn {
        width: 100%;
        padding: 0.7rem 1.5rem;
    }

    /* 按钮优化 */
    .action-buttons {
        flex-direction: column;
    }

    .load-more-btn {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
    }

    /* 页脚优化 */
    .footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }

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

    .footer-bottom {
        font-size: 0.9rem;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-subtitle {
        display: none;
    }

    .category-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .case-images {
        height: 180px;
    }

    .modal-content {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* 平板优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .header .container {
        flex-wrap: wrap;
    }

    .header-search {
        width: 300px;
    }

    .header-ad {
        width: 300px;
        height: 80px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-body {
        gap: 1.5rem;
    }
}
