/* СБРОС И БАЗОВЫЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

: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;
    --distance-bg: #e8f0fe;
    --distance-color: #1e3a5f;
    --like-color: #34a853;
    --dislike-color: #ea4335;
    --round-the-clock-bg: #f0f9ff;
    --round-the-clock-color: #0369a1;
    
    /* Цвета для отзывов */
    --review-5-bg: #d4edda;
    --review-5-border: #c3e6cb;
    --review-5-text: #155724;
    --review-4-bg: #d1e7dd;
    --review-4-border: #b8e0c2;
    --review-4-text: #0f5132;
    --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: #f5c6cb;
    --review-1-border: #f1b0b7;
    --review-1-text: #721c24;
    
    /* Уведомление */
    --toast-bg: #333;
    --toast-text: white;
}

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;
}

/* ИНФОРМАЦИОННАЯ ПЛАШКА */
.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);
}

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

/* ШАПКА */
.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: 30px;
}

.header-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 350px;
    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;
}

.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);
}

/* СЕКЦИЯ С ЗАВЕДЕНИЯМИ */
.places-section {
    margin: 30px 0 50px;
}

/* СЕТКА КАРТОЧЕК */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* КАРТОЧКА ЗАВЕДЕНИЯ */
.place-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.place-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

/* Цветовая индикация по рейтингу */
.place-card.excellent {
    border-bottom: 4px solid var(--rating-excellent);
}

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

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

/* КОНТЕЙНЕР ИЗОБРАЖЕНИЯ */
.card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

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

/* РЕЙТИНГ */
.rating-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-weight: 700;
    font-size: 1rem;
    padding: 6px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rating-badge.excellent {
    background-color: rgba(52, 168, 83, 0.85);
    color: white;
}

.rating-badge.good {
    background-color: rgba(251, 188, 4, 0.85);
    color: #1e293b;
}

.rating-badge.bad {
    background-color: rgba(234, 67, 53, 0.85);
    color: white;
}

/* РАССТОЯНИЕ */
.distance-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(232, 240, 254, 0.85);
    backdrop-filter: blur(4px);
    color: var(--distance-color);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: none;
}

.distance-badge.visible {
    display: block;
}

/* ИНФОРМАЦИЯ О ЗАВЕДЕНИИ */
.card-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.open-until {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    background-color: rgba(19, 98, 67, 0.1);
    padding: 4px 10px;
    border-radius: 30px;
    white-space: nowrap;
}

.round-the-clock {
    font-size: 0.85rem;
    color: var(--round-the-clock-color);
    font-weight: 500;
    background-color: var(--round-the-clock-bg);
    padding: 4px 10px;
    border-radius: 30px;
    white-space: nowrap;
}

/* КНОПКИ ЛАЙК/ДИЗЛАЙК */
.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.voted {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

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

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

/* УВЕДОМЛЕНИЕ (TOAST) */
.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;
}

/* ЗВЕЗДНЫЙ РЕЙТИНГ */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.star-rating input {
    display: none;
}

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

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

/* МОДАЛЬНОЕ ОКНО С ОТЗЫВАМИ */
.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;
    animation: fadeIn 0.3s ease;
}

.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 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
}

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

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

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

.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);
}

/* ИНФОРМАЦИЯ О ЗАВЕДЕНИИ В МОДАЛКЕ */
.place-modal-info {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.place-modal-address {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
}

.place-modal-address a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.place-modal-address a:hover {
    text-decoration: underline;
}

.place-modal-hours {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-soft);
}

/* ФОРМА ДОБАВЛЕНИЯ ОТЗЫВА */
.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: 8px;
}

.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;
    resize: vertical;
    min-height: 80px;
}

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

.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:not(:disabled) {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 98, 67, 0.2);
}

.add-review-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ОТЗЫВЫ */
.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-3-bg);
    border-color: var(--review-3-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-1-bg);
    border-color: var(--review-1-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-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-3-bg);
    color: var(--review-3-text);
}

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

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

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

.loading-reviews {
    text-align: center;
    padding: 20px;
    color: var(--text-soft);
}

.load-more-btn {
    text-align: center;
    padding: 12px;
    margin-top: 15px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

/* ФУТЕР */
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-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.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    max-width: 400px;
    width: 90%;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.modal-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-content a {
    color: var(--primary);
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

.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);
}

/* СТИЛИ ДЛЯ АНИМАЦИИ ЗАГРУЗКИ */
.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 {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: bounce 1.5s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: 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; }
}

/* СТИЛИ ДЛЯ ЭКРАНА "ВСЕ ЗАКРЫТО" */
.closed-screen {
    min-height: auto;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 20px 20px 40px 20px;
    margin-top: 0;
}

.closed-message {
    background-color: var(--white);
    border-radius: 32px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.closed-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite ease-in-out;
    display: inline-block;
}

.closed-message p {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 500;
}

.closed-message .time {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    background-color: rgba(19, 98, 67, 0.1);
    padding: 12px 30px;
    border-radius: 60px;
    display: inline-block;
    margin-top: 15px;
}

/* Главный контент (изначально скрыт) */
.main-content {
    opacity: 0;
    transition: opacity 1s ease;
    display: none;
}

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

