/* ========================================
   СВЕТОЗОРИЙ — Основные стили
   RPG-интерфейс для цифрового архива жизни
   ======================================== */

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

:root {
    /* Основные цвета */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-card: rgba(255, 215, 0, 0.03);
    --text-primary: #e8d5b5;
    --text-secondary: #c4b59a;
    --text-muted: #8a7a5a;
    --gold: #ffd700;
    --gold-dark: #f0a500;
    --gold-glow: rgba(255, 215, 0, 0.2);
    --border-gold: rgba(255, 215, 0, 0.1);
    
    /* RPG-элементы */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(255, 215, 0, 0.1);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* ---------- СКРОЛЛ ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

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

/* ---------- НАВИГАЦИЯ ---------- */
.navbar {
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5em;
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
}

.navbar-brand .rpg-icon {
    font-size: 1.8em;
}

.navbar-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 8px 18px;
    border-radius: 30px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
    border-color: var(--border-gold);
}

.nav-link.active {
    color: #0a0e1a;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

/* ---------- КАРТОЧКИ ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: var(--shadow-glow);
}

.card-title {
    color: var(--gold);
    font-size: 1.5em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- КНОПКИ ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1em;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0a0e1a;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(239, 68, 68, 0.3);
}

/* ---------- МОДАЛЬНЫЕ ОКНА ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

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

.modal-content h2 {
    color: var(--gold);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ---------- ФОРМЫ ---------- */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-size: 0.9em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1em;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

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

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ---------- УВЕДОМЛЕНИЯ ---------- */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    backdrop-filter: blur(20px);
    z-index: 2000;
    animation: slideIn 0.5s ease;
    display: none;
    max-width: 400px;
}

.notification.show {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ---------- АНИМАЦИИ RPG ---------- */
@keyframes goldPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    }
}

@keyframes levelUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: var(--gold);
    }
    100% {
        transform: scale(1);
    }
}

.rpg-pulse {
    animation: goldPulse 2s infinite;
}

.rpg-level-up {
    animation: levelUp 0.5s ease;
}

/* ---------- СЕТКИ ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }
    
    .navbar-links {
        width: 100%;
        justify-content: center;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}


/* ---------- МОБИЛЬНАЯ АДАПТАЦИЯ (PWA) ---------- */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .navbar {
        padding: 10px 12px;
        margin-bottom: 15px;
        gap: 8px;
    }
    .navbar-brand {
        font-size: 1.2em;
    }
    .navbar-brand .rpg-icon {
        font-size: 1.4em;
    }
    .navbar-links {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .navbar-links::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
    }
    #map-wrapper {
        min-height: 350px !important;
        height: 60vh !important;
    }
    .modal {
        padding: 10px;
    }
    .modal-content {
        max-width: 100% !important;
        padding: 18px;
    }
    .modal-actions {
        flex-wrap: wrap;
    }
    .btn {
        padding: 10px 18px;
    }
    .notification {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    .section-header {
        flex-wrap: wrap;
    }
    .artifact-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   РАЗДЕЛЫ КОЛЛЕКЦИЙ (плашки сверху)
   ========================================== */

.type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.type-tab {
    padding: 9px 18px;
    border-radius: 26px;
    border: 1px solid var(--border-gold);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95em;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.type-tab:hover {
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.35);
    transform: translateY(-2px);
}

.type-tab .tab-count {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.8em;
}

.type-tab.active[data-tab="coins"] {
    background: linear-gradient(135deg, #b06a30, #ffd700);
    color: #1c1005;
    border-color: transparent;
    box-shadow: 0 0 22px rgba(205, 127, 50, 0.35);
}

.type-tab.active[data-tab="stamps"] {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #f0f5ff;
    border-color: transparent;
    box-shadow: 0 0 22px rgba(59, 130, 246, 0.35);
}

.type-tab.active[data-tab="tech"] {
    background: linear-gradient(135deg, #0891b2, #22d3ee);
    color: #062a30;
    border-color: transparent;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.3);
}

.type-tab.active[data-tab="auto"] {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff5f5;
    border-color: transparent;
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.35);
}

.type-tab.active[data-tab="realty"] {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #f0fff4;
    border-color: transparent;
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.3);
}

.type-tab.active[data-tab="other"] {
    background: linear-gradient(135deg, #ffd700, #f0a500);
    color: #0a0e1a;
    border-color: transparent;
    box-shadow: 0 0 22px var(--gold-glow);
}

.type-tab.active .tab-count {
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
}

.section-empty {
    text-align: center;
    padding: 55px 20px;
    color: var(--text-muted);
}

.section-empty-icon {
    font-size: 4.2em;
    margin-bottom: 14px;
}

.type-coins .section-empty-icon { filter: drop-shadow(0 0 18px rgba(205, 127, 50, 0.45)); }
.type-stamps .section-empty-icon { filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.45)); }
.type-tech .section-empty-icon { filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.4)); }
.type-auto .section-empty-icon { filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.45)); }
.type-realty .section-empty-icon { filter: drop-shadow(0 0 18px rgba(34, 197, 94, 0.4)); }

