/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #a47c5c;
    --secondary-color: #6e3f34;
    --danger-color: #d9534f;
    --warning-color: #f0ad4e;
    --success-color: #a47c5c;
    --text-dark: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border-color: #d4c4a8;
    --bg-light: #f8f0d9;
    --bg-white: #fff;
    --shadow: 0 2px 8px rgba(110,63,52,0.1);
    --shadow-hover: 0 4px 16px rgba(110,63,52,0.15);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    padding-top: 70px; /* 为固定头部预留空间 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #8d6a4f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* 顶部导航栏 */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 32px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: bold;
}

.user-area {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--bg-white);
    border-radius: 4px;
    box-shadow: var(--shadow-hover);
    min-width: 150px;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-menu i {
    margin-right: 8px;
}

/* 滚动公告栏 */
.announcement-bar {
    background-color: #d32f2f;
    color: white;
    padding: 12px 0;
}

.announcement-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.announcement-wrapper i {
    font-size: 20px;
}

.announcement-content {
    flex: 1;
    overflow: hidden;
}

.marquee {
    display: flex;
    animation: marquee 30s linear infinite;
}

.marquee span {
    padding: 0 50px;
    white-space: nowrap;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.btn-more {
    background-color: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 16px;
    border: 1px solid white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-more:hover {
    background-color: white;
    color: #d32f2f;
}

/* Banner 广告区 */
.banner-section {
    margin: 15px 0;
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.banner-ad-item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(110,63,52,0.1);
    transition: all 0.3s;
    height: 150px;
}

.banner-ad-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(110,63,52,0.15);
}

.banner-ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
}

/* 病症分类区 */
.category-section {
    margin: 20px 0;
}

.section-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quick-actions {
    display: flex;
    gap: 15px;
}

.quick-actions .btn {
    white-space: nowrap;
}

/* 新的action-btn样式 */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    gap: 8px;
}

.action-btn i {
    font-size: 14px;
}

.action-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #c49b7d);
    color: white;
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #8d6a4e, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(164, 124, 92, 0.3);
}

.action-btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.action-btn-secondary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #5a3228;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.section-title {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* 分类网格 - 紧凑版（两行布局）*/
.category-grid-fixed {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.category-card-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: var(--bg-white);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    background-color: #f8f0d9;
}

.category-card-compact i {
    font-size: 18px;
    color: #a47c5c;
    flex-shrink: 0;
}

