/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #136243;
    --primary-light: #1e7e5b;
    --primary-dark: #0d4a33;
    --bg-light: #f5f7fa;
    --text-dark: #1e293b;
    --text-soft: #334155;
    --border-color: #d1d5db;
    --white: #ffffff;
    --gray-icon: #4b5563;
    --footer-bg: #111827;
    --footer-text: #e5e7eb;
    
    --promo-bg: #f8f4e9;
    --promo-border: #e2d9c8;
    --promo-text: #136243;
    --promo-text-hover: #1e7e5b;
    --promo-close: #9b8c78;
    --promo-close-hover: #136243;
    
    --rating-excellent: #34a853;
    --rating-good: #fbbc04;
    --rating-bad: #ea4335;
    
    --like-color: #34a853;
    --dislike-color: #ea4335;
    
    --card-bg: #ffffff;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --vip-badge: #ffcc00;
    --vip-text: #b8860b;
    --closed-overlay: rgba(0, 0, 0, 0.6);
    
    --review-5-bg: #d4edda;
    --review-5-border: #c3e6cb;
    --review-5-text: #155724;
    --review-4-bg: #fff3cd;
    --review-4-border: #ffeeba;
    --review-4-text: #856404;
    --review-3-bg: #fff3cd;
    --review-3-border: #ffeeba;
    --review-3-text: #856404;
    --review-2-bg: #f8d7da;
    --review-2-border: #f5c6cb;
    --review-2-text: #721c24;
    --review-1-bg: #f8d7da;
    --review-1-border: #f5c6cb;
    --review-1-text: #721c24;
    
    --order-btn-bg: var(--primary);
    --order-btn-hover: #1e7e5b;
    --order-btn-text: white;
    
    --toast-bg: #333;
    --toast-text: white;
    
    --vk-color: #4a76a8;
    --tg-color: #0088cc;
    
    --badge-bg: rgba(0, 0, 0, 0.6);
    --badge-blur: blur(8px);
    --badge-text: #ffffff;
}

/* ===== СБРОС СТИЛЕЙ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== ИНФОРМАЦИОННАЯ ПЛАШКА ===== */
.info-banner {
    background-color: var(--promo-bg);
    border-bottom: 2px solid var(--promo-border);
    padding: 8px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-banner.hidden {
    display: none;
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.info-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--promo-text);
    transition: color 0.2s;
    flex: 1;
}

.info-link:hover {
    color: var(--promo-text-hover);
}

.info-icon {
    font-size: 1.3rem;
    line-height: 1;
    min-width: 24px;
    text-align: center;
}

.info-text {
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px dashed currentColor;
}

.info-close {
    background: none;
    border: none;
    color: var(--promo-close);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.info-close:hover {
    color: var(--promo-close-hover);
}

/* ===== ШАПКА ===== */
.header-image {
    width: 100%;
    background-color: var(--primary);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.header-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
    min-height: 120px;
    background-color: var(--primary);
}

/* ===== НАВИГАЦИЯ ===== */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 160px;
}

.back-btn:hover {
    border-color: var(--primary);
    background-color: #f9f9f9;
}

.back-arrow {
    font-size: 1.2rem;
    color: var(--primary);
}

.mini-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.mini-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.mini-menu-item:hover {
    border-color: var(--primary);
    background-color: #f9f9f9;
}

.mini-arrow {
    color: var(--primary);
    font-size: 1rem;
}

/* ===== СЕКЦИЯ С ДОСТАВКОЙ ЕДЫ ===== */
.food-section {
    margin: 30px 0 50px;
}

.food-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    border-left: 6px solid var(--primary);
    padding-left: 16px;
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ===== КАРТОЧКА РЕСТОРАНА ===== */
.restaurant-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

.restaurant-card.excellent {
    border-bottom: 4px solid var(--rating-excellent);
}

.restaurant-card.good {
    border-bottom: 4px solid var(--rating-good);
}

.restaurant-card.bad {
    border-bottom: 4px solid var(--rating-bad);
}

.restaurant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.restaurant-card.disabled {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    cursor: pointer;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.restaurant-card:hover .card-image img {
    transform: scale(1.05);
}

.vip-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--vip-badge);
    color: var(--vip-text);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2;
}

