@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #070a13;
  --bg-card: rgba(13, 19, 38, 0.7);
  --bg-card-hover: rgba(20, 29, 58, 0.85);
  --border-neon: rgba(37, 99, 235, 0.3);
  --border-neon-hover: rgba(59, 130, 246, 0.6);
  --primary-blue: #2563eb;
  --bright-blue: #3b82f6;
  --cyan-accent: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  background-color: #050811;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: -15px; left: -15px; right: -15px; bottom: -15px;
  background-image: linear-gradient(180deg, rgba(5, 8, 17, 0.82) 0%, rgba(7, 10, 20, 0.72) 50%, rgba(5, 8, 17, 0.90) 100%), url('/images/school_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: blur(10px) brightness(0.85) saturate(1.1);
  transform: scale(1.08);
  z-index: -1;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #070a13;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

/* Neon Glow Utilities */
.neon-glow-blue {
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.45);
}
.neon-glow-blue-lg {
  box-shadow: 0 0 50px rgba(37, 99, 235, 0.55);
}
.neon-glow-cyan {
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.text-gradient-blue {
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(13, 19, 38, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(20, 29, 58, 0.85);
  border-color: rgba(59, 130, 246, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 99, 235, 0.25);
}

.glass-nav {
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

/* Glowing Badges */
.badge-neon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Modal Overlay & Animation */
.modal-overlay {
  background: rgba(3, 5, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.animate-modal {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.admin-modal-1920 {
  position: relative;
  overflow: hidden;
  max-width: 1920px;
  width: 98vw;
  height: 94vh;
  margin: auto;
  border-radius: 1.5rem;
  background: rgba(8, 13, 28, 0.85) !important;
  border: 1px solid rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 0 80px rgba(37, 99, 235, 0.4), 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.admin-modal-1920::before {
  content: "";
  position: absolute;
  inset: -20px;
  background-image: linear-gradient(135deg, rgba(8, 13, 28, 0.68) 0%, rgba(5, 9, 20, 0.82) 100%), url('/images/school_bg.png');
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.85) saturate(1.1);
  transform: scale(1.1);
  z-index: 0;
  pointer-events: none;
}

.admin-modal-1920 > * {
  position: relative;
  z-index: 1;
}

/* Drag & Drop Aesthetic Image Uploader Box */
.image-dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.4);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.image-dropzone:hover, .image-dropzone.dragover {
  border-color: #3b82f6;
  background: rgba(37, 99, 235, 0.15);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.image-preview-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-top: 0.75rem;
}

/* Hero Screen Glow Mockup Frame */
.hero-frame {
  position: relative;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 50px rgba(37, 99, 235, 0.3);
}

/* Input Fields */
.input-dark {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.input-dark:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

/* Language Switcher Buttons */
.lang-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  transition: all 0.2s ease;
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
}

.lang-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

/* Masterpiece Device Mode Styles: Smartphone Frame Simulator */
body.device-mobile-mode {
  max-width: 420px !important;
  margin: 25px auto !important;
  border-radius: 2.5rem !important;
  border: 10px solid #1e293b !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(37, 99, 235, 0.4) !important;
  overflow-x: hidden !important;
  position: relative !important;
}

body.device-mobile-mode header {
  max-width: 400px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-radius: 0 0 1.25rem 1.25rem !important;
}

body.device-mobile-mode .grid {
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

body.device-mobile-mode nav.hidden.lg\:flex {
  display: none !important;
}

body.device-mobile-mode button.lg\:hidden {
  display: flex !important;
}

body.device-mobile-mode h1 { font-size: 1.75rem !important; line-height: 2.2rem !important; }
body.device-mobile-mode h2 { font-size: 1.4rem !important; }
body.device-mobile-mode h3 { font-size: 1.15rem !important; }

/* Dynamic High-Contrast Light Mode Theme Rules */
body.light-mode {
  background-color: #eef6ff;
  color: #0f172a;
}

body.light-mode::before {
  background-image: linear-gradient(180deg, rgba(238, 245, 255, 0.88) 0%, rgba(220, 235, 255, 0.80) 50%, rgba(238, 245, 255, 0.92) 100%), url('/images/school_bg.png');
  filter: blur(8px) brightness(1.02) saturate(1.15);
}

/* Light Mode Header & Nav Links */
body.light-mode .glass-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(147, 197, 253, 0.5) !important;
  box-shadow: 0 4px 25px rgba(37, 99, 235, 0.08) !important;
}

body.light-mode nav a {
  color: #1e293b !important;
  font-weight: 700 !important;
}

body.light-mode nav a:hover {
  color: #2563eb !important;
}

/* Light Mode High-Contrast Gradients & Texts */
body.light-mode .text-gradient-blue,
body.light-mode .text-gradient-cyan {
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 55%, #2563eb 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.light-mode .text-white {
  color: #0f172a !important;
}

body.light-mode .text-slate-300, 
body.light-mode .text-slate-400 {
  color: #334155 !important;
}

/* Light Mode Cards, Hero Frame & Boxes */
body.light-mode .glass-card,
body.light-mode .hero-frame {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(147, 197, 253, 0.7) !important;
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.08) !important;
}

body.light-mode .glass-card:hover {
  background: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.16) !important;
}

body.light-mode .bg-slate-950, 
body.light-mode .bg-slate-900,
body.light-mode .bg-slate-950\/90,
body.light-mode .bg-slate-950\/80,
body.light-mode .bg-slate-950\/70,
body.light-mode .bg-slate-950\/60,
body.light-mode .bg-slate-900\/60,
body.light-mode .bg-slate-900\/95,
body.light-mode .bg-blue-950\/30 {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #93c5fd !important;
}

body.light-mode #hero-quote-text {
  color: #0f172a !important;
  font-weight: 700 !important;
}

body.light-mode #hero-quote-author {
  color: #2563eb !important;
  font-weight: 800 !important;
}

body.light-mode .border-slate-800,
body.light-mode .border-slate-900 {
  border-color: rgba(191, 219, 254, 0.8) !important;
}

body.light-mode .input-dark,
body.light-mode input[type="text"],
body.light-mode input[type="password"],
body.light-mode textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #93c5fd !important;
  font-weight: 600 !important;
}

