/* ===== 清新自然主题 - 配菜网 ===== */
:root {
    /* 主色调 - 清新绿 */
    --primary-50: #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-300: #6ee7b7;
    --primary-400: #34d399;
    --primary-500: #10b981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-800: #065f46;
    
    /* 辅助色 */
    --accent-orange: #f97316;
    --accent-yellow: #fbbf24;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* 动画 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== 基础样式 ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 25%, #f0f9ff 50%, #fffbeb 75%, #fef3c7 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

/* ===== 导航栏 ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--primary-100);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand .icon {
    font-size: 1.75rem;
    -webkit-text-fill-color: initial;
}

/* ===== 导航链接 ===== */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border-radius: var(--radius-full);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition);
    z-index: -1;
}

.nav-link:hover {
    color: var(--primary-600);
}

.nav-link:hover::before {
    opacity: 1;
    transform: scale(1);
}

.nav-link.active {
    color: var(--primary-700);
    font-weight: 600;
}

.nav-link.active::before {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(135deg, var(--primary-200), var(--primary-100));
}

/* 移动端导航 */
.mobile-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--primary-100);
}

.mobile-nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition);
    background: var(--gray-50);
}

.mobile-nav-link:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

/* ===== 卡片 ===== */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all var(--transition);
    overflow: hidden;
}

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

.card-feature {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    border: 1px solid var(--primary-100);
    position: relative;
}

.card-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-500), var(--primary-600));
}

.card-feature:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-glow);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--primary-300);
    color: var(--primary-600);
    background: var(--primary-50);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-300);
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* ===== 输入框 ===== */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition);
    background: white;
    color: var(--gray-800);
}

.input-field::placeholder {
    color: var(--gray-400);
}

.input-field:hover {
    border-color: var(--gray-300);
}

.input-field:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.input-field:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

/* ===== 标签/徽章 ===== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}

.tag-green {
    background: var(--primary-100);
    color: var(--primary-700);
}

.tag-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.tag-orange {
    background: #ffedd5;
    color: #c2410c;
}

.tag-red {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-yellow {
    background: #fef3c7;
    color: #b45309;
}

.tag-removable {
    cursor: pointer;
}

.tag-removable:hover {
    background: var(--primary-200);
}

.tag-removable .remove {
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.tag-removable:hover .remove {
    opacity: 1;
}

/* ===== 提示框 ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

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

.alert-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-success {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    color: var(--primary-800);
    border: 1px solid var(--primary-200);
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== 步骤指示器 ===== */
.steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: all var(--transition);
}

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.step.active {
    color: var(--primary-600);
}

.step.active .step-number {
    background: var(--primary-500);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-100);
}

.step.completed {
    color: var(--primary-600);
}

.step.completed .step-number {
    background: var(--primary-100);
    color: var(--primary-600);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    max-width: 3rem;
}

/* ===== 加载动画 ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--primary-100);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-dots {
    display: flex;
    gap: 0.25rem;
}

.loading-dots span {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary-400);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ===== 食谱卡片 ===== */
.recipe-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid var(--gray-100);
}

.recipe-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.recipe-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

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

.recipe-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.recipe-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

/* ===== 复选框/单选框美化 ===== */
.checkbox-wrapper,
.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.checkbox-wrapper:hover,
.radio-wrapper:hover {
    background: var(--gray-50);
}

.checkbox-wrapper input,
.radio-wrapper input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-500);
    cursor: pointer;
}

/* ===== 选择卡片 ===== */
.select-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.select-card:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.select-card.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.select-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.select-card-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* ===== 时间线 ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary-500);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-200);
}

/* ===== 浮动操作按钮 ===== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all var(--transition);
    z-index: 50;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* ===== 页脚 ===== */
.footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--primary-100);
    margin-top: auto;
}

/* ===== 动画类 ===== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== 响应式调整 ===== */
@media (max-width: 640px) {
    .card {
        border-radius: var(--radius-md);
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .steps {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== 打印样式 ===== */
@media print {
    .navbar,
    .mobile-nav,
    .fab,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid var(--gray-200) !important;
    }
}
