/* 全局样式 - 现代简洁设计 */
:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-color: #ec4899;
    --secondary-light: #f472b6;
    --accent-color: #10b981;
    --accent-light: #34d399;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #374151;
    --border-light: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* 灰度模式 */
[data-grayscale="true"] {
    filter: grayscale(100%);
    transition: filter var(--transition-normal);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.header-content {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    font-size: 1.6rem;
    -webkit-text-fill-color: var(--primary-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.global-search {
    position: relative;
    width: 300px;
}

.global-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.global-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.settings button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.settings button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 用户中心 */
.user-center {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.user-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.user-btn i {
    font-size: 1.2rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 260px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--primary-gradient);
    color: white;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name-display {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.8rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

/* 食材选择区域 */
.ingredients-selection {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
}

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

.ingredients-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ingredients-title-wrapper i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.ingredients-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.collapse-btn,
.quick-clear-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.collapse-btn:hover,
.quick-clear-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.collapse-btn i {
    font-size: 0.9rem;
}

.quick-clear-btn {
    color: var(--danger-color);
}

.quick-clear-btn:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* 食材选择控制区 */
.ingredients-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ingredients-controls-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.search-clear:hover {
    color: var(--text-primary);
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
}

.search-result-item:hover {
    background: var(--primary-light);
    color: white;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* 已选食材 */
.selected-ingredients {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    flex: 1;
    min-width: 280px;
}

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

.selected-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.selected-count strong {
    color: var(--primary-color);
    font-size: 1rem;
}

.clear-all {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.clear-all:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.selected-ingredients-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 30px;
    max-height: 80px;
    overflow-y: auto;
}

.ingredient-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-gradient);
    color: white;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    animation: slideIn 0.3s ease;
}

.ingredient-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.ingredient-tag .remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    transition: var(--transition-fast);
}

.ingredient-tag .remove:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.2);
}

/* 手动添加食材 */
.manual-ingredient {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 300px;
}

/* 调料控制 */
.seasoning-controls {
    display: flex;
    align-items: center;
}

.add-seasoning-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.add-seasoning-btn:hover {
    background: #db2777;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.manual-input-wrapper {
    position: relative;
    flex: 1;
}

.manual-input-wrapper i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 0.9rem;
}

.manual-ingredient input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.manual-ingredient input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

.add-manual-btn {
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.add-manual-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 食材容器 */
#ingredients-container {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
    transition: var(--transition-normal);
}

#ingredients-container.collapsed {
    max-height: 0;
    overflow: hidden;
    border-color: transparent;
}

/* 食材分类标签页 */
.ingredient-tabs {
    display: flex;
    overflow-x: auto;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.ingredient-tabs::-webkit-scrollbar {
    height: 4px;
}

.ingredient-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.ingredient-tabs::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 2px;
}

.ingredient-tab {
    padding: 0.9rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.ingredient-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transition: var(--transition-fast);
}

.ingredient-tab:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

.ingredient-tab.active {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

.ingredient-tab.active::after {
    width: 60%;
}

.ingredient-tab[data-category="vegetables"]::before { content: '🥬'; }
.ingredient-tab[data-category="meat"]::before { content: '🍖'; }
.ingredient-tab[data-category="seafood"]::before { content: '🦐'; }
.ingredient-tab[data-category="eggs"]::before { content: '🥚'; }
.ingredient-tab[data-category="beans"]::before { content: '🫘'; }
.ingredient-tab[data-category="condiments"]::before { content: '🧂'; }
.ingredient-tab[data-category="staple"]::before { content: '🍚'; }
.ingredient-tab[data-category="western"]::before { content: '🍝'; }
.ingredient-tab[data-category="japanese"]::before { content: '🍣'; }

/* 食材内容区域 */
.ingredients-content {
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
    background: var(--bg-tertiary);
}

.ingredients-content::-webkit-scrollbar {
    width: 8px;
}

.ingredients-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.ingredients-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.tab-content {
    display: none;
    padding: 1.25rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.ingredient-category {
    margin-bottom: 1.25rem;
}

.ingredient-category h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    display: none;
}

.ingredient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ingredient-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    font-weight: 500;
}

