/* --- CSS Variables --- */
:root {
  --primary: #4e54c8;
  --secondary: #8f94fb;
  --text: #fff;
  --text-dark: #2c3e50;
  --bg-dark: #0f0c29;
  --card-bg: rgba(255,255,255,0.07);
  --radius: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
  --transition-default: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
}
*, *::before, *::after {
  box-sizing: border-box;
}
/* Общие стили для всех страниц */
:root {
    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --text-color: #2c3e50;
    --light-text: #ffffff;
    --dark-bg: #0f0c29;
    --card-bg: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #4e54c8, #8f94fb);
    --shadow-default: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition-default: all 0.3s ease;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: var(--header-height); /* Для фиксированного header */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 18px; /* увеличено для desktop */
}

.custom-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4e54c8;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    z-index: 9999;
    font-size: 0.95em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Добавляем специальный класс для страниц с формами */
body.auth-page {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    padding-top: 0; /* Убираем отступ от header на страницах авторизации */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Модифицируем стили container для страниц с формами */
.auth-page .container {
    padding: 0;
    max-width: 100%;
}

.section {
    padding: 80px 0;
    position: relative;
    font-size: 1rem;
}
.section.fullscreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Отступ для основного контента */
main {
    margin-top: 0; /* Высота header теперь задаётся через padding-top у body */
    padding: 20px;
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn {
  border: none;
  border-radius: 18px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1em;
  display: inline-block;
}
.btn-primary {
  background: linear-gradient(45deg,var(--primary),var(--secondary));
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}
.btn-outline:hover {
  background: rgba(143,148,251,0.1);
  color: #fff;
}



.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 1rem;
}

.birth-date {
    display: flex;
    gap: 10px;
}

.birth-date select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}



.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.event-card.selected-from-home {
    box-shadow: 0 0 0 4px #ffe082, 0 8px 32px 0 rgba(143,148,251,0.18);
    border: 2.5px solid #ffe082 !important;
    animation: highlightEventCard 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes highlightEventCard {
    0% { box-shadow: 0 0 0 0 #ffe082; }
    40% { box-shadow: 0 0 0 8px #ffe08277; }
    100% { box-shadow: 0 0 0 4px #ffe082, 0 8px 32px 0 rgba(143,148,251,0.18);}
}

.event-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(45deg, rgba(78, 84, 200, 0.2), rgba(143, 148, 251, 0.2));
}




.event-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(78, 84, 200, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    backdrop-filter: blur(5px);
}

.event-content {
    padding: 15px;
}

.event-header {
    margin-bottom: 10px;
}

.event-header h3 {
    font-size: clamp(1.1em, 2vw, 1.4em);
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.event-creator {
    display: flex;
    align-items: center;
}

.card-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.creator-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}

.event-detail i {
    color: var(--primary-color);
}

/* --- Подсказки (hint popups) --- */
.hint,
.hint i.fas.fa-question-circle {
    color: #8f94fb;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.2s;
    vertical-align: middle;
}
.hint:hover,
.hint:focus,
.hint i.fas.fa-question-circle:hover {
    color: #4e54c8;
}

.hint-popup,
#address-hint-popup {
    display: none;
    position: absolute;
    z-index: 9999;
    max-width: 280px;
    background: #fff;
    border: 1.5px solid #e0e3f7;
    border-radius: 10px;
    padding: 14px 18px;
    color: #222;
    box-shadow: 0 4px 16px rgba(78,84,200,0.13);
    font-size: 1em;
    line-height: 1.5;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 8px;
    transition: opacity 0.18s;
    pointer-events: auto;
    word-break: break-word;
}

.hint-popup b,
#address-hint-popup b {
    color: #4e54c8;
    font-weight: 600;
    font-size: 1em;
}

.hint-popup.visible,
#address-hint-popup.visible {
    display: block;
    opacity: 1;
}

@media (max-width: 600px) {
    .hint-popup,
    #address-hint-popup {
        max-width: 95vw;
        font-size: 0.97em;
        padding: 10px 8px;
        left: 2vw;
        transform: none;
    }
}

