* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; font-family:'Segoe UI','Roboto',sans-serif; background-color:#0b0e14; color:#d0d7e0; }
.app-wrapper { display:flex; flex-direction:column; height:100vh; }

.header {
    background: rgba(10,14,23,0.92);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid #2a3a4a;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #b7e1f0, #7aa5b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(90,180,220,0.3);
    user-select: none;
}
.logo span { font-weight:300; background:none; -webkit-text-fill-color:#8a9aa8; }
.nav-links {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: #b0c4d9;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.2s, text-shadow 0.2s;
    position: relative;
    cursor: pointer;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7aa5b9;
    transition: width 0.2s;
}
.nav-links a:hover { color:#e6f0fa; text-shadow:0 0 10px rgba(120,200,240,0.4); }
.nav-links a:hover::after { width:100%; }
.lang-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid #3a4e62;
    color: #b0c4d9;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}
.lang-btn:hover { background:rgba(255,255,255,0.18); color:#e6f0fa; }

.main {
    flex: 1;
    position: relative;
    background: #141a22;
    min-height: 0;
}
#map {
    width: 100%;
    height: 100%;
    background: #1a212b;
}

/* Панель фильтров (с добавленным select) */
.filter-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(10,14,23,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid #2a3a4a;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6);
    max-width: 260px;
}
.filter-panel .filter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6a8a9a;
    text-align: center;
    margin-bottom: 4px;
}
.filter-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid #3a4e62;
    color: #b0c4d9;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    width: 100%;
    margin: 5px 0;
}
.filter-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: #5a7a92;
}
.filter-btn.active {
    background: rgba(42,74,90,0.5);
    border-color: #7aa5b9;
    color: #e6f0fa;
    box-shadow: 0 0 12px rgba(90,180,220,0.15);
}
.filter-btn .icon { font-size: 1.2rem; }
.filter-btn .count {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0 8px;
    font-size: 0.7rem;
    color: #8aafc0;
    margin-left: auto;
}
.filter-btn.active .count {
    background: rgba(90,180,220,0.2);
    color: #b7e1f0;
}
.filter-reset {
    border-top: 1px solid #2a3a4a;
    padding-top: 8px;
    margin-top: 4px;
    text-align: center;
}
.filter-reset button {
    background: transparent;
    border: none;
    color: #6a8a9a;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: underline dotted;
}
.filter-reset button:hover { color: #b0c4d9; }

/* Новый блок выбора точки */
.filter-select {
    margin-top: 8px;
    border-top: 1px solid #2a3a4a;
    padding-top: 8px;
}
.filter-select label {
    font-size: 0.75rem;
    color: #6a8a9a;
    display: block;
    margin-bottom: 4px;
}
.filter-select select {
    width: 100%;
    background: rgba(0,0,0,0.4);
    color: #d0dbe8;
    border: 1px solid #3a4e62;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}
.filter-select select:focus {
    border-color: #7aa5b9;
}
.filter-select select option {
    background: #1a212b;
    color: #d0dbe8;
}
#placeSelect{
    max-height:200px;
    overflow-y: auto;
}
/* Фильтр блогер */
.filter-blogger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 8px;
}

.blogger-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.blogger-toggle input {
    display: none;
}

.blogger-toggle .slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #555;
    border-radius: 12px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.blogger-toggle .slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.blogger-toggle input:checked + .slider {
    background: #f5a623;
}

.blogger-toggle input:checked + .slider::after {
    transform: translateX(20px);
}

.blogger-toggle .label-text {
    color: #eee;
}

.blogger-count {
    background: #f5a623;
    color: #1a1a2e;
    border-radius: 12px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: bold;
    line-height: 22px;
    margin-left: auto;
}


.leaflet-bottom{
display: none;
}

