/* ========== 基础重置和通用样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 导航栏样式 ========== */
.navbar {
    background-color: #2c3e50;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #34495e;
}

.nav-links a.active {
    background-color: #e74c3c;
}

/* ========== 用户中心整体布局 ========== */
.user-center {
    padding: 40px 0;
    min-height: calc(100vh - 150px);
}

.user-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background-color: brown;
    border-radius: 15px;
    color: white;
}

.user-avatar {
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
}

.user-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.user-header p {
    font-size: 18px;
    opacity: 0.9;
}

.user-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-top: 40px;
}

/* ========== 侧边栏样式 ========== */
.user-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-menu {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.user-menu ul {
    list-style: none;
}

.user-menu li {
    margin-bottom: 10px;
}

.user-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.user-menu a:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
}

.user-menu a.active {
    background-color: #e74c3c;
    color: white;
}

.user-stats {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.stat-box:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* ========== 主内容区样式 ========== */
.user-main {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* 标签页样式 */
.user-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.user-tab {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.user-tab:hover {
    color: #e74c3c;
}

.user-tab.active {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

/* 标签页内容 */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 收藏卡片样式 ========== */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.favorite-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.favorite-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.favorite-info {
    padding: 20px;
}

.favorite-info h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.favorite-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 42px;
}

.favorite-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-actions span {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c0392b;
}

/* ========== 账户设置表单 ========== */
.settings-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.settings-form h2 {
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: "Microsoft YaHei", sans-serif;
}

.form-group input:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}

.btn-save, .btn-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Microsoft YaHei", sans-serif;
}

.btn-save {
    background: #e74c3c;
    color: white;
}

.btn-save:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #e9ecef;
}

/* ========== 评论功能样式 ========== */
.comments-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.comment-form-container,
.comments-list-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.comment-form-container h3,
.comments-list-container h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.comment-form select,
.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: "Microsoft YaHei", sans-serif;
    transition: border-color 0.3s ease;
}

.comment-form select:focus,
.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
}

/* 评分星星 */
.rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.star {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.star:hover,
.star.active {
    color: #ffc107;
    transform: scale(1.2);
}

.rating-text {
    margin-left: 15px;
    font-size: 14px;
    color: #666;
}

/* 字符计数器 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.char-count span {
    font-weight: bold;
}

.char-count.warning {
    color: #e74c3c;
}

/* 评论表单按钮 */
.comment-form .form-actions {
    margin-top: 25px;
}

.btn-submit,
.btn-reset {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit {
    background: #e74c3c;
    color: white;
}

.btn-submit:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-reset {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-reset:hover {
    background: #e9ecef;
}

/* 评论筛选按钮 */
.comments-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e9ecef;
}

.filter-btn.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* 评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 单个评论项 */
.comment-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: #f1f3f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comment-cuisine {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.comment-dish {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.comment-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.comment-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-star {
    color: #ffc107;
    font-size: 14px;
}

.comment-content {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-edit-comment,
.btn-delete-comment {
    background: none;
    border: none;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-edit-comment:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.btn-delete-comment:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* 空评论状态 */
.empty-comments {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-comments i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-comments p:first-of-type {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
}

/* 评论成功提示 */
.comment-success {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

.comment-success.show {
    transform: translateX(0);
    opacity: 1;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .user-content {
        grid-template-columns: 1fr;
    }
    
    .user-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .user-menu, .user-stats {
        flex: 1;
        min-width: 280px;
    }
    
    .comments-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .user-header h1 {
        font-size: 28px;
    }
    
    .user-header p {
        font-size: 16px;
    }
    
    .user-tabs {
        flex-direction: column;
    }
    
    .user-tab {
        text-align: center;
        border-bottom: none;
        border-left: 3px solid transparent;
        border-bottom-color: transparent;
    }
    
    .user-tab.active {
        border-left-color: #e74c3c;
        border-bottom-color: transparent;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group input {
        max-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-save, .btn-cancel {
        width: 100%;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .comments-filter {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .comment-form-container,
    .comments-list-container {
        padding: 20px;
    }
    
    .star {
        font-size: 28px;
    }
    
    .btn-submit,
    .btn-reset {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .comment-success {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

@media (max-width: 576px) {
    .user-header {
        padding: 30px 15px;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .user-main {
        padding: 20px;
    }
    
    .favorite-img {
        height: 160px;
    }
    
    .settings-form {
        padding: 20px;
    }
    
    .logo span {
        font-size: 20px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .comment-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
/* 收藏功能样式补充 */
.favorites-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.favorites-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e74c3c;
    margin-bottom: 8px;
}

.favorites-count-text {
    color: #666;
    font-size: 14px;
}

.favorites-count-text span {
    font-weight: bold;
    color: #e74c3c;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.favorite-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.favorite-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.favorite-info {
    padding: 20px;
}

.favorite-info h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.favorite-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 42px;
}

.favorite-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cuisine-tag {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.btn-remove-favorite {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove-favorite:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* 空状态样式 */
.empty-favorites {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    grid-column: 1 / -1;
}

.empty-favorites i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #e74c3c;
}

.empty-favorites p {
    margin-bottom: 10px;
    font-size: 16px;
}

.empty-favorites p:first-of-type {
    font-size: 18px;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .favorite-img {
        height: 160px;
    }
}
/* 收藏卡片样式 */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.favorite-cuisine-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.favorite-cuisine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.favorite-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.favorite-cuisine-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.favorite-cuisine-img .cuisine-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.favorite-cuisine-info {
    padding: 20px;
}

.favorite-cuisine-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.favorite-cuisine-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-cuisine-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.favorite-cuisine-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-date {
    font-size: 11px;
    color: #aaa;
}

.favorite-actions {
    padding: 0 20px 20px;
    text-align: center;
}

.btn-remove-favorite {
    background: #f8f9fa;
    color: #e74c3c;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-remove-favorite:hover {
    background: #ffeaea;
    border-color: #e74c3c;
}

.empty-favorites {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-favorites i {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.empty-favorites p {
    color: #999;
    margin: 10px 0;
    font-size: 16px;
}
/* 个人中心欢迎提示样式 */
    .user-center-welcome {
        margin-bottom: 30px;
        padding: 20px;
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        color: white;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(231, 76, 60, 0.2);
    }
    
    .user-center-welcome.guest {
        background: linear-gradient(135deg, #3498db, #2980b9);
    }
    
    .user-center-welcome-content {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .user-center-welcome i {
        font-size: 24px;
        opacity: 0.9;
    }
    
    .user-center-welcome h3 {
        margin: 0 0 5px 0;
        font-size: 18px;
    }
    
    .user-center-welcome p {
        margin: 0;
        font-size: 14px;
        opacity: 0.9;
    }
    
    .user-center-welcome-actions {
        margin-top: 15px;
        display: flex;
        gap: 10px;
    }
    
    .user-center-welcome-btn {
        padding: 8px 16px;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 5px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .user-center-welcome-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }