/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 顶部导航样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d4574e;
    margin-bottom: 10px;
    text-align: center;
}

.nav {
    display: flex;
    justify-content: space-around;
    padding: 5px 0;
}

.nav a {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 15px;
}

.nav a.active {
    color: #d4574e;
    background-color: #fff2f0;
}

/* 搜索区域样式 */
.search-container {
    margin: 150px 15px 20px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1rem;
}

.search-btn {
    padding: 10px 20px;
    background: #d4574e;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
}

/* 美食分类样式 */
.food-categories {
    padding: 20px 15px;
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.category-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.category-item span {
    display: block;
    padding: 10px;
    color: #333;
    font-size: 1rem;
}

/* 推荐美食样式 */
.recommended-foods {
    padding: 20px 15px;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 70px;
}

.food-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.food-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.food-item h3 {
    padding: 10px;
    font-size: 1.1rem;
    color: #333;
}

.food-item p {
    padding: 0 10px 10px;
    color: #666;
    font-size: 0.9rem;
}

/* 底部导航样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.footer-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

.footer-nav a {
    text-decoration: none;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
}

.footer-nav a.active {
    color: #d4574e;
}

.footer-nav .icon {
    font-size: 1.5rem;
    margin-bottom: 3px;
}

/* 分类页面样式 */
.category-page {
    padding: 150px 15px 70px;
}

.category-page h2 {
    text-align: center;
    margin: 20px 0;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-list .category-item {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-list .category-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.category-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 5px;
}

.category-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.view-more {
    align-self: flex-start;
    padding: 5px 15px;
    background: #d4574e;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* 关于页面样式 */
.about-page {
    padding: 120px 15px 70px;
}

.about-page section {
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.about-page h2 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.about-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.about-page p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.team-member h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

.team-member p {
    font-size: 0.9rem;
    color: #666;
}

.contact-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info strong {
    color: #333;
}

/* 联系页面样式 */
.contact-page {
    padding: 120px 15px 70px;
}

.contact-page section {
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: #d4574e;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.contact-item .icon {
    font-size: 1.5rem;
}

.contact-item .info h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

.contact-item .info p {
    font-size: 0.9rem;
    color: #666;
}

.map-container {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

.location-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.social-link {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* 收藏页面样式 */
.favorite-page {
    padding: 120px 15px 70px;
}

.favorite-page h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* 筛选按钮样式 */
.filter-section {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    white-space: nowrap;
    font-size: 0.9rem;
}

.filter-btn.active {
    background: #d4574e;
    color: white;
    border-color: #d4574e;
}

/* 收藏列表样式 */
.favorite-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.favorite-item {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.food-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.food-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.food-info h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.food-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.tags {
    display: flex;
    gap: 8px;
}

.tag {
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-image {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

.browse-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #d4574e;
    color: white;
    text-decoration: none;
    border-radius: 20px;
}

/* 删除确认弹窗样式 */
.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 300px;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 15px;
}

.modal-content p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.confirm-btn {
    background: #d4574e;
    color: white;
}

/* 个人中心页面样式 */
.profile-page {
    padding: 120px 15px 70px;
}

/* 用户信息卡片样式 */
.user-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.user-details h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 5px;
}

.user-details p {
    color: #666;
    font-size: 0.9rem;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.stat-item .label {
    font-size: 0.9rem;
    color: #666;
}

/* 功能列表样式 */
.feature-list {
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item .icon {
    margin-right: 15px;
    font-size: 1.2rem;
}

.feature-item .text {
    flex: 1;
}

.feature-item .arrow {
    color: #999;
    font-size: 1.2rem;
}

/* 浏览历史页面样式 */
.history-page {
    padding: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-header h2 {
    margin: 0;
}

.clear-btn {
    padding: 8px 15px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* 日期分组样式 */
.date-header {
    font-size: 1rem;
    color: #666;
    margin: 20px 0 10px;
    padding-left: 10px;
    border-left: 3px solid #d4574e;
}

/* 历史记录列表样式 */
.history-section {
    margin-bottom: 20px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    gap: 15px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.history-item .food-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
}

.history-item .food-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.history-item h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.history-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.history-item .time {
    font-size: 0.8rem;
    color: #999;
}

.history-item .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

/* 清空确认弹窗样式 */
.clear-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.clear-modal .modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 300px;
}

.clear-modal h3 {
    text-align: center;
    margin-bottom: 15px;
}

.clear-modal p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.clear-modal .modal-buttons {
    display: flex;
    gap: 15px;
}

.clear-modal button {
    flex: 1;
    padding: 10px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.clear-modal .cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.clear-modal .confirm-btn {
    background: #d4574e;
    color: white;
}

/* 空状态样式 */
.history-page .empty-state {
    text-align: center;
    padding: 40px 20px;
}

.history-page .empty-image {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.history-page .empty-state p {
    color: #666;
    margin-bottom: 20px;
}

.history-page .browse-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #d4574e;
    color: white;
    text-decoration: none;
    border-radius: 20px;
}

/* 主内容区域基础样式 */
main {
    padding-top: 120px;
    padding-bottom: 70px;
    padding-left: 15px;
    padding-right: 15px;
}

/* 页面特定样式 */
.settings-page {
    padding: 0;
}

.notifications-page {
    padding: 0;
}

.category-detail-page {
    padding: 0;
} 