/* АДАПТАЦИЯ */
@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .back-btn {
        width: 100%;
        min-width: unset;
    }
    
    .places-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-image {
        height: 160px;
    }
    
    .place-name {
        font-size: 1.1rem;
    }
    
    .footer-social {
        gap: 20px;
    }

    .social-icon {
        width: 42px;
        height: 42px;
    }
    
    .loading-title {
        font-size: 1.8rem;
    }
    
    .loading-text {
        font-size: 1.1rem;
        white-space: normal;
        width: 90%;
    }
    
    .loading-emoji {
        font-size: 4rem;
    }
    
    .loading-progress {
        width: 250px;
    }
    
    .reviews-modal-content {
        padding: 20px;
    }
    
    .closed-message {
        padding: 30px 20px;
    }
    .closed-message p {
        font-size: 1.3rem;
    }
    .closed-message .time {
        font-size: 1.6rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .rating-badge, .distance-badge {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
    
    .footer-social {
        gap: 15px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }
    
    .loading-title {
        font-size: 1.5rem;
    }
    
    .loading-emoji {
        font-size: 3rem;
    }
    
    .loading-progress {
        width: 200px;
    }
    
    .reviews-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .closed-message {
        padding: 25px 15px;
    }
    .closed-message p {
        font-size: 1.2rem;
    }
    .closed-message .time {
        font-size: 1.4rem;
        padding: 8px 16px;
    }
    .closed-emoji {
        font-size: 4rem;
    }
}
/* Добавить в конец файла или заменить существующие стили звезд и отзывов */

/* УВЕЛИЧЕННЫЕ ЗВЕЗДЫ ДЛЯ ФОРМЫ ОТЗЫВА */
.star-rating-large {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
}

.star-rating-large input {
    display: none;
}

.star-rating-large label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* СТИЛИ ДЛЯ ОТЗЫВОВ - ОБНОВЛЕННЫЕ */
.review-item-modal {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid;
    position: relative;
}

/* Фоновые цвета для отзывов */
.review-item-modal.rating-5 {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.review-item-modal.rating-4 {
    background-color: #d1e7dd;
    border-color: #b8e0c2;
}

.review-item-modal.rating-3 {
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.review-item-modal.rating-2 {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.review-item-modal.rating-1 {
    background-color: #f5c6cb;
    border-color: #f1b0b7;
}

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

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

/* ЗВЕЗДЫ В ОТЗЫВЕ - КРУПНЫЕ */
.review-stars {
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: #ffc107;
    margin-bottom: 10px;
}

/* ТЕКСТ ОТЗЫВА - БОЛЬШОЙ И ЖИРНЫЙ */
.review-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
    margin-bottom: 0;
    padding-right: 35px;
}

/* Скрываем старые элементы */
.review-rating,
.review-date {
    display: none;
}

.review-header {
    margin-bottom: 10px;
}
/* Добавить в конец файла */

/* КРАСИВОЕ ПОЛЕ ДЛЯ ОТЗЫВА С КНОПКОЙ ВНУТРИ */
.review-input-wrapper {
    position: relative;
    width: 100%;
}

.review-input-wrapper textarea {
    width: 100%;
    padding: 15px;
    padding-right: 55px;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background-color: var(--white);
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
}

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

.review-input-wrapper textarea:focus + .send-review-btn {
    transform: scale(1);
    opacity: 1;
}

/* Кнопка отправки внутри поля */
.send-review-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(19, 98, 67, 0.3);
    z-index: 10;
}

.send-review-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 98, 67, 0.4);
}

.send-review-btn:active:not(:disabled) {
    transform: translateY(0);
}

.send-review-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    transform: scale(0.95);
}

/* Анимация при отправке */
.send-review-btn.sending {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(19, 98, 67, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(19, 98, 67, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(19, 98, 67, 0);
    }
}

/* Счетчик символов */
.char-counter {
    position: absolute;
    bottom: 8px;
    left: 15px;
    font-size: 0.7rem;
    color: var(--gray-icon);
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 5;
}

.char-counter span {
    font-weight: 600;
    color: var(--primary);
}

/* Обновленные стили для формы отзыва */
.add-review-form {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.add-review-form h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Увеличенные звезды */
.star-rating-large {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 5px;
}

.star-rating-large input {
    display: none;
}

.star-rating-large label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating-large label:hover,
.star-rating-large label:hover ~ label,
.star-rating-large input:checked ~ label {
    color: #ffc107;
    transform: scale(1.1);
}

/* Анимация появления звезд */
.star-rating-large label {
    transition: transform 0.2s ease, color 0.2s ease;
}

.star-rating-large label:hover {
    transform: scale(1.2);
}

/* Стили для отзывов (обновленные) */
.review-item-modal {
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid;
    position: relative;
    transition: all 0.2s ease;
}

.review-item-modal:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Фоновые цвета для отзывов */
.review-item-modal.rating-5 {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.review-item-modal.rating-4 {
    background-color: #d1e7dd;
    border-color: #b8e0c2;
}

.review-item-modal.rating-3 {
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.review-item-modal.rating-2 {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.review-item-modal.rating-1 {
    background-color: #f5c6cb;
    border-color: #f1b0b7;
}

/* Кнопка удаления отзыва */
.review-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    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 ease;
    z-index: 10;
    opacity: 0.7;
}

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

/* Звезды в отзыве - крупные */
.review-stars {
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: #ffc107;
    margin-bottom: 10px;
}

/* Текст отзыва - большой и жирный */
.review-text {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.6;
    margin-bottom: 0;
    padding-right: 35px;
}

/* Скрываем старые элементы */
.review-rating,
.review-date {
    display: none;
}

.review-header {
    margin-bottom: 10px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .send-review-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        bottom: 12px;
        right: 12px;
    }
    
    .review-input-wrapper textarea {
        padding-right: 48px;
        font-size: 0.9rem;
    }
    
    .char-counter {
        font-size: 0.65rem;
        bottom: 6px;
        left: 12px;
    }
    
    .star-rating-large label {
        font-size: 2rem;
    }
    
    .review-stars {
        font-size: 1.2rem;
    }
    
    .review-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .star-rating-large label {
        font-size: 1.8rem;
    }
    
    .send-review-btn {
        width: 32px;
        height: 32px;
        bottom: 10px;
        right: 10px;
    }
}