.collections-body {
    min-height: 200px;
}

.group-add-btn {
    padding: 4px 14px !important;
    font-size: 0.85em;
}

/* ==========================================
   ТИПИЗИРОВАННЫЕ КОЛЛЕКЦИИ
   ========================================== */

.type-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.type-chip {
    padding: 8px 16px;
    border-radius: 24px;
    border: 1px solid var(--border-gold);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9em;
    font-family: inherit;
}

.type-chip:hover {
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.35);
}

.type-chip.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0a0e1a;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.collection-group {
    margin-bottom: 28px;
    border: 1px solid rgba(255, 215, 0, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.collection-group .group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    font-weight: bold;
    font-size: 1.05em;
    border-left: 4px solid var(--gold);
    background: rgba(255, 215, 0, 0.05);
    color: var(--gold);
}

.collection-group .group-type-badge {
    font-size: 0.75em;
    font-weight: normal;
    padding: 3px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    white-space: nowrap;
}

.collection-group .group-stats {
    margin-left: auto;
    font-weight: normal;
    font-size: 0.85em;
    color: var(--text-muted);
    white-space: nowrap;
}

.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    padding: 16px;
}

.artifact-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.artifact-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: var(--shadow-glow);
}

.artifact-name {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 6px;
}

.artifact-price {
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 6px;
}

.artifact-location {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 6px;
}

.chip {
    display: inline-block;
    background: rgba(255, 215, 0, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.75em;
    margin: 2px 4px 2px 0;
}

.catalog-item {
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.catalog-item:hover {
    border-color: rgba(255, 215, 0, 0.45);
    background: rgba(255, 215, 0, 0.04);
}

/* --- Тематика: монеты (медь/золото) --- */
.collection-group.type-coins { border-color: rgba(205, 127, 50, 0.25); }
.collection-group.type-coins .group-header {
    border-left-color: #cd7f32;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.18), rgba(255, 215, 0, 0.04));
    color: #e8b268;
}
.collection-group.type-coins .artifact-card { border-color: rgba(205, 127, 50, 0.2); }
.collection-group.type-coins .artifact-card:hover { border-color: rgba(205, 127, 50, 0.65); box-shadow: 0 8px 24px rgba(205, 127, 50, 0.15); }
.collection-group.type-coins .chip { background: rgba(205, 127, 50, 0.12); border-color: rgba(205, 127, 50, 0.25); }

/* --- Тематика: марки (синий) --- */
.collection-group.type-stamps { border-color: rgba(59, 130, 246, 0.25); }
.collection-group.type-stamps .group-header {
    border-left-color: #3b82f6;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.03));
    color: #93b8f5;
}
.collection-group.type-stamps .artifact-card { border-color: rgba(59, 130, 246, 0.2); }
.collection-group.type-stamps .artifact-card:hover { border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); }
.collection-group.type-stamps .chip { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); }

/* --- Тематика: техника (неон-циан) --- */
.collection-group.type-tech { border-color: rgba(34, 211, 238, 0.25); }
.collection-group.type-tech .group-header {
    border-left-color: #22d3ee;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0.02));
    color: #7dd8e8;
}
.collection-group.type-tech .artifact-card { border-color: rgba(34, 211, 238, 0.2); }
.collection-group.type-tech .artifact-card:hover { border-color: rgba(34, 211, 238, 0.6); box-shadow: 0 8px 24px rgba(34, 211, 238, 0.12); }
.collection-group.type-tech .chip { background: rgba(34, 211, 238, 0.1); border-color: rgba(34, 211, 238, 0.22); }

/* --- Тематика: транспорт (карбон/красный) --- */
.collection-group.type-auto { border-color: rgba(239, 68, 68, 0.25); }
.collection-group.type-auto .group-header {
    border-left-color: #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.02));
    color: #f09a9a;
}
.collection-group.type-auto .artifact-card { border-color: rgba(239, 68, 68, 0.2); }
.collection-group.type-auto .artifact-card:hover { border-color: rgba(239, 68, 68, 0.6); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12); }
.collection-group.type-auto .chip { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.22); }

/* --- Тематика: недвижимость (зелёный) --- */
.collection-group.type-realty { border-color: rgba(34, 197, 94, 0.25); }
.collection-group.type-realty .group-header {
    border-left-color: #22c55e;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.02));
    color: #86d9a3;
}
.collection-group.type-realty .artifact-card { border-color: rgba(34, 197, 94, 0.2); }
.collection-group.type-realty .artifact-card:hover { border-color: rgba(34, 197, 94, 0.6); box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12); }
.collection-group.type-realty .chip { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.22); }

