@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;700;900&display=swap');

:root {
  --primary: #0F172A; /* Sangat Gelap / Modern Navy */
  --primary-light: #3B82F6; /* Biru Terang */
  --secondary: #F59E0B; /* Gold/Amber */
  --secondary-light: #FBBF24;
  --bg-color: #F8FAFC;
  --text-dark: #1E293B;
  --text-light: #F8FAFC;
  --text-muted: #64748B;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.1);
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  outline: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  min-height: 100vh;
  /* Latar belakang default, akan diganti JS jika admin mengubahnya */
  background-image: linear-gradient(135deg, #E2E8F0 0%, #FEF3C7 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  transition: background-image 0.5s ease;
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0) 30%, rgba(255,255,255,0) 70%, rgba(56,189,248,0.8));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.glass-panel:hover::before {
  opacity: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-area img {
  height: 50px;
  width: auto;
  background: transparent;
  border: none;
  box-shadow: none;
}

.logo-area h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-dark);
  margin-left: 0;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s, background-color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.nav-links .dropdown > span {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s, background-color 0.2s;
}

.nav-links .dropdown:hover > span {
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 14px 0 rgba(15, 23, 42, 0.3);
}

.btn-primary:hover {
  background-color: #1a2536;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.4);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--primary);
  box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
}

.nav-links a.btn {
  border: 1px solid rgba(148, 163, 184, 0.55);
  background-clip: padding-box;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  gap: 2rem;
}

.hero h2 {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInDown 0.8s ease-out;
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero .cta-buttons {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
  display: flex;
  gap: 1rem;
}

/* Page Transitions & Sections */
.page-section { display: none; margin-top: 2rem; animation: slideUp 0.4s ease-out; }
.page-section.active { display: block; }

/* CSS Menu Dropdown Murni & Elegan */
.dropdown { position: relative; display: inline-block; cursor: pointer; }
.dropdown-content { 
   display: none; position: absolute; top:100%; left:0; 
   background-color: rgba(255,255,255,0.95); min-width: 220px; 
   box-shadow: 0px 8px 24px rgba(0,0,0,0.1); z-index: 100; 
   border-radius: 8px; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.3);
   overflow: hidden; padding: 0.5rem 0;
}
.dropdown-content a { 
   color: #334155; padding: 12px 20px; text-decoration: none; 
   display: block; border-bottom: 1px solid #F1F5F9; font-size:0.95rem; font-weight:500;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: #F8FAFC; color: var(--primary); padding-left: 24px; transition: padding 0.2s ease; }
.dropdown:hover .dropdown-content { display: block; animation: slideUp 0.2s ease-out; }


/* Cards (Jalur Pendaftaran) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.path-card {
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.path-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.35;
  transition: opacity 0.4s ease;
  pointer-events: none;
  animation: bgShift 4s ease infinite;
}

@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.path-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

.path-card:hover::before {
  opacity: 1;
}

.path-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.path-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

@keyframes colorGlowSwap {
  0% { color: #fde047; text-shadow: 0 0 10px #facc15; }
  25% { color: #67e8f9; text-shadow: 0 0 10px #22d3ee; }
  50% { color: #86efac; text-shadow: 0 0 10px #4ade80; }
  75% { color: #f9a8d4; text-shadow: 0 0 10px #f472b6; }
  100% { color: #fde047; text-shadow: 0 0 10px #facc15; }
}

.title-animated {
  animation: colorGlowSwap 6s infinite alternate ease-in-out;
  font-weight: 800;
}

/* Form Styles */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

input, select, textarea {
  width: 100%;
  padding: 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid #CBD5E1;
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Rapor Table Grid */
.rapor-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.rapor-header {
  font-weight: bold;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-muted);
}

/* Map Area */
#map {
  height: 400px;
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #CBD5E1;
  z-index: 10;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Alert / Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background-color: #D1FAE5; color: #065F46; }
.badge-danger { background-color: #FEE2E2; color: #991B1B; }

/* Admin Dashboard Specific */
.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--primary);
  color: var(--text-light);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-sidebar h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
}