.ingredient-item:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.ingredient-item.selected {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.ingredient-item.selected::after {
    content: '✓';
    font-weight: bold;
}

/* 主要内容区域 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 菜系分类标签 */
.cuisine-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.cuisine-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.cuisine-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.cuisine-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* 灰度模式下的激活状态样式 */
[data-grayscale="true"] .cuisine-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.cuisine-tab i {
    font-size: 1rem;
}

/* 欢迎区域 */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f4f8 100%);
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.welcome-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: bounce 2s infinite;
    position: relative;
    overflow: hidden;
}

.welcome-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.feature-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.welcome-cta {
    margin-top: 1.5rem;
}

.cta-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button:active {
    transform: translateY(0);
}

.welcome-illustration {
    position: relative;
    width: 300px;
    height: 300px;
    z-index: 1;
}

.illustration-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 3s ease-in-out infinite;
}

.illustration-item {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-md);
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
    border: 3px solid var(--color, var(--primary-color));
}

.illustration-item:nth-child(2) { top: 0; left: 50%; transform: translateX(-50%); }
.illustration-item:nth-child(3) { top: 30%; right: 10%; }
.illustration-item:nth-child(4) { top: 70%; left: 20%; }
.illustration-item:nth-child(5) { bottom: 0; left: 50%; transform: translateX(-50%); }
.illustration-item:nth-child(6) { top: 30%; left: 10%; }