body.light-mode .input-dark::placeholder,
body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #64748b !important;
}

body.light-mode footer {
  background-color: rgba(235, 243, 255, 0.95) !important;
  border-top: 1px solid rgba(147, 197, 253, 0.6) !important;
  color: #334155 !important;
}

body.light-mode footer #footer-school-name {
  color: #0f172a !important;
}

/* Masterpiece Admin Panel Light & Dark Theme Styling */
.admin-modal-1920 {
  background: rgba(8, 13, 28, 0.96) !important;
}

body.light-mode .admin-modal-1920 {
  background: #ffffff !important;
  border: 2px solid #93c5fd !important;
  box-shadow: 0 25px 80px rgba(37, 99, 235, 0.25) !important;
}

body.light-mode .admin-modal-1920::before {
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.90) 100%), url('/images/school_bg.png') !important;
  filter: blur(10px) brightness(1.05) saturate(1.1) !important;
}

/* Executive Header Top Bar inside Admin Modal */
.admin-modal-1920 > div:first-child {
  background-color: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
}

body.light-mode .admin-modal-1920 > div:first-child {
  background-color: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.admin-modal-1920 > div:first-child h3 {
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.light-mode .admin-modal-1920 > div:first-child h3 {
  color: #0f172a !important;
  font-weight: 900 !important;
}

body.light-mode .admin-modal-1920 > div:first-child span.text-slate-400 {
  color: #64748b !important;
}

.admin-modal-1920 > div:first-child button[onclick="handleAdminLogout()"] {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4) !important;
}

.admin-modal-1920 > div:first-child button[onclick="closeAdminPanelModal()"] {
  color: #cbd5e1 !important;
}

body.light-mode .admin-modal-1920 > div:first-child button[onclick="closeAdminPanelModal()"] {
  color: #64748b !important;
}

.admin-modal-1920 > div:first-child button[onclick="closeAdminPanelModal()"]:hover {
  color: #ffffff !important;
}

body.light-mode .admin-modal-1920 > div:first-child button[onclick="closeAdminPanelModal()"]:hover {
  color: #0f172a !important;
}

/* Executive Tabs Bar inside Admin Modal */
.admin-modal-1920 > div:nth-child(2) {
  background-color: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
}

body.light-mode .admin-modal-1920 > div:nth-child(2) {
  background-color: #f1f5f9 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.admin-modal-1920 > div:nth-child(2) button {
  color: #cbd5e1 !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}

body.light-mode .admin-modal-1920 > div:nth-child(2) button {
  color: #475569 !important;
  font-weight: 700 !important;
}

.admin-modal-1920 > div:nth-child(2) button:hover {
  color: #ffffff !important;
}

body.light-mode .admin-modal-1920 > div:nth-child(2) button:hover {
  color: #2563eb !important;
  background-color: #e0f2fe !important;
}

.admin-modal-1920 > div:nth-child(2) button.border-blue-500 {
  color: #ffffff !important;
  background-color: #2563eb !important;
  border-bottom: 3px solid #60a5fa !important;
  font-weight: 900 !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
}

body.light-mode .admin-modal-1920 > div:nth-child(2) button.border-blue-500 {
  color: #ffffff !important;
  background-color: #2563eb !important;
  border-bottom: 3px solid #1d4ed8 !important;
  font-weight: 900 !important;
}

/* Masterpiece Input Labels & Form Body inside Admin Modal */
.admin-modal-1920 h4 {
  color: #60a5fa !important;
  font-weight: 900 !important;
}

body.light-mode .admin-modal-1920 h4 {
  color: #0f172a !important;
  font-weight: 900 !important;
  border-bottom-color: #cbd5e1 !important;
}

.admin-modal-1920 label {
  color: #93c5fd !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

body.light-mode .admin-modal-1920 label {
  color: #1e40af !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* Image Dropzone Box Styling */
.image-dropzone {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 2px dashed rgba(59, 130, 246, 0.5) !important;
  border-radius: 0.85rem !important;
  padding: 1.5rem !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.image-dropzone:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: #3b82f6 !important;
}

/* Light Mode Image Dropzone & CRUD Modal Masterpiece Overrides */
body.light-mode .image-dropzone {
  background: #f0f7ff !important;
  border: 2px dashed #3b82f6 !important;
  color: #1e40af !important;
}

body.light-mode .image-dropzone:hover {
  background: #e0f2fe !important;
  border-color: #2563eb !important;
}

body.light-mode .image-dropzone span.text-slate-400 {
  color: #475569 !important;
  font-weight: 600 !important;
}

body.light-mode #crud-modal {
  background: rgba(220, 235, 255, 0.85) !important;
  backdrop-filter: blur(12px) !important;
}

body.light-mode #crud-modal > div {
  background: #ffffff !important;
  border: 2px solid #93c5fd !important;
  box-shadow: 0 25px 80px rgba(37, 99, 235, 0.25) !important;
  color: #0f172a !important;
}

body.light-mode #crud-modal h3 {
  color: #0f172a !important;
  font-weight: 900 !important;
}

body.light-mode #crud-modal label {
  color: #1e40af !important;
  font-weight: 800 !important;
}

body.light-mode #crud-modal button[onclick="closeCrudModal()"] {
  color: #64748b !important;
}

body.light-mode #crud-modal button[onclick="closeCrudModal()"]:hover {
  color: #0f172a !important;
}

/* Contact Info Text Visibility in Light Mode */
body.light-mode #contact-address-text,
body.light-mode #contact-phone-text,
body.light-mode #contact-email-text,
body.light-mode #contact-hours-text {
  color: #0f172a !important;
  font-weight: 700 !important;
}
