/* =====================================================
   东北菜菜谱网站 - 前端样式
   ===================================================== */

:root {
    --red: #c0392b;
    --red-light: #e74c3c;
    --red-dark: #96281b;
    --gold: #d4a017;
    --gold-light: #f0c75e;
    --bg: #fefcf8;
    --bg-warm: #fdf6ee;
    --card-bg: #ffffff;
    --text: #2c2c2c;
    --text-secondary: #666;
    --text-light: #999;
    --border: #eee;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

img { max-width: 100%; display: block; }

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--red);
}

.navbar-brand .brand-icon {
    font-size: 30px;
}

.navbar-brand .brand-text {
    letter-spacing: 2px;
}

.navbar-nav {
    display: flex;
    gap: 6px;
    list-style: none;
}

.navbar-nav a {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: var(--red);
    color: #fff;
}

/* 移动端菜单（默认隐藏，仅响应式开启） */
.mobile-nav {
    display: none;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* ========== Hero区域 ========== */
.hero {
    padding-top: 100px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1f3d 40%, #4a1942 70%, #1a1a2e 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(192,57,43,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(212,160,23,0.1) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: 8px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 36px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .num {
    font-size: 36px;
    font-weight: 800;
    color: var(--gold-light);
    display: block;
}

.hero-stat .label {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

/* ========== 分类导航 ========== */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-header h2 .highlight {
    color: var(--red);
}

.section-header p {
    color: var(--text-light);
    font-size: 15px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--red);
}

.category-card .cat-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-light);
}

.category-card .cat-count {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 12px;
    background: var(--bg-warm);
    border-radius: 12px;
    font-size: 12px;
    color: var(--red);
}

/* ========== 推荐菜品 ========== */
.featured-section {
    background: var(--bg-warm);
}

.dish-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dish-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.dish-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.dish-card .card-image {
    height: 200px;
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    position: relative;
    overflow: hidden;
}

.dish-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish-card .card-image .card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--red);
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.dish-card .card-image .card-emoji {
    position: absolute;
    bottom: -10px;
    right: 16px;
    font-size: 56px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.dish-card .card-body {
    padding: 18px 20px 22px;
}

.dish-card .card-category {
    font-size: 12px;
    color: var(--red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.dish-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.dish-card .card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.dish-card .card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}

.dish-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 分类菜品页 ========== */
.page-hero {
    padding: 100px 0 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1f3d 100%);
    color: #fff;
    text-align: center;
}

.page-hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-hero p {
    color: rgba(255,255,255,0.6);
    font-size: 15px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb .sep {
    color: #ccc;
}

/* ========== 菜品详情页 ========== */
.dish-detail {
    padding: 30px 0 60px;
}

.dish-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.dish-detail-cover {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    height: 400px;
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
}

.dish-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish-detail-info h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.dish-detail-info .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.dish-meta-list {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-warm);
    border-radius: 10px;
}

.meta-item .meta-icon {
    font-size: 20px;
}

.meta-item .meta-label {
    font-size: 12px;
    color: var(--text-light);
}

.meta-item .meta-value {
    font-size: 14px;
    font-weight: 600;
}

.dish-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* 食材清单 */
.ingredients-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.ingredients-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 14px;
}

.ingredient-item .ing-name {
    font-weight: 500;
}

.ingredient-item .ing-amount {
    color: var(--text-light);
}

/* 制作步骤 */
.steps-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.steps-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}

.step-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--red);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 15px;
    line-height: 1.8;
    padding-top: 6px;
}

/* 小贴士 */
.tips-section {
    background: #fffde7;
    border-radius: var(--radius);
    padding: 24px;
    border-left: 4px solid var(--gold);
    margin-bottom: 30px;
}

.tips-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #e65100;
}

.tips-section p {
    font-size: 14px;
    line-height: 1.8;
    color: #5d4037;
}

/* 相关菜品 */
.related-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ========== 页脚 ========== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.6);
    padding: 40px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col .footer-brand {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    padding: 3px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
    text-align: center;
}

.footer-bottom a {
    color: rgba(255,255,255,0.4);
}

.footer-bottom a:hover {
    color: var(--gold-light);
}

/* ========== 标签云 ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(192,57,43,0.08);
    color: var(--red);
    border-radius: 20px;
    font-size: 13px;
    transition: var(--transition);
    border: 1px solid rgba(192,57,43,0.15);
}

.tag-item:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-1px);
}

.tag-item small {
    opacity: 0.7;
    margin-left: 2px;
}

/* ========== 菜品标签 ========== */
.dish-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dish-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(192,57,43,0.08);
    color: var(--red);
    border-radius: 12px;
    font-size: 12px;
    transition: var(--transition);
}

.dish-tag:hover {
    background: var(--red);
    color: #fff;
}

/* ========== 搜索框 ========== */
.hero-search {
    display: flex;
    max-width: 500px;
    margin: 24px auto 0;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-search input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    font-size: 15px;
    outline: none;
    background: rgba(255,255,255,0.95);
}

.hero-search button {
    padding: 14px 24px;
    background: var(--red);
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search button:hover {
    background: var(--red-dark);
}

/* ========== FAQ ========== */
.faq-section {
    margin-top: 32px;
    padding: 24px;
    background: #fff9f5;
    border-radius: 12px;
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.faq-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0e6df;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-q {
    font-size: 16px;
    font-weight: 600;
    color: var(--red-dark);
    margin-bottom: 8px;
}

.faq-a {
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
}

/* ========== 分页 ========== */
.pagination-wrap {
    margin-top: 32px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.page-btn:hover, .page-btn.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.page-dots {
    padding: 8px 6px;
    color: var(--text-light);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero h1 { font-size: 36px; letter-spacing: 4px; }
    .hero-stats { gap: 24px; }
    .hero-stat .num { font-size: 28px; }

    .menu-toggle { display: block; }
    .navbar-nav:not(.mobile-nav) {
        display: none;
    }
    .mobile-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 999;
    }
    .mobile-nav.show { display: flex; }
    .mobile-nav a { padding: 12px 16px; border-radius: 8px; }

    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .dish-grid { grid-template-columns: 1fr; }
    .dish-detail-header { grid-template-columns: 1fr; }
    .dish-detail-cover { height: 280px; }
    .ingredient-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .not-found { padding-top: 120px; }
    .not-found .nf-emoji { font-size: 56px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-search { flex-direction: column; border-radius: 12px; }
    .hero-search button { border-radius: 0; }
}

/* ========== 加载动画 ========== */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.loading .spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 404 / 空状态 ========== */
.not-found {
    text-align: center;
    padding: 100px 20px 60px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.not-found .nf-emoji {
    font-size: 72px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.not-found h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.not-found p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    line-height: 1.6;
}

.not-found .nf-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.not-found .nf-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--red);
    color: #fff;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.not-found .nf-btn:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.not-found .nf-btn-outline {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid var(--red);
    color: var(--red);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.not-found .nf-btn-outline:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-2px);
}

/* ========== 搜索高亮 ========== */
.search-highlight {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}

/* ========== 返回顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(192,57,43,0.3);
    transition: var(--transition);
    display: none;
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192,57,43,0.4);
}
