/* Mobile Styles - 移动端全面优化 */
@media (max-width: 768px) {
    /* 移动端导航优化 */
    .mobile-nav-toggle {
        display: flex;
        padding: 8px;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }
    
    .mobile-nav-toggle:hover {
        background-color: #f8f9fa;
    }
    
    .mobile-nav-toggle span {
        width: 22px;
        height: 2px;
        background: #333;
        margin: 2px 0;
        transition: 0.3s;
        border-radius: 1px;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        border-radius: 0;
        margin-top: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        padding: 16px 20px;
        font-size: 1.1rem;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        transition: all 0.3s ease;
        border-radius: 0;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        color: #ffd700;
        background: #f8f9fa;
    }
    
    /* 移动端下拉菜单优化 */
    .dropdown {
        width: 100%;
        display: block;
    }
    
    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        font-size: 1.1rem;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
        background: transparent;
        transition: all 0.3s ease;
        border-radius: 0;
    }
    
    .dropdown-toggle:hover {
        background: #f8f9fa;
        color: #ffd700;
    }
    
    .dropdown-toggle::after {
        content: '▼';
        font-size: 0.9rem;
        transition: transform 0.3s ease;
        color: #666;
        margin-left: 8px;
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: '▲';
        transform: rotate(180deg);
        color: #ffd700;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        transform: none;
        background: #f8f9fa;
        border: none;
        box-shadow: none;
        min-width: auto;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        display: block;
        pointer-events: none;
        border-radius: 0;
    }
    
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        overflow: visible;
        pointer-events: auto;
    }
    
    .dropdown-menu li {
        border-bottom: 1px solid #e9ecef;
    }
    
    .dropdown-menu li:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu a {
        padding: 14px 20px 14px 40px;
        font-size: 1rem;
        font-weight: 500;
        color: #555;
        border-bottom: none;
        background: transparent;
        margin: 0;
        border-radius: 0;
        transition: all 0.3s ease;
    }
    
    .dropdown-menu a:hover {
        background: #e9ecef;
        color: #ffd700;
    }
    
    /* 移动端footer优化 */
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer {
        padding: 30px 0;
        margin-top: 40px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    /* 移动端食物生成器优化 */
    .generator-section {
        padding: 30px 15px;
        margin-bottom: 0;
        border-radius: 0 !important; /* 确保移动端也没有圆角 */
    }
    
    .generator-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .generator-description {
        font-size: 1rem;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .controls-section {
        max-width: 100%;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .control-group {
        gap: 6px;
    }
    
    .control-label {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }
    
    .control-select {
        padding: 14px 16px;
        font-size: 1rem;
        padding-right: 40px;
    }
    
    .generate-btn {
        padding: 16px 30px;
        font-size: 1.1rem;
        margin: 15px 0;
        border-radius: 10px;
    }
    
    /* 移动端食物结果卡片优化 */
    .food-result-card {
        padding: 20px 15px;
        margin: 15px 0;
        border-radius: 12px;
        border-width: 2px;
    }
    
    .food-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .food-name-result {
        font-size: 1.6rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .food-tags {
        gap: 8px;
        margin-bottom: 12px;
        justify-content: center;
    }
    
    .food-tag {
        padding: 5px 10px;
        font-size: 0.8rem;
        border-radius: 15px;
    }
    
    .food-details {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }
    
    .detail-section {
        padding: 15px;
        border-radius: 10px;
    }
    
    .detail-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .ingredients-list li {
        padding: 6px 0;
        font-size: 0.9rem;
    }
    
    .nutrition-grid {
        gap: 6px;
    }
    
    .nutrition-item {
        padding: 6px 0;
    }
    
    .nutrition-label {
        font-size: 0.85rem;
    }
    
    .nutrition-value {
        font-size: 0.85rem;
    }
    
    /* 移动端内容区域优化 */
    .content-section {
        padding: 40px 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .section-content {
        max-width: 100%;
    }
    
    .section-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    /* 移动端How to Use区域优化 */
    .content-section.gray .section-content > div {
        flex-direction: column;
        gap: 25px;
        margin-top: 25px;
    }
    
    .content-section.gray .section-content > div > div:first-child {
        order: 1;
    }
    
    .content-section.gray .section-content > div > div:last-child {
        order: 2;
    }
    
    .content-section.gray .section-content img {
        width: 100%;
        height: auto;
        max-width: 350px;
        margin: 0 auto;
        display: block;
    }
    
    /* 移动端Key Features区域优化 */
    .content-section .section-content > div {
        flex-direction: column;
        gap: 25px;
        margin-bottom: 40px;
    }
    
    /* 确保所有feature的文字在上，图片在下 */
    .content-section .section-content > div > div:first-child {
        order: 1 !important;
    }
    
    .content-section .section-content > div > div:last-child {
        order: 2 !important;
    }
    
    /* 针对每个feature的具体布局 - 强制文字在上，图片在下 */
    .content-section .section-content > div:nth-child(1) > div:first-child,
    .content-section .section-content > div:nth-child(2) > div:first-child,
    .content-section .section-content > div:nth-child(3) > div:first-child,
    .content-section .section-content > div:nth-child(4) > div:first-child {
        order: 1 !important;
    }
    
    .content-section .section-content > div:nth-child(1) > div:last-child,
    .content-section .section-content > div:nth-child(2) > div:last-child,
    .content-section .section-content > div:nth-child(3) > div:last-child,
    .content-section .section-content > div:nth-child(4) > div:last-child {
        order: 2 !important;
    }
    
    /* 特别针对第一个feature（600 Curated Meal Ideas）确保文字在上 */
    .content-section .section-content > div:first-child > div:first-child {
        order: 1 !important;
    }
    
    .content-section .section-content > div:first-child > div:last-child {
        order: 2 !important;
    }
    
    /* 更具体的选择器，确保第一个feature的文字容器在上 */
    .content-section .section-content > div:first-child > div:nth-child(2) {
        order: 1 !important;
    }
    
    .content-section .section-content > div:first-child > div:nth-child(1) {
        order: 2 !important;
    }
    
    /* 确保第三个feature（Accurate Nutrition Information）的文字在上，图片在下 */
    .content-section .section-content > div:nth-child(3) > div:nth-child(2) {
        order: 1 !important;
    }
    
    .content-section .section-content > div:nth-child(3) > div:nth-child(1) {
        order: 2 !important;
    }
    
    .content-section .section-content img {
        width: 100%;
        height: auto;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    .content-section .section-content h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .content-section .section-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* 移动端FAQ区域优化 */
    .faq-section {
        padding: 40px 15px;
    }
    
    .faq-list {
        max-width: 100%;
    }
    
    .faq-question {
        padding: 16px 20px;
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .faq-answer {
        padding: 0 20px 16px 20px;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* 移动端CTA区域优化 */
    .cta-section {
        padding: 40px 15px;
    }
    
    .cta-section .section-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .cta-section p {
        font-size: 1rem;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .cta-section .generate-btn {
        padding: 16px 35px;
        font-size: 1.1rem;
    }
} 