.profile-gallery-alert {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ffe0e9 0%, #fff0f3 100%);
    color: #c62828;
    border: 2px solid #ff6f91;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(255, 105, 135, 0.13), 0 2px 8px rgba(0,0,0,0.04);
    padding: 16px 32px 16px 18px;
    font-size: 1.08em;
    font-weight: 500;
    z-index: 10010;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: profile-gallery-alert-in 0.25s cubic-bezier(.4,1.6,.6,1) both;
    min-width: 320px;
    max-width: 90vw;
}
.profile-gallery-alert-icon {
    font-size: 1.5em;
    margin-right: 6px;
    flex-shrink: 0;
}
.profile-gallery-alert-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.3em;
    margin-left: 12px;
    cursor: pointer;
    transition: color 0.18s;
    padding: 0 4px;
}
.profile-gallery-alert-close:hover {
    color: #ff6f91;
}
@keyframes profile-gallery-alert-in {
    0% { opacity: 0; top: 0; }
    100% { opacity: 1; top: 60px; }
}

/* Sticky footer layout для всех страниц */
html, body {
    min-height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#app {
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
}


/* --- Глобальные стили для иконки чата (видны на всех страницах) --- */
#chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
    position: fixed;
    bottom: 20px;
    right: 40px;
    z-index: 1000;
}
#chat-toggle i {
    font-size: 30px;
    color: white;
    transition: transform 0.3s ease;
}
#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}
#chat-toggle:hover i {
    transform: rotate(15deg);
}

@media (max-width: 768px) {
    #chat-toggle {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        bottom: 16px !important;
        right: 16px !important;
    }
    #chat-toggle i {
        font-size: 20px !important;
    }
}

@media (max-width: 900px) {
    .events-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .event-card {
        font-size: 0.98em;
    }
}
@media (max-width: 600px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 4px;
    }
    .event-card {
        font-size: 0.95em;
        min-width: 0;
        max-width: 99vw;
    }
    .event-header h3 {
        font-size: 1em;
    }
    .event-description {
        font-size: 0.95em;
    }
}

/* --- Стили для модального окна подсказки --- */
.event-type-hint-modal {
    display: none;
    position: fixed !important;
    z-index: 10010;
    left: 0; top: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
}
.event-type-hint-modal .modal-content {
    background: #fff;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(78,84,200,0.13), 0 2px 8px rgba(0,0,0,0.04);
    padding: 28px 28px 22px 28px;
    position: relative;
    max-width: 400px;
    width: 95vw;
    font-size: 1.05em;
}
.event-type-hint-modal .modal-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #888;
    cursor: pointer;
}
.event-type-hint-modal .modal-backdrop {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    z-index: -1;
}

.vibe-plus-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #ffe082 0%, #ffd54f 100%);
    color: #4e54c8;
    font-weight: 700;
    font-size: 0.98em;
    border-radius: 18px;
    padding: 4px 14px 4px 10px;
    box-shadow: 0 2px 8px rgba(255, 224, 130, 0.18);
    border: 1.5px solid #ffe082;
    letter-spacing: 0.5px;
    position: relative;
    transition: box-shadow 0.2s, transform 0.2s;
    user-select: none;
}
.vibe-plus-badge i,
.vibe-plus-badge .vibe-plus-icon {
    font-size: 1.1em;
    color: #ffb300;
    margin-right: 2px;
}
.vibe-plus-badge:hover {
    box-shadow: 0 4px 16px rgba(255, 224, 130, 0.32);
    transform: translateY(-2px) scale(1.04);
}
.vibe-plus-badge .vibe-plus-text {
    font-weight: 700;
    color: #4e54c8;
    text-shadow: 0 1px 2px #fff7e0;
}

/* --- Interests --- */
.interest-card {
  transition: opacity .3s ease, transform .3s ease;
}
.interest-card.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* --- Category Button --- */
.category-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  padding: 7px 18px;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
  font-size: 1em;
  transition: var(--transition-default), box-shadow 0.2s;
}
.category-btn.active,
.category-btn:hover {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  box-shadow: 0 0 12px 2px #8f94fb66;
}