.footer {
    background: rgba(10,14,23,0.92);
    backdrop-filter: blur(4px);
    border-top: 1px solid #1f2d3a;
    padding: 0.8rem 2rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #6a7f94;
    letter-spacing: 0.3px;
}
.footer a { color:#7aa5b9; text-decoration:none; margin-left:1.2rem; }
.footer a:hover { color:#b7e1f0; text-decoration:underline; }

/* Стили для попапа */
.custom-popup .leaflet-popup-content-wrapper {
    background: rgba(20,28,40,0.95);
    backdrop-filter: blur(6px);
    border: 1px solid #3a4e62;
    border-radius: 14px;
    color: #d0dbe8;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
    min-width: 280px;
    max-width: 340px;
}
.custom-popup .leaflet-popup-tip { background: rgba(20,28,40,0.95); border:1px solid #3a4e62; }
.custom-popup .leaflet-popup-content { font-size:0.95rem; line-height:1.5; padding:10px 12px; margin:0; }
.popup-title { font-size:1.2rem; font-weight:600; margin-bottom:2px; color:#b7e1f0; }
.popup-desc { opacity:0.85; margin:4px 0 6px 0; font-size:0.9rem; }
.popup-tag { display:inline-block; background:#2a3f52; padding:0 12px; border-radius:20px; font-size:0.75rem; color:#b0cfe0; margin-bottom:6px; }
.popup-coords { font-size:0.8rem; color:#8aafc0; margin:2px 0 6px 0; font-family:monospace; background:rgba(0,0,0,0.2); padding:2px 8px; border-radius:10px; display:inline-block; }
.popup-status { font-size:0.8rem; margin:4px 0 8px 0; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.popup-status .status-badge { padding:2px 10px; border-radius:12px; font-weight:500; background:#2a3f52; }

.popup-danger {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 10px 0;
}
.popup-danger .danger-value {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
    color: #e6f0fa;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 0 8px;
}
.btn-danger {
    background: rgba(255,255,255,0.08);
    border: 1px solid #3a4e62;
    color: #d0dbe8;
    border-radius: 20px;
    padding: 2px 14px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1.6;
    transition: background 0.2s, transform 0.1s;
}
.btn-danger:hover {
    background: rgba(255,255,255,0.18);
}
.btn-danger:active {
    transform: scale(0.95);
}
.btn-danger.up { color: #ff6b6b; }
.btn-danger.down { color: #51cf66; }

.popup-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; border-top:1px solid #2a3a4a; padding-top:8px; }
.btn-status { background:rgba(255,255,255,0.06); border:1px solid #3a4e62; border-radius:16px; padding:2px 14px; font-size:0.75rem; color:#b0c4d9; cursor:pointer; transition:background 0.2s, border-color 0.2s; line-height:1.8; }
.btn-status:hover { background:rgba(255,255,255,0.14); border-color:#5a7a92; }
.btn-status.active { background:#2a4a5a; border-color:#7aa5b9; color:#e6f0fa; }
.btn-status[data-status="Актуальна"], .btn-status[data-status="Active"] { border-left:3px solid #66d9b0; }
.btn-status[data-status="Закрыта"], .btn-status[data-status="Closed"] { border-left:3px solid #f2b07b; }
.btn-status[data-status="Снесена"], .btn-status[data-status="Demolished"] { border-left:3px solid #f28b82; }
.btn-status[data-status="Требует проверки"], .btn-status[data-status="Needs verification"] { border-left:3px solid #f7d97e; }
.btn-status.active[data-status="Актуальна"], .btn-status.active[data-status="Active"] { background:#1a3a2a; }
.btn-status.active[data-status="Закрыта"], .btn-status.active[data-status="Closed"] { background:#3a2a1a; }
.btn-status.active[data-status="Снесена"], .btn-status.active[data-status="Demolished"] { background:#3a1a1a; }
.btn-status.active[data-status="Требует проверки"], .btn-status.active[data-status="Needs verification"] { background:#3a3a1a; }
.btn-more { background:rgba(255,255,255,0.08); border:1px solid #3a4e62; border-radius:20px; padding:4px 16px; font-size:0.85rem; color:#b0c4d9; cursor:pointer; transition:background 0.2s, border-color 0.2s; line-height:1.8; margin-top:4px; width:100%; text-align:center; }
.btn-more:hover { background:rgba(255,255,255,0.18); border-color:#7aa5b9; color:#e6f0fa; }

.modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); backdrop-filter:blur(6px); z-index:3000; justify-content:center; align-items:center; animation:fadeIn 0.3s ease; }
.modal-overlay.active { display:flex; }
@keyframes fadeIn { from { opacity:0; transform:scale(0.96); } to { opacity:1; transform:scale(1); } }
.modal { background:#1a212b; border:1px solid #3a4e62; border-radius:20px; max-width:700px; width:92%; max-height:90vh; overflow-y:auto; padding:0 0 20px 0; box-shadow:0 16px 64px rgba(0,0,0,0.9); position:relative; color:#d0dbe8; }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:16px 24px; border-bottom:1px solid #2a3a4a; background:rgba(10,14,23,0.6); border-radius:20px 20px 0 0; position:sticky; top:0; z-index:10; backdrop-filter:blur(4px); }
.modal-header h2 { font-size:1.5rem; font-weight:600; letter-spacing:0.5px; background:linear-gradient(135deg,#b7e1f0,#7aa5b9); -webkit-background-clip:text; -webkit-text-fill-color:transparent; margin:0; }
.modal-close { background:none; border:none; color:#8a9aa8; font-size:2.2rem; cursor:pointer; transition:color 0.2s; line-height:1; }
.modal-close:hover { color:#e6f0fa; }
.modal-body { padding:20px 24px; }
.detail-section { margin-bottom:16px; }
.detail-section h3 { font-size:1.1rem; font-weight:500; color:#b7e1f0; border-bottom:1px solid #2a3a4a; padding-bottom:4px; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.detail-section p, .detail-section div { font-size:0.95rem; line-height:1.5; opacity:0.9; margin:4px 0; }
.detail-grid { display:grid; grid-template-columns:120px 1fr; gap:4px 12px; margin:6px 0; }
.detail-grid .label { opacity:0.7; }
.detail-grid .value { opacity:0.95; }

.inventory-figure { flex:0 0 180px; position:relative; min-height:320px; background:rgba(0,0,0,0.3); border-radius:16px; border:1px solid #2a3a4a; padding:16px 10px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.figure-container { position:relative; width:140px; height:280px; margin:0 auto; }
.figure-part { position:absolute; background:rgba(60,80,100,0.3); border:1px solid #4a6a7a; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:0.6rem; color:#8aafc0; text-shadow:0 0 6px rgba(0,0,0,0.8); text-align:center; padding:2px; box-sizing:border-box; }
.part-head { top:0; left:50%; transform:translateX(-50%); width:50px; height:50px; border-radius:50%; background:rgba(200,180,160,0.2); border-color:#7a8a7a; font-size:1.8rem; line-height:50px; background:transparent; }
.part-body { top:54px; left:50%; transform:translateX(-50%); width:70px; height:80px; border-radius:12px; border-color:#5a7a6a; background:rgba(40,60,70,0.3); }
.part-body .label { font-size:0.55rem; line-height:1.2; color:#8aafc0; }
.part-arm-left { top:60px; left:4px; width:22px; height:60px; border-radius:10px; border-color:#5a7a6a; }
.part-arm-right { top:60px; right:4px; width:22px; height:60px; border-radius:10px; border-color:#5a7a6a; }
.part-leg-left { bottom:10px; left:20px; width:26px; height:60px; border-radius:10px; border-color:#4a6a5a; }
.part-leg-right { bottom:10px; right:20px; width:26px; height:60px; border-radius:10px; border-color:#4a6a5a; }
.part-backpack { top:58px; left:50%; transform:translateX(-50%); width:56px; height:50px; border-radius:8px; border-color:#8a7a4a; background:rgba(80,60,30,0.3); font-size:0.5rem; color:#d0b87a; z-index:2; }
.tabs { display:flex; gap:6px; padding:12px 24px 0 24px; border-bottom:1px solid #2a3a4a; }
.tab-btn { background:rgba(255,255,255,0.04); border:1px solid #2a3a4a; border-bottom:none; padding:8px 20px; border-radius:12px 12px 0 0; color:#8a9aa8; font-weight:500; cursor:pointer; transition:background 0.2s, color 0.2s, border-color 0.2s; }
.tab-btn:hover { background:rgba(255,255,255,0.08); color:#b0c4d9; }
.tab-btn.active { background:#1a212b; color:#e6f0fa; border-color:#3a4e62; }
.tab-content { display:none; padding:20px 24px; }
.tab-content.active { display:flex; gap:30px; flex-wrap:wrap; }
.inventory-slots { flex:1; min-width:200px; }
.inventory-slots h3 { font-size:1.2rem; font-weight:500; color:#b7e1f0; margin-bottom:12px; border-bottom:1px solid #2a3a4a; padding-bottom:6px; }
.slot-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); gap:8px; }
.slot-item { background:rgba(0,0,0,0.3); border:1px solid #2a3a4a; border-radius:10px; padding:8px 6px; display:flex; align-items:center; gap:8px; transition:background 0.15s; }
.slot-item:hover { background:rgba(40,60,80,0.3); border-color:#4a6a7a; }
.slot-item .icon { font-size:1.6rem; line-height:1; }
.slot-item .info { display:flex; flex-direction:column; }
.slot-item .name { font-size:0.8rem; font-weight:500; color:#d0dbe8; }
.slot-item .qty { font-size:0.7rem; color:#6a8a9a; }

/* Стили для статуса */
/* Контейнер для кнопок статуса */
.popup-status-vote {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Кнопка "Подтвердить" */
.btn-vote-confirm {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.btn-vote-confirm:hover {
    background: #45a049;
}
.btn-vote-confirm:active {
    transform: scale(0.97);
}

/* Выпадающий список для смены статуса */
.btn-vote-change {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px;
}
.btn-vote-change:hover {
    border-color: #888;
}
.btn-vote-change:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Если нужно, чтобы селект был как кнопка (однородно) */
.btn-vote-change {
    background: #f0f0f0;
    color: #333;
}


/* Модальное окно "О проекте" */
#aboutModal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}
#aboutModal .about-body {
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
}
#aboutModal .about-body h3 {
    margin-top: 18px;
    color: #ffd700;
}
#aboutModal .about-body ul {
    padding-left: 20px;
}
#aboutModal .about-body a {
    color: #7aa5b9;
    text-decoration: none;
}
#aboutModal .about-body a:hover {
    text-decoration: underline;
}

/* Модалка контактов */
#contactsModal .modal-content {
    max-width: 500px;
}
.feedback-form .form-group {
    margin-bottom: 15px;
}
.feedback-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #ccc;
}
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}
.feedback-form input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: #7aa5b9;
}
.feedback-form .btn-submit {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}
.feedback-form .btn-submit:hover {
    background: #45a049;
}
.feedback-status {
    margin-top: 15px;
    font-weight: 600;
}
.feedback-status.success {
    color: #4CAF50;
}
.feedback-status.error {
    color: #f44336;
}


@media (max-width:700px) {
    .filter-panel { top:10px; right:10px; padding:10px; max-width:220px; }
    .filter-btn { font-size:0.75rem; padding:4px 12px; }
    .filter-btn .icon { font-size:1rem; }
    .header { padding:0 1rem; height:56px; flex-wrap:wrap; }
    .logo { font-size:1.2rem; }
    .nav-links { gap:1rem; font-size:0.85rem; }
    .footer { flex-direction:column; height:auto; padding:0.5rem 1rem; gap:4px; text-align:center; }
    .footer a { margin:0 0.5rem; }
    .modal { max-width:98%; }
    .tab-content.active { flex-direction:column; align-items:center; }
    .inventory-figure { width:100%; max-width:220px; }
    .detail-grid { grid-template-columns:1fr; gap:2px; }
}
@media (max-width:480px) {
    .nav-links a { font-size:0.75rem; }
    .filter-panel { top:8px; right:8px; padding:8px; gap:6px; max-width:200px; }
    .filter-btn { font-size:0.7rem; padding:4px 8px; }
    .filter-btn .icon { font-size:0.9rem; }
    .filter-select select { font-size:0.75rem; }
}

/* ===== Кнопка сворачивания ===== */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer; /* для мобильных */
}

.filter-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: transform 0.2s;
    display: none; /* по умолчанию скрыта, покажем только на мобильных */
}

/* На мобильных показываем кнопку */
@media (max-width: 768px) {
    .filter-toggle {
        display: block;
    }

    .filter-content {
        overflow: hidden;
        transition: max-height 0.3s ease;
        max-height: 500px; /* достаточно для раскрытого состояния */
    }

    /* Свёрнутое состояние */
    .filter-panel.collapsed .filter-content {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
    }

    .filter-panel.collapsed .filter-toggle {
        transform: rotate(180deg);
    }

    /* Чтобы панель не занимала лишнего места */
    .filter-panel.collapsed {
        padding-bottom: 0.5rem;
    }
}