/* 家厨助手 - 自定义样式补充 */
/* 黑白极简风格：白底#FFFFFF，主文字#111111，点缀色橙色#FF6B35 */

/* 全局样式 */
body {
    background-color: #FFFFFF;
    color: #111111;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 大圆角卡片样式 */
.rounded-2xl {
    border-radius: 16px;
}

/* 自定义按钮样式 */
.btn-primary {
    background-color: #111111;
    color: white;
    font-weight: 600;
    border-radius: 16px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-brand {
    background-color: #FF6B35;
    color: white;
    font-weight: 500;
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-brand:hover {
    background-color: #FF5722;
}

/* 输入框样式 */
.input-field {
    background-color: #F8F8F8;
    border-radius: 16px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    background-color: white;
    border-color: #FF6B35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

/* 卡片样式 */
.card {
    background-color: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #F0F0F0;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card:active {
    transform: scale(0.98);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #F8F8F8;
    color: #888888;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-top: 1px solid #F0F0F0;
    z-index: 50;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item.active .nav-text {
    color: #FF6B35;
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #CCCCCC;
    margin-top: 0.25rem;
}

/* 页面容器 */
.page-container {
    max-width: 375px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 72px;  /* 与底部导航栏实际高度一致，精确遮罩nav高度 */
}

/* 顶部信息栏 */
.top-bar {
    position: sticky;
    top: 0;
    background-color: #FFFFFF;
    z-index: 10;
    border-bottom: 1px solid #F0F0F0;
    padding: 1.25rem 1.5rem;
}

.user-avatar {
    width: 3rem;
    height: 3rem;
    background-color: #E8E8E8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
}

/* 页签样式 */
.tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    color: #888888;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab.active {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
}

/* 菜谱卡片 */
.recipe-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-card.selected {
    border-color: #FF6B35 !important;
}

/* 购物清单项 */
.shopping-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    transition: all 0.2s ease;
}

.shopping-item.bought {
    opacity: 0.5;
}

.shopping-item .checkbox {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #D0D0D0;
    border-radius: 50%;
    background-color: white;
    margin-right: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.shopping-item .checkbox.checked {
    background-color: #FF6B35;
    border-color: #FF6B35;
}

.shopping-item .checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
}

/* 分工卡片 */
.chore-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #F0F0F0;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.chore-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50;
}

.modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 1.5rem 1.5rem 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal-content.show {
    transform: translateY(0);
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #F0F0F0;
    display: flex;
    gap: 1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111111;
    margin-bottom: 0.5rem;
}

/* 食材行样式 */
.ingredient-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ingredient-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #F8F8F8;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.ingredient-input:focus {
    outline: none;
    background-color: white;
    border-color: #FF6B35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.remove-ingredient {
    padding: 0.75rem;
    color: #888888;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.remove-ingredient:hover {
    color: #111111;
    background-color: #F0F0F0;
}

/* 按钮样式 */
.btn-add {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background-color: #F8F8F8;
    color: #888888;
    font-weight: 500;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background-color: #E8E8E8;
    color: #111111;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111111;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.notification.show {
    opacity: 1;
}

/* AI加载样式 */
.ai-loading {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FF6B35;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-loading.show {
    opacity: 1;
}

.ai-loading .spinner {
    animation: spin 1s linear infinite;
}

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

/* 图片上传样式 */
.image-upload {
    width: 100%;
    padding: 0.75rem;
    background-color: #F8F8F8;
    border: 2px dashed #D0D0D0;
    border-radius: 16px;
    font-size: 1rem;
    color: #888888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-upload:hover {
    border-color: #B0B0B0;
    background-color: #E8E8E8;
}

.image-preview {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .page-container {
        padding: 1rem;
    }

    .bottom-nav {
        max-width: 100%;
    }
}

/* 空状态样式 */
.empty-state {

/* 菜谱卡片 */
.recipe-card {
    background: white;
    border: 1px solid #F0F0F0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.recipe-card-content {
    padding-right: 40px;
}

.menu-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 20px;
    color: #CCC;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.menu-btn:hover {
    background: #F5F5F5;
    color: #888;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 44px;
    right: 12px;
    background: white;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 100;
    min-width: 100px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 0;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state .empty-text {
    font-size: 1.125rem;
    color: #888888;
    margin-bottom: 2rem;
}