/* ==========================================================================
   ROTADO GENEL STİL DOSYASI (sytle.css)
   ========================================================================== */

:root {
  --primary-color: #2e7d32;
  --primary-hover: #1b5e20;
  --secondary-color: #0288d1;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --danger-color: #e53935;
  --danger-hover: #c62828;
  --success-color: #43a047;
  --verified-color: #1da1f2;
  --radius: 12px;
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: #f1f5f9;
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 15px 20px;
}

/* Üst Menü (Navbar) */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 14px 24px;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.brand-logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary { 
  background: var(--primary-color); 
  color: #fff; 
}
.btn-primary:hover { 
  background: var(--primary-hover); 
}

.btn-outline { 
  background: #ffffff; 
  border-color: var(--border-color); 
  color: var(--text-main); 
}
.btn-outline:hover { 
  background: #f8fafc; 
  border-color: #cbd5e1; 
}

.btn-danger { 
  background: var(--danger-color); 
  color: #fff; 
}
.btn-danger:hover { 
  background: var(--danger-hover); 
}

/* Harita Alanı (index.php) */
#map {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-bottom: 25px;
  border: 2px solid #ffffff;
  z-index: 10;
}

/* Filtre & Kart Kapsayıcısı */
.filter-box {
  background: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

/* Avlak Kartları Izgarası (index.php) */
.spot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.spot-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.spot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* Rozetler */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-pending { 
  background-color: #fef3c7; 
  color: #b45309; 
}
.badge-approved { 
  background-color: #dcfce7; 
  color: #15803d; 
}
.badge-cat { 
  background-color: #e0f2fe; 
  color: #0369a1; 
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 4px;
  display: inline-block;
}
.badge-verified { 
  color: var(--verified-color); 
  font-weight: bold; 
  font-size: 0.95rem; 
  margin-left: 3px; 
}

/* Modal Açılır Pencereler (Giriş/Kayıt) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 440px;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
}

.form-control:focus {
  border-color: var(--primary-color);
}

/* İstatistik Özet Kartları (Admin) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Panel Kartı & Tablolar (Admin) */
.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04);
  padding: 24px;
  margin-bottom: 30px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.rotado-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.rotado-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-color);
}

.rotado-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
  color: var(--text-main);
  vertical-align: middle;
}

.rotado-table tr:hover {
  background-color: #f8fafc;
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

.search-control {
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  background: #ffffff;
}
.search-control:focus {
  border-color: var(--primary-color);
}

/* Toast Bildirim */
.rotado-alert {
  position: fixed;
  top: 25px;
  right: 25px;
  padding: 14px 22px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  z-index: 10000;
}
.alert-success { background: var(--success-color); }
.alert-error { background: var(--danger-color); }
/* ==========================================================================
   SOSYAL MEDYA BİLDİRİM ROZETLERİ (BADGES)
   ========================================================================== */
.nav-btn-with-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #ef4444; /* Canlı bildirim kırmızısı */
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  border: 2px solid #ffffff;
  animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  line-height: 1;
  z-index: 5;
}

@keyframes badgePop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
/* ==========================================================================
   ROTADO TAM MOBİL UYUMLULUK & UYGULAMA GÖRÜNÜMÜ KATMANI (RESPONSIVE)
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Mobil Alt Gezinme Çubuğu (Varsayılan olarak masaüstünde gizli) */
.mobile-bottom-nav {
    display: none;
}

/* Bildirim Rozetleri Konumlandırması */
.nav-btn-with-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   TABLET VE TELEFON EKRANLARI (768px ve Altı)
   ========================================================================== */
@media (max-width: 768px) {
    /* Alt navigasyon barı için sayfa altına boşluk bırak */
    body {
        padding-bottom: 76px !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 12px !important;
    }

    /* Üst Navbar: Sadece Logo ve varsa Çıkış/Giriş kalsın, sayfa linkleri alt bara iniyor */
    .navbar {
        padding: 12px 14px !important;
        margin-bottom: 14px !important;
        border-radius: 12px !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .brand-logo {
        font-size: 1.25rem !important;
    }

    /* Üstteki kalabalık menü butonlarını mobilde gizle (Alt barda görünecek) */
    .navbar .nav-links a[href*="index.php"],
    .navbar .nav-links a[href*="profil.php"],
    .navbar .nav-links a[href*="arkadaslar.php"],
    .navbar .nav-links a[href*="sohbet.php"] {
        display: none !important;
    }

    /* Mobil Alt Uygulama Barını Aktifleştir */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-color, #e2e8f0);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 0 6px;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 600;
        gap: 3px;
        padding: 6px 0;
        position: relative;
        transition: all 0.2s ease;
    }

    .mobile-nav-item .nav-icon {
        font-size: 1.3rem;
        line-height: 1;
    }

    .mobile-nav-item.active {
        color: var(--primary-color, #16a34a);
        font-weight: 700;
    }

    .mobile-nav-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 22px);
        background: #ef4444;
        color: #fff;
        font-size: 0.65rem;
        font-weight: 800;
        min-width: 17px;
        height: 17px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border: 2px solid #ffffff;
    }

    /* Harita Alanı Yüksekliği (Telefonda parmakla rahat kaydırma için) */
    #map {
        height: 58vh !important;
        min-height: 340px !important;
        border-radius: 12px !important;
    }

    /* Kart ve Grid Yapıları Tek Sütuna İner */
    .spot-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .panel-card {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    /* Arkadaş Kartları ve Kullanıcı Değiştirme Barı */
    .user-switch-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        font-size: 0.82rem !important;
    }

    .user-switch-bar select {
        width: 100% !important;
    }

    .friend-card {
        flex-wrap: wrap !important;
        padding: 12px !important;
        gap: 10px !important;
    }

    .friend-card > div:last-child {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        border-top: 1px solid #f1f5f9;
        padding-top: 8px;
        margin-top: 2px;
    }

    /* Formlar ve Inputlar (iOS/Android Otomatik Zoom Engellemek İçin 16px) */
    .form-control, input[type="text"], input[type="email"], input[type="password"], select, textarea {
        font-size: 16px !important;
        padding: 10px 12px !important;
    }

    /* Modallar (Alttan Kayarak Açılan Bottom Sheet Görünümü) */
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-content, .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 88vh !important;
        overflow-y: auto !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 20px 16px !important;
        margin: 0 !important;
        animation: slideUpMobile 0.25s ease-out !important;
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Admin Tabloları İçin Yatay Kaydırma Koruması */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* Küçük Telefon Ekranları (480px ve Altı) */
@media (max-width: 480px) {
    .profile-hero {
        padding: 18px 14px !important;
        gap: 14px !important;
    }

    /* Arama ve Aktivite Kayıt Formlarında Butonların Alt Satıra Esnemesi */
    form[onsubmit*="handleActivitySubmit"] {
        flex-direction: column !important;
    }

    form[onsubmit*="handleActivitySubmit"] button {
        width: 100% !important;
        justify-content: center;
    }
}