.category-card-compact span {
    color: #333;
    font-weight: 500;
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 30px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.scroll-left {
    left: -60px;
}

.scroll-right {
    right: -60px;
}

.scroll-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 常规偏方推荐区（免费板块） */
.free-recipes-section {
    background-color: #f8f0d9;
    padding: 40px 0;
    margin: 40px 0;
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.more-link:hover {
    color: var(--secondary-color);
}

.more-link i {
    font-size: 12px;
}

.free-recipes-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.free-recipe-item {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.free-recipe-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.recipe-info {
    flex: 1;
}

.free-badge-small {
    display: inline-block;
    padding: 3px 10px;
    background-color: #a47c5c;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
}

.recipe-info h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.recipe-info p {
    font-size: 13px;
    color: var(--text-light);
}

.recipe-stats-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 12px;
    color: var(--text-lighter);
    margin-left: 20px;
}

.recipe-stats-compact i {
    margin-right: 5px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 16px;
    margin-top: 10px;
}

.free-recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.disease-category-block {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.category-block-title {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-block-title i {
    color: var(--primary-color);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.recipe-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.recipe-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.free-badge {
    background-color: #a47c5c;
}

.recipe-title {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.recipe-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-lighter);
    margin-bottom: 15px;
}

.recipe-meta i {
    margin-right: 5px;
}

.btn-expand {
    margin: 0 auto;
    display: block;
}

/* 常见偏方 - 紧凑版 */
.free-recipes-section-compact {
    margin: 20px 0;
    background-color: #f8f0d9;
    padding: 25px 0;
}

.free-recipes-compact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.free-recipe-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.free-recipe-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.badge-mini {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-mini.free {
    background-color: #52c41a;
    color: white;
}

.badge-mini.paid {
    background-color: #a47c5c;
    color: white;
}

.badge-mini.urgent {
    background-color: #ff4d4f;
    color: white;
}

.badge-mini.normal {
    background-color: #1890ff;
    color: white;
}

.recipe-title-mini {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-meta-mini {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

.recipe-meta-mini i {
    margin-right: 3px;
}

/* 主内容区 - 三列布局 */
.main-content-section {
    margin: 20px 0;
}

.content-three-column-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 280px;
    gap: 20px;
    width: 100%;
}

.content-column-left,
.content-column-middle {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 0;
    overflow: hidden;
}

/* 右侧广告栏 - 紧凑版 */
.sidebar-ads-compact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-ad-compact {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.sidebar-ad-compact img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 12px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.content-header h3 {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: bold;
}

.content-header h3 i {
    margin-right: 8px;
    color: #a47c5c;
}

.more-link-small {
    font-size: 14px;
    color: #a47c5c;
    text-decoration: none;
    transition: all 0.3s;
}

.more-link-small:hover {
    color: #8d6a4f;
}

.more-link-small i {
    font-size: 12px;
    margin-left: 3px;
}

/* 超紧凑列表 - 单行链接形式 */
.list-ultra-compact {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.list-item-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.list-item-link:last-child {
    border-bottom: none;
}

.list-item-link:hover {
    background-color: #f8f0d9;
}

.badge-micro {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-micro.free {
    background-color: #52c41a;
    color: white;
}

.badge-micro.paid {
    background-color: #a47c5c;
    color: white;
}

.badge-micro.urgent {
    background-color: #ff4d4f;
    color: white;
}

.badge-micro.normal {
    background-color: #1890ff;
    color: white;
}

.badge-micro.vip {
    background: linear-gradient(135deg, #d4af37, #ffed4e);
    color: #6e3f34;
    font-weight: 600;
    padding: 2px 8px;
}

.badge-micro.top {
    background-color: #ff4757;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.item-title {
    flex: 1;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 300px;
}

.item-info {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
    max-width: 150px;
}

.item-stat {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-stat i {
    margin-right: 2px;
}

/* 旧的tab样式保留以防其他页面使用 */
.content-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 15px 30px;
    background-color: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    color: var(--text-dark);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-btn i {
    margin-right: 8px;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.content-main {
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h3 {
    font-size: 20px;
    color: var(--text-dark);
}

/* 需求列表 */
.demands-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.demand-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.demand-card:hover {
    box-shadow: var(--shadow-hover);
}

.demand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.demand-title {
    font-size: 18px;
    color: var(--text-dark);
}

.demand-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: white;
}

.demand-status.urgent {
    background-color: var(--danger-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.demand-content {
    margin-bottom: 15px;
}

.demand-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-light);
}

.demand-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-lighter);
}

.demand-meta i {
    margin-right: 5px;
}

/* 偏方列表 */
.recipes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recipe-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.recipe-item:hover {
    box-shadow: var(--shadow-hover);
}

.recipe-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.recipe-item-title {
    font-size: 18px;
    color: var(--text-dark);
}

.recipe-price-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: #a47c5c;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.recipe-item-content {
    margin-bottom: 15px;
}

.recipe-item-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-light);
}

.recipe-item-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-lighter);
}

.recipe-item-meta i {
    margin-right: 5px;
}

/* 侧边栏广告 */
.sidebar-ads {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-ad {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    position: relative;
}

.sidebar-ad img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.page-info {
    color: var(--text-light);
}

/* 代办服务入口 */
.agent-service-section {
    margin: 20px 0;
}

.agent-card {
    background: linear-gradient(135deg, #a47c5c, #6e3f34);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: var(--shadow-hover);
}

.agent-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.agent-content {
    flex: 1;
    color: white;
}

.agent-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.agent-content p {
    font-size: 16px;
    opacity: 0.9;
}

/* 合作药企广告区 */
.partner-ad-section {
    margin: 20px 0;
}

.partner-ad-wrapper {
    background-color: #f8f0d9;
    padding: 25px 0;
}

.partner-title {
    font-size: 24px;
    color: var(--text-dark);
    font-weight: bold;
    position: relative;
    margin-bottom: 25px;
}



.partner-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.partner-ad-item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(110,63,52,0.1);
    transition: all 0.3s;
    height: 120px;
    background-color: white;
}

.partner-ad-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(110,63,52,0.15);
}

.partner-ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 页脚 */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-col a:hover {
    color: white;
}

.footer-col i {
    margin-right: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-lighter);
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 30px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input {
    cursor: pointer;
}

.float-right {
    float: right;
    color: var(--primary-color);
    text-decoration: none;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .section-header-with-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .free-recipes-compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-three-column-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar-ads-compact {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar-ads {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .free-recipes-list {
        grid-template-columns: 1fr;
    }
    
    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机端菜单按钮 - 默认隐藏 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    color: #a47c5c;
}

@media (max-width: 768px) {
    /* 显示手机端菜单按钮 */
    .mobile-menu-btn {
        display: block;
        order: 2;
        margin-left: auto;
    }

    /* 隐藏桌面端导航菜单 */
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        flex-direction: column;
        padding: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    /* 展开状态的菜单 */
    .nav-menu.mobile-open {
        display: flex;
    }

    /* 手机端菜单项样式 */
    .nav-menu .nav-link {
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
        width: 100%;
        margin: 0;
        border-radius: 0;
        font-size: 16px;
    }

    .nav-menu .nav-link:hover {
        background: #f8f0d9;
    }

    .nav-menu .nav-link.active {
        background: linear-gradient(135deg, #fff9f0, #ffffff);
        border-left: 4px solid #a47c5c;
    }

    /* 调整导航容器布局 */
    .nav-wrapper {
        display: flex;
        align-items: center;
    }

    .logo {
        order: 1;
    }

    .user-area {
        order: 3;
        margin-left: 12px;
    }

    /* 调整用户区域按钮大小 */
    .auth-buttons {
        gap: 8px;
    }

    .auth-buttons .btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .user-btn {
        font-size: 14px;
        padding: 6px 10px;
    }

    .user-btn span {
        display: none;
    }
    
    .banner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .banner-ad-item {
        height: 120px;
    }
    
    .quick-actions {
        flex-direction: row;
        width: 100%;
        gap: 10px;
    }
    
    .quick-actions .btn,
    .quick-actions .action-btn {
        flex: 1;
        font-size: 13px;
        padding: 10px 8px;
    }
    
    .free-recipes-compact-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .free-recipe-compact {
        padding: 10px;
    }
    
    .sidebar-ads-compact {
        grid-template-columns: 1fr;
    }
    
    .list-item-link {
        padding: 10px 8px;
        gap: 6px;
    }
    
    .item-info {
        display: none;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .free-recipe-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recipe-stats-compact {
        flex-direction: row;
        align-items: center;
        margin-left: 0;
        margin-top: 10px;
        gap: 15px;
    }
    
    .sidebar-ads {
        grid-template-columns: 1fr;
    }
    
    .agent-card {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .category-grid-fixed {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .partner-ad-item {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }
    
    .nav-wrapper {
        height: 60px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .category-grid-fixed {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .category-card-compact {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .category-card-compact i {
        font-size: 16px;
    }
    
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .banner-ad-item {
        height: 100px;
    }
    
    .partner-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .partner-ad-item {
        height: 80px;
    }
    
    .partner-title {
        font-size: 20px;
    }
}