.sidebar-link {
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-link:hover, .sidebar-link.active {
  background-color: rgba(255,255,255,0.1);
  color: var(--text-light);
}

.admin-content {
  padding: 2rem 3rem;
  overflow-y: auto;
  position: relative;
  z-index: 1; /* Supaya input dropdown tidak tertutup */
}

/* Admin Toggles (Switch) */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-light); }
input:checked + .slider:before { transform: translateX(22px); }

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
}

th {
  background-color: #F8FAFC;
  font-weight: 600;
  color: var(--text-muted);
}

tr:hover {
  background-color: #F1F5F9;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print Only Styles (Cetak Bukti) */
@media print {
  body {
    background: white !important;
    min-height: auto;
  }
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .glass-panel {
    border: 1px solid #000;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: transparent;
  }
  .admin-sidebar {
    display: none;
  }
  .admin-content {
    padding: 0;
  }
}

.print-only {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h2 { font-size: 2.5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .navbar { flex-direction: column; gap: 1rem; }
  .nav-links { display: flex; flex-wrap: wrap; justify-content: center; margin-left: 0; gap: 1rem; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { flex-direction: row; flex-wrap: wrap; padding: 1rem; justify-content: center; }
  .admin-sidebar h2 { display: none; }
  .admin-content { padding: 1rem; }
  .rapor-grid {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    font-size: 0.75rem;
  }
  .form-container {
    padding: 1.5rem;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Modifikasi Admin Area - Solid Background (Non-Transparan) */
.admin-content .glass-panel,
#admin-login-screen.glass-panel {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* =========================================
   TEMA FUTURISTIK & NEON GLOW (BERANDA)
   ========================================= */

/* Logo Bebas Latar Hitam (Hologram Effect) */
.futuristic-logo {
  width: 140px !important;
  background: transparent !important;
  mix-blend-mode: screen; /* Menghapus warna hitam pekat menjadi transparan */
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.5));
  animation: floatHologram 4s ease-in-out infinite;
}

@keyframes floatHologram {
  0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.5)); }
  50% { transform: translateY(-12px) scale(1.03); filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.9)); }
  100% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.5)); }
}

/* Judul Utama Menyala Benerang */
.hero h2 {
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  letter-spacing: 1px;
}
.neon-text {
  color: #38bdf8 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 0 30px rgba(56, 189, 248, 0.5), 0 0 50px rgba(2, 132, 199, 0.5);
  display: inline-block;
  margin-top: 10px;
}
@keyframes colorGlowSwap {
  0% { color: #fdfaf6; text-shadow: 0 0 10px #38bdf8, 0 0 20px #38bdf8; }
  50% { color: #ffffff; text-shadow: 0 0 10px #a78bfa, 0 0 30px #8b5cf6; }
  100% { color: #fdfaf6; text-shadow: 0 0 10px #34d399, 0 0 20px #10b981; }
}

/* Slogan Lebih Terang & Modern */
.hero-desc-neon {
  color: #F8FAFC !important;
  font-weight: 500;
  font-size: clamp(1rem, 3vw, 1.3rem) !important;
  line-height: 1.7;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  border-left: 4px solid #38bdf8;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 0 12px 12px 0;
  max-width: 650px;
  margin: 1.5rem auto;
}

/* Tombol Aksi Futuristik (Cyberpunk Vibe) */
.btn-neon {
  background: linear-gradient(45deg, #0284c7, #3b82f6) !important;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5) !important;
  border: 1px solid rgba(125, 211, 252, 0.5) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease !important;
}
.btn-neon:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.8), inset 0 0 10px rgba(255,255,255,0.3) !important;
  background: linear-gradient(45deg, #0369a1, #2563eb) !important;
  color: #fff !important;
}

.btn-outline-neon {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(10px);
  color: #38bdf8 !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease !important;
}
.btn-outline-neon:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6) !important;
  color: #ffffff !important;
  transform: scale(1.05) translateY(-2px);
}
