/* 主样式文件 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    font-weight: bold;
}

/* 菜单项样式 */
.menu-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    transition: background-color 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 0 -15px;
}

.dish-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.dish-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
}

.dish-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.dish-tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 3px;
}

.tag-spicy {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.tag-vegetarian {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.tag-recommended {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.tag-hot {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

/* 菜品图片样式 */
.dish-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    float: left;
}

.dish-info {
    overflow: hidden;
}

/* 可点击的菜品名称样式 */
.dish-name-clickable {
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.dish-name-clickable:hover {
    color: #007bff;
    text-decoration: underline;
}

.dish-name-clickable:active {
    transform: translateY(1px);
}

/* 图片悬浮框样式 */
.dish-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dish-image-modal.show {
    opacity: 1;
}

.dish-image-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.dish-image-modal.show .dish-image-content {
    transform: scale(1);
}

.dish-image-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.dish-image-close:hover {
    color: #000;
}

.dish-image-title {
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    font-weight: bold;
}

.dish-image-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

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

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 评价系统样式 */
.rating {
    color: #ffc107;
    font-size: 1.2rem;
}

.rating .fa-star {
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating .fa-star:hover {
    color: #ff9800;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-author {
    font-weight: bold;
    color: #333;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-content {
    margin-top: 8px;
    color: #555;
}

/* 建议箱样式 */
#suggestion-form {
    max-width: 600px;
}

/* 日期选择器样式 */
#datePicker {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 10px;
    font-size: 1.1rem;
}

#datePicker:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .dish-image {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .menu-item {
        padding: 10px 0;
    }
    
    .btn-group .btn {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .dish-name {
        font-size: 1rem;
    }
    
    .dish-price {
        font-size: 1rem;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

/* 成功/错误提示样式 */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

footer h6 {
    color: #ffc107;
    margin-bottom: 15px;
}

footer p {
    margin-bottom: 5px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
