* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background: #F5F1EB;
    color: #2C3E2E;
    overflow-x: hidden;
}

:root {
    --forest-green: #3C8D40;
    --sky-blue: #5BBCEB;
    --terracotta: #D17C4B;
    --light-bg: #F5F1EB;
    --white: #FFFFFF;
    --dark-text: #2C3E2E;
    --light-text: #6B7C6E;
}

.screen {
    min-height: 100vh;
    position: relative;
    padding: 0;
    margin-bottom: 80px;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: none;
}

.screen.active {
    display: block;
}

.nav-buttons {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.95);
    padding: 15px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-btn {
    background: var(--forest-green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #2d6b30;
    transform: translateY(-2px);
}

.landing {
    background: linear-gradient(135deg, rgba(60,141,64,0.1) 0%, rgba(91,188,235,0.1) 100%);
    position: relative;
    overflow: hidden;
    background-image: url('../images/map_background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.landing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(245, 241, 235, 0.85) 0%, rgba(245, 241, 235, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

.landing > * {
    position: relative;
    z-index: 2;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 60px;
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--forest-green);
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    display: block;
    object-fit: contain;
}

.header-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--forest-green);
}

.hero {
    text-align: center;
    padding: 80px 60px 60px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}

.hero-logo-container {
    position: relative;
    margin: 0;
    padding: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
    transform-origin: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
    box-shadow: none;
}

.hero-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(60, 141, 64, 0.6));
}

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

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 24px;
    color: var(--light-text);
    margin-bottom: 40px;
    font-weight: 500;
}

.cta-button {
    background: var(--forest-green);
    color: white;
    padding: 18px 48px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(60,141,64,0.3);
}

.cta-button:hover {
    background: #2d6b30;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(60,141,64,0.4);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--dark-text);
}

.feature-card p {
    color: var(--light-text);
    line-height: 1.6;
}

/* Обновленный стиль для раздела "О проекте" */
.about-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px 60px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.about-section h2 {
    font-size: 42px;
    margin-bottom: 30px;
    color: var(--forest-green);
    text-align: center;
    font-weight: 700;
}

.about-content {
    line-height: 1.8;
    color: var(--dark-text);
    font-size: 17px;
}

.about-content p {
    margin-bottom: 20px;
}

.about-content strong {
    color: var(--forest-green);
    font-weight: 600;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.about-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(60,141,64,0.05);
    border-radius: 16px;
    transition: all 0.3s;
}

.about-feature-item:hover {
    background: rgba(60,141,64,0.1);
    transform: translateX(5px);
}

.about-feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.about-feature-text {
    flex: 1;
}

.about-feature-text strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.about-feature-text p {
    margin: 0;
    font-size: 15px;
    color: var(--light-text);
}

/* Новый блок контактов */
.contacts-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px 60px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.contacts-section h2 {
    font-size: 42px;
    margin-bottom: 30px;
    color: var(--forest-green);
    text-align: center;
    font-weight: 700;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: rgba(60,141,64,0.05);
    border-radius: 16px;
    transition: all 0.3s;
}

.contact-item:hover {
    background: rgba(60,141,64,0.1);
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
}

.contact-details strong {
    display: block;
    margin-bottom: 5px;
    color: var(--forest-green);
    font-size: 16px;
}

.contact-details p {
    margin: 0;
    color: var(--light-text);
    font-size: 15px;
}

.contact-details a {
    color: var(--dark-text);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--forest-green);
}

.contact-form {
    margin-top: 40px;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark-text);
}

.footer {
    background: var(--dark-text);
    color: white;
    padding: 40px 60px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(60,141,64,0.05) 0%, rgba(91,188,235,0.05) 100%);
    padding: 40px 20px;
    position: relative;
}

.auth-box {
    background: white;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-text);
    font-size: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Manrope', sans-serif;
    transition: border-color 0.3s;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--forest-green);
}

