/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: #e74c3c;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}
.logo a {
    text-decoration: none;
    color: white;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: #f39c12;
}

/* 汉堡菜单样式 - 默认隐藏 */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: white;
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* 食谱分类样式 */
.recipe-categories {
    margin: 2rem 0;
}

.category {
    margin-bottom: 3rem;
}

.category h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 250px), 1fr));
    gap: 2rem;
}

/* 食谱卡片样式 */
.recipe-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.recipe-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.recipe-card-content {
    padding: 1.5rem;
}

.recipe-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.recipe-card .recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: #34495e;
    font-weight: 500;
}

.recipe-card .recipe-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.recipe-card .recipe-difficulty {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-easy {
    background-color: #27ae60;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.difficulty-medium {
    background-color: #e67e22;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.difficulty-hard {
    background-color: #c0392b;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.recipe-card .recipe-ingredients {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #f39c12;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f39c12;
}

.friendly-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.friendly-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.friendly-links a:hover {
    color: #f39c12;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    opacity: 0.8;
}

/* 详情页样式 */
.detail-container {
    padding: 60px 0;
    min-height: 70vh;
}

.recipe-detail {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 3rem;
}

.recipe-header {
    position: relative;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.recipe-detail-image {
    width: 100%;
    max-width: 600px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.recipe-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.recipe-meta-detail {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.meta-icon {
    font-size: 1.2rem;
}

.meta-text {
    font-weight: 500;
}

.difficulty-easy { color: #27ae60; }
.difficulty-medium { color: #f39c12; }
.difficulty-hard { color: #e74c3c; }

/* 内容区域样式 */
.recipe-content {
    padding: 40px;
}

.ingredients-section,
.instructions-section,
.tips-section,
.nutrition-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ingredients-section:hover,
.instructions-section:hover,
.tips-section:hover,
.nutrition-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.ingredients-section h2,
.instructions-section h2,
.tips-section h2,
.nutrition-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
    padding-left: 15px;
}

.ingredients-list {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #27ae60;
}

.instructions-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.tips-content ul {
    list-style: none;
    padding: 0;
}

.tips-content li {
    background: white;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.tips-content li:hover {
    transform: translateX(5px);
}

.tips-content li:before {
    content: "💡 ";
    margin-right: 8px;
}

.nutrition-info {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #9b59b6;
}

.nutrition-info p {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.nutrition-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.nutrition-item:hover {
    transform: translateY(-3px);
}

.nutrition-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.nutrition-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e74c3c;
}

/* 相关食谱 */
.may-like {
    margin-top: 3rem;
}

.may-like h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 0.5rem;
}

/* 联系我们页面样式 */
.contact-container {
    padding: 60px 0;
    min-height: 70vh;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #e74c3c;
}

.contact-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    gap: 50px;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #e74c3c;
}

.info-card p {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.contact-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #c0392b;
}

.info-card address {
    color: #7f8c8d;
    font-style: normal;
    line-height: 1.6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.social-link:hover {
    background: #c0392b;
}

.contact-form-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-form-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #e74c3c;
}

.contact-form-section p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

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

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.submit-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #c0392b;
}

.faq-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #e74c3c;
}

.faq-section p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.faq-item p {
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0;
}

/* 政策页面样式 */
.policy-container {
    padding: 60px 0;
    min-height: 70vh;
}

.policy-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.policy-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.policy-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #e74c3c;
}

.policy-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.policy-intro {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
}

.policy-section {
    margin-bottom: 40px;
}

.policy-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #e74c3c;
}

.policy-section h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.policy-section p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.policy-section ul {
    color: #7f8c8d;
    line-height: 1.6;
    margin-left: 20px;
    margin-bottom: 15px;
}

.policy-section li {
    margin-bottom: 5px;
}

.policy-section a {
    color: #e74c3c;
    text-decoration: none;
}

.policy-section a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 移动端导航栏 */
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #e74c3c;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 移动端英雄区域 */
    .hero {
        padding: 3rem 1rem;
        margin: 1rem;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* 移动端食谱网格 */
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* 移动端分类标题 */
    .category h3 {
        font-size: 1.5rem;
    }

    /* 移动端页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links,
    .friendly-links {
        align-items: center;
    }

    /* 移动端详情页 */
    .recipe-detail {
        padding: 1.5rem;
    }

    .recipe-detail-info h2 {
        font-size: 1.8rem;
    }

    .recipe-detail-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* 联系我们页面响应式 */
    .contact-header h1,
    .policy-header h1 {
        font-size: 2rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-form-section,
    .faq-section {
        padding: 30px 20px;
    }
    
    .policy-content {
        padding: 30px 20px;
    }
    
    .policy-header h1 {
        font-size: 2rem;
    }
    
    .policy-section h2 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .recipe-card-content {
        padding: 1rem;
    }

    .recipe-card h4 {
        font-size: 1.1rem;
    }
    
    /* 联系我们页面响应式 */
    .contact-header h1,
    .policy-header h1 {
        font-size: 1.8rem;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-icon {
        font-size: 2.5rem;
    }
    
    .contact-form-section,
    .faq-section {
        padding: 20px 15px;
    }
    
    .policy-content {
        padding: 20px 15px;
    }
    
    .policy-section h2 {
        font-size: 1.3rem;
    }
    
    .policy-section h3 {
        font-size: 1.1rem;
    }
}

/* 平板设备适配 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}