/* ============================================================
   SilsilahKeluarga — Global Styles
   Digunakan sebagai pelengkap Tailwind CSS
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --gen-1: #f59e0b;
  --gen-2: #22c55e;
  --gen-3: #3b82f6;
  --gen-4: #a855f7;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #16a34a, #15803d);
}

/* --- Animated Background --- */
.animated-bg {
  background: linear-gradient(-45deg, #f0fdf4, #fef9c3, #dcfce7, #fef3c7);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

@keyframes gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Glass Effect --- */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, #22c55e 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Stat Card Shimmer --- */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}
.stat-card:hover::before { left: 100%; }
.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* --- Feature Card --- */
.feature-card { transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.feature-card:hover .feature-icon { transform: scale(1.1); }
.feature-icon { transition: transform 0.3s ease; display: inline-block; }

/* --- Member Card --- */
.member-card {
  background: rgba(255,255,255,0.85);
  border-radius: 20px;
  padding: 20px;
  border: 2px solid #bbf7d0;
  transition: all 0.3s ease;
}
.member-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.1);
  border-color: #4ade80;
}

/* --- Search Results Dropdown --- */
#navbar-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  border: 1px solid #e2e8f0;
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
}
.search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  transition: background 0.2s;
}
.search-result-item:hover { background: #f0fdf4; color: #15803d; }
.search-result-item:first-child { border-radius: 16px 16px 0 0; }
.search-result-item:last-child  { border-radius: 0 0 16px 16px; }

/* --- Mobile Drawer --- */
.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(220,252,231,0.6);
  background: rgba(255,255,255,0.95);
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s;
}
.mobile-drawer a:hover,
.mobile-drawer a.active { background: #f0fdf4; color: #15803d; }

/* --- Pohon Visual Page --- */
body.page-tree {
  background: linear-gradient(160deg, #1a3a1a 0%, #14532d 30%, #166534 60%, #1e4620 100%);
}

/* --- Toolbar Buttons (pohon.html) --- */
.toolbar-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toolbar-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
.toolbar-btn:active { transform: scale(0.95); }

/* --- Legend Panel (pohon.html) --- */
.legend-panel {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* --- Member Detail Panel (pohon.html) --- */
.detail-panel {
  position: absolute;
  top: 80px; right: 16px;
  width: 280px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  padding: 20px;
  z-index: 30;
  animation: slideUp 0.3s ease-out;
}

/* --- Keyframes --- */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