/* 筛选栏 */
.filters-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filters {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-label i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.filter-select {
    padding: 0.65rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.view-btn {
    padding: 0.6rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.view-btn:hover {
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 菜谱区域 */
.recipes-section {
    display: none;
}

.recipes-section.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.recipes-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.recipes-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.recipes-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.recipes-count strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.recipes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.recipes-list.list-view {
    grid-template-columns: 1fr;
}

.recipe-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.recipe-card.list-view {
    display: flex;
    flex-direction: row;
}

.recipe-card.list-view .recipe-image {
    width: 200px;
    height: 180px;
    flex-shrink: 0;
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.recipe-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    opacity: 0;
    transition: var(--transition-normal);
}

.recipe-card:hover .recipe-image::before {
    opacity: 1;
}

.recipe-image .recipe-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.recipe-info {
    padding: 1.25rem;
    flex: 1;
}

.recipe-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: var(--transition-fast);
}

.recipe-card:hover .recipe-name {
    color: var(--primary-color);
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.recipe-meta-item i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.recipe-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coverage-container {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

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

.coverage-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.coverage-percent {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.coverage-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.coverage-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.coverage-fill.high { background: linear-gradient(90deg, #10b981, #34d399); }
.coverage-fill.medium { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.coverage-fill.low { background: linear-gradient(90deg, #ef4444, #f87171); }

/* 加载动画 */
.loading-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: var(--secondary-color);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: var(--accent-color);
    animation-duration: 0.6s;
}

.loading-overlay p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 空状态 */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state.show {
    display: flex;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* 菜谱详情弹窗 */
.recipe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.recipe-modal.show {
    display: flex;
}

.recipe-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.recipe-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

.recipe-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.recipe-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.recipe-modal-header {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.recipe-image-large {
    width: 200px;
    height: 180px;
    border-radius: var(--radius-lg);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    flex-shrink: 0;
}

.recipe-modal-title-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recipe-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.recipe-modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.recipe-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recipe-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.recipe-badge.difficulty-easy { background: #10b981; }
.recipe-badge.difficulty-medium { background: #f59e0b; }
.recipe-badge.difficulty-hard { background: #ef4444; }
.recipe-badge.cuisine-chinese { background: #ef4444; }
.recipe-badge.cuisine-western { background: #3b82f6; }
.recipe-badge.cuisine-japanese { background: #8b5cf6; }

.recipe-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.recipe-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.recipe-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.recipe-tab:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.recipe-tab.active {
    background: var(--primary-gradient);
    color: white;
}

.recipe-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.recipe-tab-content.active {
    display: block;
}

/* 食材统计 */
.ingredients-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.stat-have,
.stat-need,
.stat-coverage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.stat-have i { color: #10b981; }
.stat-need i { color: #f59e0b; }
.stat-coverage i { color: var(--primary-color); }

.stat-have span:last-child,
.stat-need span:last-child,
.stat-coverage span:last-child {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.ingredient-item-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border-color);
    transition: var(--transition-fast);
}

.ingredient-item-detail.have {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.ingredient-item-detail.need {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.ingredient-name {
    font-weight: 600;
    color: var(--text-primary);
}

.ingredient-amount {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ingredient-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.have .ingredient-status {
    background: #10b981;
    color: white;
}

.need .ingredient-status {
    background: #f59e0b;
    color: white;
}

/* 烹饪步骤时间线 */
.steps-timeline {
    position: relative;
    padding-left: 2rem;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
    border-radius: 2px;
}

.step-item {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.step-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.step-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 1.25rem;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border: 3px solid var(--bg-secondary);
    border-radius: 50%;
    z-index: 1;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 0.75rem;
}

.step-content {
    display: inline;
    color: var(--text-primary);
    line-height: 1.7;
}

.step-tip {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary-color);
    font-style: italic;
}

/* 小贴士 */
.tips-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.tips-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 营养信息 */
.nutrition-info {
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.nutrition-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.nutrition-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.nutrition-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nutrition-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 弹窗底部 */
.recipe-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.recipe-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.recipe-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.recipe-action-btn.favorited {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* 吐司提示 */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.warning { border-left: 4px solid #f59e0b; }
.toast.info { border-left: 4px solid #3b82f6; }

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast.info .toast-icon { color: #3b82f6; }

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* 登录/注册模态框 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-modal.show {
    display: flex;
}

.auth-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    animation: slideUp 0.4s ease;
}

.auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.auth-close:hover {
    background: var(--danger-color);
    color: white;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}

.remember-me,
.agree-terms {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input,
.agree-terms input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.social-login {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.wechat:hover {
    background: #07c160;
    border-color: #07c160;
    color: white;
}

.social-btn.qq:hover {
    background: #12b7f5;
    border-color: #12b7f5;
    color: white;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 个人中心模态框 */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.profile-modal.show {
    display: flex;
}

.profile-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

.profile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
}

.profile-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.profile-header {
    position: relative;
}

.profile-cover {
    height: 150px;
    background: var(--primary-gradient);
}

.profile-avatar-section {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    padding: 0 2rem 1.5rem;
    margin-top: -50px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--bg-secondary);
    border: 4px solid var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.profile-user-info {
    flex: 1;
    padding-bottom: 0.5rem;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.profile-email {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.profile-tab:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.profile-tab.active {
    background: var(--primary-gradient);
    color: white;
}

.profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.profile-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.profile-panel.active {
    display: block;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.setting-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    min-width: 200px;
}

.setting-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.toggle-setting {
    padding: 0.85rem 0;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition-fast);
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--primary-gradient);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.save-settings-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: var(--transition-fast);
}

.save-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.danger-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--danger-color);
}

.danger-section h3 {
    color: var(--danger-color);
}

.danger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.danger-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* 页脚 */
.footer-content {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.footer-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.footer-logo i {
    font-size: 1.5rem;
    -webkit-text-fill-color: var(--primary-color);
}

.footer-slogan {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-toggle {
    cursor: pointer;
    transition: var(--transition-fast);
}

.about-toggle:hover h4 {
    color: var(--primary-color);
}

.about-toggle h4 i {
    transition: var(--transition-fast);
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.about-toggle.active h4 i {
    transform: rotate(180deg);
}

.about-content {
    max-width: 400px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.about-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.about-content p.lang-zh {
    text-align: justify;
}

.about-content p.lang-en {
    text-align: justify;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.35rem 0;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.page-views-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.page-views-container i {
    font-size: 1rem;
}

.page-views-count {
    font-weight: 700;
    font-size: 1rem;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}



/* 添加调料模态框 */
.seasoning-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.seasoning-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.seasoning-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.seasoning-close:hover, .seasoning-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.seasoning-header {
    text-align: center;
    padding: 30px 20px 20px;
    border-bottom: 1px solid #eee;
}

.seasoning-logo {
    font-size: 40px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.seasoning-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.seasoning-form {
    padding: 20px;
}

.seasoning-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.seasoning-btn:hover {
    background-color: #45a049;
}

/* 用户添加的调料样式 */
.ingredient-item.user-added {
    position: relative;
    background-color: #f0fff0;
    border-left: 3px solid #4CAF50;
}

.ingredient-item.user-added::after {
    content: '✓';
    position: absolute;
    right: 10px;
    color: #4CAF50;
    font-weight: bold;
}

/* 初始化调料模态框 */
.init-seasoning-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.init-seasoning-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.init-seasoning-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.init-seasoning-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.init-seasoning-close:hover {
    background: var(--danger-color);
    color: white;
}

.init-seasoning-header {
    background: var(--primary-gradient);
    padding: 2rem;
    text-align: center;
    color: white;
}

.init-seasoning-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.init-seasoning-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.init-seasoning-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.init-seasoning-form {
    padding: 2rem;
}

.seasoning-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.seasoning-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.seasoning-checkbox-item:hover {
    background: var(--primary-light);
    color: white;
}

.seasoning-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.other-seasonings-input {
    margin-top: 1.5rem;
}

.other-seasonings-input input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.other-seasonings-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.remember-seasonings {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-seasonings input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.init-seasoning-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.init-seasoning-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 滚动条样式 */
.seasoning-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.seasoning-checkboxes::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.seasoning-checkboxes::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 3px;
}

.seasoning-checkboxes::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .welcome-section {
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-content {
        max-width: 100%;
    }
    
    .welcome-features {
        justify-content: center;
    }
    
    .welcome-illustration {
        display: none;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .ingredients-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-container,
    .manual-ingredient {
        max-width: 100%;
    }
    
    .selected-ingredients {
        min-width: auto;
        order: -1;
    }
    
    .recipe-modal-header {
        flex-direction: column;
    }
    
    .recipe-image-large {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .global-search {
        width: 100%;
    }
    
    .header-controls {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ingredients-selection {
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .cuisine-tabs {
        justify-content: flex-start;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .view-toggle {
        margin-left: 0;
        justify-content: center;
    }
    
    .recipes-list {
        grid-template-columns: 1fr;
    }
    
    .recipe-card.list-view {
        flex-direction: column;
    }
    
    .recipe-card.list-view .recipe-image {
        width: 100%;
        height: 200px;
    }
    
    .ingredients-stats {
        flex-wrap: wrap;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .welcome-features {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ingredient-tabs {
        padding-bottom: 0.5rem;
    }
    
    .ingredient-tab {
        padding: 0.65rem 0.9rem;
        font-size: 0.8rem;
    }
    
    .recipe-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .auth-modal-content {
        padding: 1.5rem;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-login {
        flex-direction: column;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header-content,
    .ingredients-selection,
    .cuisine-tabs,
    .filters-wrapper,
    .footer-content,
    .recipe-modal-overlay,
    .toast-container {
        display: none !important;
    }
    
    .recipe-modal-content {
        box-shadow: none;
        max-height: none;
    }
    
    .recipe-modal-footer,
    .recipe-tabs {
        display: none;
    }
}