/* ---------- МЕМУАРЫ ---------- */
.memory-editor {
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    line-height: 1.8;
}

.memory-editor:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.memory-editor .mention-link {
    color: var(--gold);
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px dashed var(--gold);
}

.memory-editor .mention-link:hover {
    color: var(--gold-dark);
}

/* Подсказки упоминаний */
.mention-suggestions {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    min-width: 250px;
    box-shadow: var(--shadow-card);
}

.suggestion-item {
    padding: 8px 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: rgba(255, 215, 0, 0.1);
}

.memory-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.memory-card:hover {
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}


/* Модалки существ должны быть поверх остальных */
#beingModal,
#viewBeingModal,
#editBeingModal {
    z-index: 2000 !important;
}

#viewMemoryModal {
    z-index: 1500 !important;
}

/* Упоминания в тексте */
.mention-link {
    color: var(--gold);
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px dashed var(--gold);
    transition: all 0.3s ease;
}

.mention-link:hover {
    color: var(--gold-dark);
    border-bottom-color: var(--gold-dark);
    background: rgba(255, 215, 0, 0.05);
    border-radius: 3px;
    padding: 0 4px;
}

/* Курсор для всех кликабельных элементов */
.mention-link,
.memory-card,
.artifact-card,
[onclick] {
    cursor: pointer;
}

.leaflet-attribution-flag {
    display: none !important;
}

/* ==========================================
   МОДАЛКА ГОРОДА (внутри карты)
   ========================================== */

/* Обёртка модалки — абсолютно позиционирована внутри карты */
.city-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    display: none;
}

.city-modal-overlay.active {
    display: block;
    pointer-events: auto;
}

/* Сама модалка — слева, на всю высоту карты */
.city-modal-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(12px);
    border-right: 2px solid rgba(255, 215, 0, 0.15);
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.6);
    padding: 20px 18px;
    color: var(--text-primary);
    
    animation: slideInLeft 0.25s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Скроллбар */
.city-modal-content::-webkit-scrollbar {
    width: 4px;
}
.city-modal-content::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}
.city-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

/* Заголовок */
.city-modal-content .modal-title {
    color: var(--gold);
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

/* Инфо сетка */
.city-modal-content .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    margin-bottom: 14px;
}
.city-modal-content .info-grid .label {
    color: var(--text-muted);
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.city-modal-content .info-grid .value {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Посещения */
.city-modal-content .visits-section .section-label {
    color: var(--text-muted);
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.city-modal-content .visits-list {
    max-height: 100px;
    overflow-y: auto;
}
.city-modal-content .visits-list .visit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.04);
    font-size: 0.9em;
}
.city-modal-content .visits-list .visit-item .visit-date {
    color: var(--gold);
}
.city-modal-content .visits-list .visit-item .visit-notes {
    color: var(--text-muted);
    font-size: 0.8em;
    margin-left: 6px;
}
.city-modal-content .visits-list .visit-item .visit-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.5;
    padding: 0 4px;
}
.city-modal-content .visits-list .visit-item .visit-delete:hover {
    opacity: 1;
}
.city-modal-content .visits-list .empty-message {
    color: var(--text-muted);
    font-size: 0.85em;
    text-align: center;
    padding: 8px 0;
}

/* Добавление посещения */
.city-modal-content .add-visit-section {
    border-top: 1px solid rgba(255, 215, 0, 0.08);
    padding-top: 12px;
    margin-top: 4px;
}
.city-modal-content .add-visit-section .section-label {
    color: var(--text-muted);
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.city-modal-content .add-visit-section .inputs-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.city-modal-content .add-visit-section .inputs-row input {
    flex: 1;
    min-width: 80px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.85em;
}
.city-modal-content .add-visit-section .inputs-row input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.4);
}
.city-modal-content .add-visit-section .inputs-row .btn-success {
    padding: 6px 14px;
    font-size: 0.85em;
    white-space: nowrap;
}

/* Кнопка закрытия */
.city-modal-content .close-row {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 215, 0, 0.05);
    text-align: center;
}
.city-modal-content .close-row .btn-secondary {
    padding: 4px 20px;
    font-size: 0.8em;
}

/* Адаптив */
@media (max-width: 768px) {
    .city-modal-content {
        width: calc(100% - 16px);
        left: 8px;
        top: 8px;
        height: calc(100% - 16px);
        border-radius: 12px;
        border: 1px solid rgba(255, 215, 0, 0.15);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    }
    .city-modal-content .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px 10px;
    }
    .city-modal-content .add-visit-section .inputs-row {
        flex-direction: column;
    }
    .city-modal-content .add-visit-section .inputs-row input {
        min-width: auto;
    }
}
