/* MerryCook Main CSS File */
/* 导入外部库 */
@import url('./tailwind.min.css');
@import url('./fontawesome.min.css');

/* 导入项目特定样式 */
@import url('./shared-styles.css');
@import url('./ui-common.css');
@import url('./page-components.css'); /* 通用页面组件样式 */
@import url('./splash.css');
@import url('./login.css');
@import url('./forgot-password.css');
@import url('./home.css');
@import url('./register.css');
@import url('./settings.css');
@import url('./ingredient-recognition.css'); /* 食材识别页面样式 */
@import url('./recipe-generation.css'); /* 菜谱生成页面样式 */
@import url('./index.css'); /* 移到最后，确保index页面样式优先级最高 */

/* 全局样式 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* 隐藏横向滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; /* 隐藏横向滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

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

/* 通用工具类 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.transition-all {
    transition: all 0.3s ease;
}

/* 加载动画 */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

/* Additional utility styles */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

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

.language-option {
    transition: all 0.3s ease;
}

.language-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}

.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 8px;
    right: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 12px 20px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 通用通知弹窗样式 */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

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

.notification-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    margin: 0 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.3s ease-out;
}

.notification-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.notification-icon.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.notification-icon.info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.notification-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.notification-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.notification-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.notification-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.notification-btn.primary {
    background: rgba(59, 130, 246, 0.8);
    color: white;
}

.notification-btn.primary:hover {
    background: rgba(59, 130, 246, 1);
    transform: translateY(-1px);
}

.notification-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.notification-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

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

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

/* 全局固定布局样式 */
/* 固定头部导航栏 */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: inherit;
    backdrop-filter: blur(10px);
}

/* 主内容区域间距调整 */
.main-content {
    padding-top: 120px; /* 为固定头部留出空间 */
    padding-bottom: 100px; /* 为固定底部导航留出空间 */
    min-height: calc(100vh - 220px);
}

/* 状态栏固定样式 */
.status-bar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    background: transparent; /* 改为透明背景 */
    backdrop-filter: blur(10px);
}

/* 页面头部固定样式 */
.page-header.fixed {
    position: fixed;
    top: 36px; /* 进一步减少top值，让头部更贴近状态栏 */
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent; /* 改为透明背景 */
    backdrop-filter: blur(10px);
    padding: 6px 20px; /* 进一步减少内边距 */
}

/* 底部导航栏优化 */
.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 8px;
    right: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 12px 20px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 内容区域滚动优化 */
.content-area {
    padding-top: 120px;
    padding-bottom: 100px;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content-area::-webkit-scrollbar {
    display: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .main-content {
        padding-top: 110px;
        padding-bottom: 90px;
    }
    
    .content-area {
        padding-top: 110px;
        padding-bottom: 90px;
    }
    
    .page-header.fixed {
        padding: 4px 16px; /* 移动端进一步减少内边距 */
        top: 40px; /* 移动端也减少top值 */
    }
}

/* 全局滚动条隐藏样式 */
/* 隐藏所有滚动条但保持滚动功能 */
html {
    overflow-x: hidden; /* 隐藏横向滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    overflow-x: hidden; /* 隐藏横向滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.screen {
    overflow-y: auto; /* 允许纵向滚动 */
    overflow-x: hidden; /* 隐藏横向滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.screen::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 确保内容区域也隐藏滚动条 */
.content-area {
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content-area::-webkit-scrollbar {
    display: none;
}

/* 分类标签滚动区域隐藏滚动条 */
.overflow-x-auto {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.overflow-x-auto::-webkit-scrollbar {
    display: none;
}

/* Community页面专用样式 */
.community-content {
    padding-top: 105px; /* 重新计算正确的顶部间距：状态栏44px + 页面头部30px + 分类标签25px + 安全间距6px */
    padding-bottom: 80px; /* 减少底部间距，避免过多空白 */
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.community-content::-webkit-scrollbar {
    display: none;
}

/* 移动端优化 - Community页面 */
@media (max-width: 768px) {
    .community-content {
        padding-top: 120px; /* 移动端稍微减少间距 */
        padding-bottom: 10px; /* 移动端减少底部间距 */
    }
} 