/* --- How Section --- */
.how-steps {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 18px;
}
.how-step {
  min-width: 260px;
  scroll-snap-align: center;
}
body.auth-page {
    /* Фон-картинка для страницы логина */
    background:
        url('/images/login.png') center center/cover no-repeat !important;
    padding-top: 0 !important;
    min-height: 100vh;
    /* Убираем возможные overlay/transition эффекты */
    transition: none !important;
}

.auth-page .form-container {
    margin-top: 80px; /* или нужное вам значение, например 80px */
}

/* --- Reviews --- */
.reviews-stars-bar-bg,
.reviews-stars-bar-fill {
  /* display: block; */
  /* Remove display: none !important; */
}
.review-card.modern {
  /* ...existing code... */
  min-height: unset;
}

/* --- View All Button --- */
.view-all-btn {
  display: block;
  background: linear-gradient(45deg,var(--primary),var(--secondary));
  color: #fff;
  padding: 8px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(78,84,200,0.13);
  transition: var(--transition-default);
  max-width: fit-content;
  width: fit-content;
  margin: 0 auto;
  margin-top: 10px;
}

/* --- Statistics Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
  cursor: pointer;
}
.scroll-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8f94fb;
  opacity: 0.5;
  transition: background 0.2s, opacity 0.2s;
}
.scroll-dot.active {
  background: #ffe082;
  opacity: 1;
}
.scroll-indicator:hover .scroll-dot {
  opacity: 0.8;
}

/* --- Interest Card Hint Popup (универсально) --- */
.interest-hint-popup {
    position: absolute;
    z-index: 9999;
    background: #fff;
    color: #222;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 1em;
    box-shadow: 0 4px 16px rgba(78,84,200,0.13);
    border: 1.5px solid #e0e3f7;
    pointer-events: none;
    white-space: pre-line;
    max-width: 260px;
    left: 0;
    top: 0;
    transform: translateY(-100%);
    opacity: 0.97;
    transition: opacity 0.18s;
}

select,
select option {
    color: #222 !important;
    background: #fff !important;
}

/* Можно добавить стили для categoryFilter отдельно, если нужно */
#categoryFilter,
#categoryFilter option {
    color: #222 !important;
    background: #fff !important;
}



.event-desc-btn {
    /* уберите position: absolute; */
    width: 100%;
    margin-top: 10px;
    margin-bottom: 0;
    background: rgba(40,44,70,0.82);
    color: #fff;
    border: 1.5px solid #8f94fb;
    border-radius: 10px;
    padding: 8px 0;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(78,84,200,0.10);
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    opacity: 0.92;
    visibility: visible;
    transition: opacity 0.25s, visibility 0.25s, background 0.2s, box-shadow 0.2s, border 0.2s;
    backdrop-filter: blur(2px);
}
.event-desc-btn i {
    font-size: 1em;
    color: #ffe082;
    margin-left: 2px;
}
.event-desc-btn:hover, .event-desc-btn:focus {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: #ffe082;
    opacity: 1;
    box-shadow: 0 4px 16px rgba(143,148,251,0.18);
}


.event-desc-popup {
    position: absolute;
    left: 0;
    right: 0;
   bottom: 0;
    background: rgba(20,20,30,0.97);
    color: #fff;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    box-shadow: 0 -2px 18px rgba(0,0,0,0.18);
    z-index: 20;
    padding: 18px 16px 16px 16px;
    animation: fadeInDesc 0.25s;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s, visibility 0.25s;
}
.event-desc-popup[style*="opacity: 0"] {
    opacity: 0 !important;
    visibility: hidden !important;
}
@keyframes fadeInDesc {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}

.event-desc-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.event-desc-popup.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.event-desc-popup-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.event-desc-btn-top {
    background: rgba(40,40,60,0.92);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 6px 18px;
    font-size: 0.98em;
    font-weight: 500;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.event-desc-btn-top:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}
.event-desc-text {
    font-size: 1em;
    color: #fff;
    opacity: 0.95;
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.5;
    word-break: break-word;
    padding-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 600px) {
    .event-desc-text {
        font-size: 0.57em;
        -webkit-line-clamp: 3;
        max-height: 4.1em;
        padding-bottom: 4px;
        word-break: break-word;
    }
}