* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Tahoma', sans-serif;
}

.mobile-app {
    max-width: 400px;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 25px 50px -12px rgba(0, 82, 212, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.header {
    padding: 16px 18px 8px 18px;
    border-bottom: 1px solid rgba(0, 82, 212, 0.15);
    flex-shrink: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    width: 120px;
}

.icon-btn {
    background: rgba(0, 82, 212, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 30px;
    font-size: 20px;
    cursor: pointer;
    color: #0052D4;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 20px 18px;
}

.explore-header {
    background: linear-gradient(135deg, #0052D4, #4364F7, #6FB1FC);
    border-radius: 24px;
    padding: 16px 20px;
    margin-bottom: 16px;
    color: white;
}

.explore-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.explore-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.explore-text h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.explore-text p {
    font-size: 12px;
    opacity: 0.9;
}

.explore-stats {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== پاپ آپ اختصاصی ========== */

/* پاپ آپ خطا */
.error-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.error-popup-container {
    background: white;
    border-radius: 28px;
    width: 85%;
    max-width: 320px;
    padding: 24px 20px;
    text-align: center;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body.dark .error-popup-container {
    background: #1e293b;
}

.error-popup-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.error-popup-icon i {
    font-size: 32px;
    color: white;
}

.error-popup-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

body.dark .error-popup-title {
    color: #f1f5f9;
}

.error-popup-message {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.error-popup-btn {
    background: linear-gradient(135deg, #0052D4, #4364F7);
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.error-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 212, 0.3);
}

/* پاپ آپ جزئیات کسب و کار */
.business-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.business-popup-container {
    background: white;
    border-radius: 28px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body.dark .business-popup-container {
    background: #1e293b;
}

.business-popup-header {
    background: linear-gradient(135deg, #0052D4, #4364F7);
    padding: 20px;
    text-align: center;
    position: relative;
}

.business-popup-header i {
    font-size: 40px;
    color: white;
    margin-bottom: 8px;
}

.business-popup-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.business-popup-category {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 30px;
}

.business-popup-body {
    padding: 20px;
}

.business-popup-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.business-popup-stars {
    display: flex;
    gap: 3px;
}

.business-popup-stars i {
    font-size: 14px;
    color: #fbbf24;
}

.business-popup-rating span {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

body.dark .business-popup-rating span {
    color: #e2e8f0;
}

.business-popup-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 20px;
}

body.dark .business-popup-desc {
    color: #94a3b8;
}

.business-popup-actions {
    display: flex;
    gap: 12px;
}

.business-popup-detail-btn {
    flex: 2;
    background: linear-gradient(135deg, #0052D4, #4364F7);
    border: none;
    padding: 10px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.business-popup-detail-btn:hover {
    transform: translateY(-2px);
    gap: 10px;
}

.business-popup-close-btn {
    flex: 1;
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 10px;
    border-radius: 40px;
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .business-popup-close-btn {
    border-color: #334155;
    color: #94a3b8;
}

.business-popup-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 40px;
}

#exploreMap {
    height: 55vh;
    min-height: 300px;
    width: 100% !important;
    border-radius: 24px;
    overflow: hidden;
    background-color: #e2e8f0;
    margin-top: 8px;
    z-index: 1;
}

#exploreMap canvas,
#exploreMap .mapboxgl-canvas,
.mapboxgl-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ========== پنل اطلاعات اکتشاف - حالت روشن (پیش‌فرض) ========== */
.explore-info-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 14px 18px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(0, 82, 212, 0.15);
    transition: all 0.3s ease;
}

.info-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0052D4, #4364F7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.info-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.info-text span {
    font-size: 11px;
    color: #64748b;
}

/* ========== حالت دارک ========== */
body.dark .explore-info-panel {
    background: rgba(20, 25, 45, 0.95);
    border: 1px solid rgba(0, 82, 212, 0.25);
}

body.dark .info-text strong {
    color: #f1f5f9;
}

body.dark .info-text span {
    color: #94a3b8;
}

/* دکمه بازگشت - حالت روشن */
#backToCitiesBtn {
    background: rgba(0, 82, 212, 0.1);
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    color: #0052D4;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

#backToCitiesBtn:hover {
    background: rgba(0, 82, 212, 0.2);
    transform: translateX(-2px);
}

/* دکمه بازگشت - حالت دارک */
body.dark #backToCitiesBtn {
    background: rgba(0, 82, 212, 0.25);
    color: #6FB1FC;
}

body.dark #backToCitiesBtn:hover {
    background: rgba(0, 82, 212, 0.4);
}

body.dark #backToCitiesBtn:hover {
    background: rgba(0, 82, 212, 0.4);
}

.bottom-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 82, 212, 0.15);
    padding: 10px 24px 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 20px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: #0052D4;
    transform: translateY(-3px);
}

/* استایل سفارشی برای نشانگرها */
.custom-city-marker,
.custom-district-marker {
    background: transparent !important;
    border: none !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    direction: rtl !important;
    text-align: center !important;
}

.leaflet-tooltip {
    background-color: rgba(0, 0, 0, 0.75) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
}