.rating-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    backdrop-filter: var(--badge-blur);
    -webkit-backdrop-filter: var(--badge-blur);
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rating-badge.excellent {
    background-color: rgba(52, 168, 83, 0.8);
    backdrop-filter: var(--badge-blur);
    -webkit-backdrop-filter: var(--badge-blur);
    color: white;
}

.rating-badge.good {
    background-color: rgba(251, 188, 4, 0.8);
    backdrop-filter: var(--badge-blur);
    -webkit-backdrop-filter: var(--badge-blur);
    color: #1e293b;
}

.rating-badge.bad {
    background-color: rgba(234, 67, 53, 0.8);
    backdrop-filter: var(--badge-blur);
    -webkit-backdrop-filter: var(--badge-blur);
    color: white;
}

.delivery-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 30px;
    z-index: 2;
    backdrop-filter: var(--badge-blur);
    -webkit-backdrop-filter: var(--badge-blur);
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.closed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--closed-overlay);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    backdrop-filter: blur(2px);
    z-index: 3;
    cursor: default;
}

.closed-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    filter: brightness(0) invert(1);
}

.closed-text {
    font-size: 0.95rem;
    font-weight: 600;
    background-color: rgba(0,0,0,0.5);
    padding: 6px 14px;
    border-radius: 30px;
}

.card-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.restaurant-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.restaurant-status {
    font-size: 0.8rem;
    color: #dc2626;
}

/* ===== КНОПКИ ГОЛОСОВАНИЯ ===== */
.vote-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.vote-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: var(--white);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn.like {
    color: var(--like-color);
}

.vote-btn.like:hover {
    background-color: var(--like-color);
    border-color: var(--like-color);
    color: white;
}

.vote-btn.dislike {
    color: var(--dislike-color);
}

.vote-btn.dislike:hover {
    background-color: var(--dislike-color);
    border-color: var(--dislike-color);
    color: white;
}

.vote-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.vote-btn:hover svg {
    fill: white;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--toast-bg);
    color: var(--toast-text);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification.error {
    background-color: #dc2626;
}

/* ===== МОДАЛЬНОЕ ОКНО ОТЗЫВОВ ===== */
.reviews-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.reviews-modal.active {
    display: flex;
}

.reviews-modal-content {
    background-color: white;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
}

.reviews-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reviews-modal-header h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary);
}

.close-reviews-modal {
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-icon);
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.close-reviews-modal:hover {
    color: var(--primary);
}

.order-button-container {
    margin: 20px 0 25px;
}

.order-button {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background-color: var(--order-btn-bg);
    color: var(--order-btn-text);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    border-radius: 12px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.order-button:hover {
    background-color: var(--order-btn-hover);
}

/* ===== ФОРМА ДОБАВЛЕНИЯ ОТЗЫВА ===== */
.add-review-form {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
}

.add-review-form h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.review-form-group {
    margin-bottom: 15px;
}

.review-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.review-form-group input,
.review-form-group select,
.review-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--white);
    transition: all 0.2s;
    font-family: inherit;
}

.review-form-group input:focus,
.review-form-group select:focus,
.review-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(19, 98, 67, 0.1);
}

.review-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.review-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.add-review-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.add-review-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 98, 67, 0.2);
}

/* ===== СПИСОК ОТЗЫВОВ ===== */
.reviews-container {
    margin-top: 20px;
}

.review-item-modal {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid;
    position: relative;
}

.review-item-modal.rating-5 {
    background-color: var(--review-5-bg);
    border-color: var(--review-5-border);
}

.review-item-modal.rating-4 {
    background-color: var(--review-4-bg);
    border-color: var(--review-4-border);
}

.review-item-modal.rating-3 {
    background-color: var(--review-4-bg);
    border-color: var(--review-4-border);
}

.review-item-modal.rating-2 {
    background-color: var(--review-2-bg);
    border-color: var(--review-2-border);
}

.review-item-modal.rating-1 {
    background-color: var(--review-2-bg);
    border-color: var(--review-2-border);
}

.review-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    text-decoration: none;
    opacity: 0.8;
}