.auth-button {
    width: 100%;
    background: var(--forest-green);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.auth-button:hover {
    background: #2d6b30;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--light-text);
}

.auth-link a {
    color: var(--forest-green);
    text-decoration: none;
    font-weight: 600;
}

/* Map Page */
.map-container {
    height: 100vh;
    display: flex;
    position: relative;
}

.map-sidebar {
    width: 320px;
    background: white;
    padding: 30px;
    box-shadow: 2px 0 15px rgba(0,0,0,0.08);
    overflow-y: auto;
    z-index: 10;
}

.search-box {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 30px;
    font-family: 'Manrope', sans-serif;
}

.filter-section h3 {
    margin-bottom: 16px;
    color: var(--dark-text);
    font-size: 18px;
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 12px;
    border: 2px solid #E5E5E5;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Manrope', sans-serif;
}

.filter-btn.active {
    background: var(--forest-green);
    color: white;
    border-color: var(--forest-green);
}

.map-area {
    flex: 1;
    background: linear-gradient(135deg, #E8F4E9 0%, #E3F2FD 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Page */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.profile-header {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.avatar {
    width: 120px;
    height: 120px;
    background: var(--forest-green);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.saved-places {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.saved-places h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.place-item {
    padding: 15px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(60,141,64,0.1) 0%, rgba(91,188,235,0.1) 100%);
}

.loader {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(60,141,64,0.2);
    border-top-color: var(--forest-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    margin-top: 30px;
    font-size: 20px;
    color: var(--dark-text);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close:hover {
    color: var(--dark-text);
}

.modal-body {
    text-align: center;
}

.modal-body h2 {
    color: var(--terracotta); /* Цвет по умолчанию (для ошибок) */
    margin-bottom: 20px;
    font-size: 24px;
}

/* ИЗМЕНЕНИЕ: Новый класс для успешных сообщений */
.modal-body h2.success-title {
    color: var(--forest-green);
}

.modal-body p {
    color: var(--dark-text);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 16px;
}

.modal-body .auth-button {
    margin-top: 0;
}

.place-detail-screen {
    min-height: 100vh;
    background: var(--white);
    padding: 20px;
}

.back-button {
    background: var(--forest-green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
}

.back-button:hover {
    background: #2d6b30;
}

.place-details {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.place-header {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--sky-blue) 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.place-info {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.place-info h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark-text);
}

.place-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--light-text);
}

.rating-buttons {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

.rating-btn {
    padding: 12px 24px;
    border: 2px solid #E5E5E5;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
}

.rating-btn:hover {
    transform: scale(1.1);
    border-color: var(--forest-green);
}

@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 40px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .map-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .header-nav {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
        bottom: auto;
        right: auto;
        top: 10px;
        width: 95%;
        padding: 10px;
        gap: 8px;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .hero {
        padding: 50px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 18px;
    }

    .cta-button {
        padding: 14px 30px;
        font-size: 16px;
    }

    .features {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .about-section, .contacts-section {
        padding: 30px 20px;
        margin: 40px 10px;
    }

    .about-section h2,
    .contacts-section h2 {
        font-size: 28px;
    }

    .map-container {
        flex-direction: column;
    }

    .map-sidebar {
        width: 100%;
        order: 2;
        box-shadow: none;
        border-top: 2px solid #E5E5E5;
    }

    .map-area {
        order: 1;
        height: 400px;
    }

    .filter-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .place-info {
        padding: 20px;
    }

    .profile-container {
        padding: 20px;
    }

    .auth-box {
        padding: 20px;
    }

    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .footer {
        padding: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 16px;
    }

    .cta-button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    .feature-card {
        padding: 20px;
    }

    .logo {
        font-size: 18px;
    }

    .map-area {
        height: 300px;
    }

    .filter-buttons {
        grid-template-columns: 1fr;
    }

    .nav-buttons {
        flex-direction: column;
        border-radius: 20px;
    }

    .about-feature-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .contact-icon {
        margin-bottom: 10px;
    }

    .place-meta {
        flex-direction: column;
        gap: 10px;
    }

    .rating-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

.business-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-card {
    text-align: center;
    min-width: 140px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--forest-green);
}

.stat-label {
    font-size: 14px;
    color: var(--light-text);
    margin-top: 4px;
}

/* Обёртка формы с отступами */
.form-screen-container {
    padding: 0 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Сама форма */
.form-screen {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 0;
}

.form-screen h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-text);
    font-size: 28px;
}

/* Кнопка "Далее" по центру */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Стили для чекбоксов (чтобы не слипались) */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Мини-меню поверх карты */
.map-overlay-menu {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.map-instruction {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-text);
    line-height: 1.4;
}

.map-button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.small-back-button,
.small-confirm-button {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.small-back-button {
    background: var(--forest-green);
    color: white;
}

.small-back-button:hover {
    background: #2d6b30;
}

.small-confirm-button {
    background: var(--terracotta);
    color: white;
}

.small-confirm-button:hover:not(:disabled) {
    background: #c06a3f;
}

.small-confirm-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}


/* Галерея на странице точки */
.place-gallery {
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.gallery-wrapper {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    overflow-x: auto;
}

.gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.gallery-thumbs img.active {
    border-color: var(--forest-green);
}

/* Мета-информация */
.place-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0 25px;
    color: var(--light-text);
}

/* Отзывы */
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

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

.review-header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.review-author {
    font-weight: 600;
}

.review-rating {
    color: var(--terracotta);
}

.review-text {
    color: var(--dark-text);
    line-height: 1.6;
}

/* Fullscreen gallery modal */
#gallery-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
}

#gallery-modal img {
    outline: none;
}