/* ============ TEMEL ============ */
#map { height: 100vh; width: 100%; z-index: 1; }
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ============ BAŞLIK ============ */
.header-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}
.header-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shine 8s infinite;
}
@keyframes shine {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30%, -30%); }
}

/* ============ FORM ============ */
.form-select, .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: all 0.2s;
    outline: none;
}
.form-select:focus, .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-select:disabled { background: #f9fafb; color: #9ca3af; cursor: not-allowed; }
.form-input::placeholder { color: #9ca3af; }

/* ============ BUTONLAR ============ */
.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: #9ca3af; cursor: not-allowed; box-shadow: none; }

/* ============ İPUCU ============ */
.tip-box {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 11px;
    color: #78350f;
    align-items: flex-start;
}
.tip-box i { margin-top: 2px; }

/* ============ BİLGİ KARTI ============ */
.info-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.info-card-header {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-grid {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.info-item {
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e0f2fe;
}
.info-item.highlight {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}
.info-label {
    display: block;
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.info-value {
    display: block;
    font-size: 13px;
    color: #1f2937;
    font-weight: 600;
    word-break: break-word;
}
.info-item.highlight .info-value { color: #92400e; font-size: 15px; }

/* ============ AKSİYON BUTONLARI ============ */
.action-buttons {
    padding: 0 12px 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.btn-action {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 4px;
    font-size: 10px;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}
.btn-action:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    transform: translateY(-1px);
}
.btn-action i { font-size: 12px; }

/* ============ SPINNER ============ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============ LEAFLET ============ */
.leaflet-control-layers {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: none !important;
    font-family: inherit !important;
}
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* ============ ÖZEL İŞARETÇİLER ============ */
.komsu-marker, .koord-marker { background: transparent; border: none; }

/* ============ MOBİL ============ */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        height: 100vh;
        width: 90% !important;
        max-width: 380px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
    }
    .sidebar.open { transform: translateX(0); }
    #map { height: 100vh; }
}

/* ============ SESLİ ASİSTAN ============ */
#reklamMetni {
    resize: vertical;
    min-height: 80px;
    font-size: 12px;
    line-height: 1.5;
    font-family: inherit;
}
#sesHizi { cursor: pointer; }

/* ============ MOBİL UYUMLULUK GÜÇLENDİRMESİ ============ */
/* iOS: 16px altı font input'ta otomatik zoom yapar — engelle */
@media (max-width: 768px) {
    .form-select, .form-input { font-size: 16px; }
}

/* Katman menüsü mobilde taşmasın */
@media (max-width: 768px) {
    .leaflet-control-layers-expanded {
        max-height: 45vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 13px;
    }
    .leaflet-control-layers-expanded .leaflet-control-layers-list {
        padding: 8px 12px;
    }
    .leaflet-control-layers label {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
    }
    .leaflet-control-layers input[type="radio"],
    .leaflet-control-layers input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    .leaflet-control-layers-toggle {
        width: 36px;
        height: 36px;
    }
}

/* Dokunma hedefleri minimum 44px (Apple/Google yönergesi) */
@media (max-width: 768px) {
    .btn-action { padding: 10px 4px; font-size: 11px; }
    .btn-action i { font-size: 14px; }
    .btn-primary { padding: 14px 20px; font-size: 15px; }
    #mobilToggle { width: 52px; height: 52px; opacity: 0.95; }
    .leaflet-bar a { width: 34px !important; height: 34px !important; line-height: 34px !important; }
    #sesliOkuBtn, #sesDurdurBtn { padding: 12px 9px !important; }
}

/* Sidebar gölge ve üst katman güvenliği */
@media (max-width: 768px) {
    .sidebar { box-shadow: 0 0 40px rgba(0,0,0,0.35); }
}

/* Popup'lar mobilde ekrana sığsın */
@media (max-width: 768px) {
    .leaflet-popup-content-wrapper { max-width: 78vw; }
    .leaflet-popup-content { margin: 10px 14px; font-size: 13px; }
}

/* Yatay modda sidebar dar ekranda taşmasın */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar { width: 70% !important; max-width: 420px; }
    .header-gradient { padding: 10px 14px; }
}

/* Bilgi kartları çok dar ekranda tek sütun */
@media (max-width: 380px) {
    .info-grid { grid-template-columns: 1fr; }
    .info-item.highlight { grid-column: auto; }
}

/* Haritada seçim/yakınlaşma çakışmasını önle */
.leaflet-container { touch-action: pan-x pan-y; -webkit-tap-highlight-color: transparent; }


/* ============ MOBİL MENÜ BUTONU - TEK GEÇERLİ KURAL ============ */
/* Konum burada; HTML'deki eski bottom/right sınıfları kaldırıldı */
#mobilToggle {
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    bottom: auto;
    z-index: 1001;
    width: 52px;
    height: 52px;
    opacity: 0.95;
}


/* ============ 🎬 DRONE MODU - SİNEMA BANTLARI ============ */
body.drone-modu::before,
body.drone-modu::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 9vh;
    background: #000;
    z-index: 3000;
    pointer-events: none;
    animation: droneBar 0.8s ease-out;
}
body.drone-modu::before { top: 0; }
body.drone-modu::after { bottom: 0; }
@keyframes droneBar {
    from { height: 0; }
    to { height: 9vh; }
}