.review-delete-btn:hover {
    background-color: #dc2626;
    color: white;
    opacity: 1;
    transform: scale(1.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-right: 30px;
}

.review-author {
    font-weight: 600;
    color: var(--text-dark);
}

.review-rating {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.9rem;
}

.rating-5 .review-rating {
    background-color: var(--review-5-bg);
    color: var(--review-5-text);
}

.rating-4 .review-rating {
    background-color: var(--review-4-bg);
    color: var(--review-4-text);
}

.rating-3 .review-rating {
    background-color: var(--review-4-bg);
    color: var(--review-4-text);
}

.rating-2 .review-rating {
    background-color: var(--review-2-bg);
    color: var(--review-2-text);
}

.rating-1 .review-rating {
    background-color: var(--review-2-bg);
    color: var(--review-2-text);
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
    margin-bottom: 8px;
    padding-right: 30px;
}

.no-reviews {
    text-align: center;
    padding: 30px;
    color: var(--text-soft);
    font-style: italic;
}

/* ===== СООБЩЕНИЕ О ЗАКРЫТЫХ ДОСТАВКАХ ===== */
.closed-message-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: 400px;
}

.closed-message {
    max-width: 500px;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.closed-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

.closed-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.closed-message h3 {
    font-size: 2rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.closed-message p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.closed-time {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== ФУТЕР ===== */
footer {
    margin-top: 50px;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 30px;
    border-top: 1px solid #2d3748;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px 40px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
    cursor: pointer;
}

.footer-links a:hover {
    color: white;
    border-bottom-color: var(--primary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 25px 0;
}

.social-icon {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.social-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.footer-note {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    max-width: 800px;
    margin: 20px auto 0;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.8rem;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.close-modal {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-icon);
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.close-modal:hover {
    color: var(--primary);
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.1rem;
    transition: all 0.2s;
}

.modal-link:hover {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.modal-link span {
    font-weight: 500;
}

.external-icon {
    color: var(--primary);
    font-size: 1.2rem;
    opacity: 0.7;
}

/* ===== ЗАГРУЗОЧНЫЙ ЭКРАН ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #136243 0%, #1a7b54 50%, #136243 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 90%;
    padding: 30px;
}

.loading-emoji-container {
    position: relative;
    height: 150px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-emoji {
    position: absolute;
    font-size: 8rem;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease, transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.loading-emoji.active {
    opacity: 1;
    transform: scale(1);
    animation: loadingBounce 1.5s infinite ease-in-out;
}

@keyframes loadingBounce {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-20px); }
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.loading-text-container {
    margin: 30px 0;
    min-height: 100px;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-text {
    position: absolute;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    white-space: nowrap;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    pointer-events: none;
}

.loading-text.active {
    opacity: 1;
}

.loading-progress {
    width: 300px;
    height: 6px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin: 40px auto 0;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background-color: white;
    border-radius: 10px;
    transition: width 0.3s linear;
}

.loading-dots {
    margin-top: 30px;
    font-size: 1.2rem;
}

.loading-dots span {
    animation: dots 1.5s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dots {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.main-content {
    opacity: 0;
    transition: opacity 1s ease;
}

.main-content.visible {
    opacity: 1;
}

/* ===== МЕДИА-ЗАПРОСЫ ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-image img {
        max-height: 180px;
    }
    
    .nav-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .back-btn {
        width: 100%;
        min-width: unset;
        padding: 12px 20px;
    }
    
    .mini-menu {
        justify-content: center;
        width: 100%;
    }
    
    .mini-menu-item {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .food-section h2 {
        font-size: 1.5rem;
    }
    
    .restaurant-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-image {
        height: 160px;
    }
    
    .reviews-modal-content {
        padding: 20px;
    }
    
    .reviews-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .toast-notification {
        font-size: 0.9rem;
        padding: 12px 24px;
        white-space: normal;
        text-align: center;
        width: 90%;
        max-width: 300px;
    }
    
    .loading-title {
        font-size: 1.8rem;
    }
    
    .loading-text {
        font-size: 1.1rem;
        white-space: normal;
        width: 90%;
    }
    
    .loading-emoji-container {
        height: 120px;
    }
    
    .loading-emoji {
        font-size: 6rem;
    }
    
    .loading-progress {
        width: 250px;
    }

    .footer-social {
        gap: 20px;
    }

    .social-icon {
        width: 42px;
        height: 42px;
    }

    .review-form-row {
        grid-template-columns: 1fr;
    }

    .closed-message h3 {
        font-size: 1.5rem;
    }

    .closed-message p {
        font-size: 1rem;
    }

    .closed-time {
        font-size: 1.1rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .restaurant-name {
        font-size: 1.1rem;
    }
    
    .rating-badge, .delivery-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .closed-text {
        font-size: 0.85rem;
        padding: 4px 10px;
    }
    
    .order-button {
        padding: 14px;
        font-size: 1.1rem;
    }
    
    .vote-btn {
        font-size: 0.9rem;
    }
    
    .loading-title {
        font-size: 1.5rem;
    }
    
    .loading-emoji-container {
        height: 100px;
    }
    
    .loading-emoji {
        font-size: 5rem;
    }
    
    .loading-progress {
        width: 200px;
    }
    
    .mini-menu-item {
        font-size: 0.85rem;
        padding: 6px 8px;
    }

    .footer-social {
        gap: 15px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }

    .closed-message {
        padding: 30px 20px;
    }

    .closed-emoji {
        font-size: 4rem;
    }
}
/* ===== СТИЛИ ДЛЯ ЗВЁЗД РЕЙТИНГА ===== */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    margin: 10px 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107;
}

/* Стили для звёзд в отзывах */
.review-stars {
    margin-bottom: 10px;
    display: flex;
    gap: 4px;
}

.review-stars .star {
    font-size: 18px;
    color: #ddd;
}

.review-stars .star.filled {
    color: #ffc107;
}

/* Обновлённые стили для отзывов */
.review-item-modal {
    position: relative;
    padding: 15px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #ffc107;
    transition: all 0.2s;
}

.review-item-modal:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.review-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    text-decoration: none;
}

.review-delete-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: scale(1.1);
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
    padding-right: 35px;
    word-break: break-word;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: var(--text-soft);
    font-style: italic;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* Анимация для кнопок голосования */
.vote-btn {
    transition: all 0.2s;
}

.vote-btn:active {
    transform: scale(0.95);
}

/* Стили для загрузочного состояния кнопок */
.vote-btn.disabled,
.add-review-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Анимация для звёзд */
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.star-rating label:active {
    animation: starPulse 0.2s ease;
}
/* ===== СТИЛИ ДЛЯ ЗВЁЗД РЕЙТИНГА ===== */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    margin: 10px 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107;
}

/* Стили для звёзд в отзывах */
.review-stars {
    margin-bottom: 10px;
    display: flex;
    gap: 4px;
}

.review-stars .star {
    font-size: 18px;
    color: #ddd;
}

.review-stars .star.filled {
    color: #ffc107;
}

/* Рамки отзывов по цветам в зависимости от рейтинга */
.review-item-modal {
    position: relative;
    padding: 15px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s;
}

.review-item-modal:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.review-border-5 {
    border-left: 4px solid #34a853;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.review-border-4 {
    border-left: 4px solid #7cb342;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.review-border-3 {
    border-left: 4px solid #ffc107;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.review-border-2 {
    border-left: 4px solid #ff9800;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.review-border-1 {
    border-left: 4px solid #ea4335;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Рейтинг в модальном окне */
.restaurant-rating-in-modal {
    font-size: 1rem;
    color: #ffc107;
    margin-left: 8px;
}

/* Кнопка заказа внизу */
.order-button-container-bottom {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Кнопка загрузки ещё отзывов */
.load-more-container {
    text-align: center;
    margin: 20px 0;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 98, 67, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

.review-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    text-decoration: none;
}

.review-delete-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: scale(1.1);
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
    padding-right: 35px;
    word-break: break-word;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: var(--text-soft);
    font-style: italic;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* Анимация для кнопок голосования */
.vote-btn {
    transition: all 0.2s;
}

.vote-btn:active {
    transform: scale(0.95);
}

/* Стили для загрузочного состояния кнопок */
.vote-btn.disabled,
.add-review-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Анимация для звёзд */
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.star-rating label:active {
    animation: starPulse 0.2s ease;
}
/* Скрытие загрузочного экрана при закрытых ресторанах */
.loading-screen.hidden {
    display: none;
}