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

:root {
  --bg: #030612;
  --bg-soft: #080d24;
  --surface: rgba(10, 15, 41, 0.75);
  --surface-border: rgba(124, 92, 255, 0.25);
  --surface-hover: rgba(124, 92, 255, 0.15);
  --glass: rgba(15, 23, 60, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glare: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  --text: #ffffff;
  --text-secondary: #a0a6cc;
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.3);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 24px;
  --radius-sm: 14px;
  --radius-xs: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px var(--primary-glow);
  --transition: 300ms cubic-bezier(0.23, 1, 0.32, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(124, 92, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(124, 92, 255, 0.04) 0%, transparent 70%);
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.18;
  z-index: 0; pointer-events: none; animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-1 { width: 500px; height: 500px; top: -150px; right: -100px; background: var(--primary); }
.orb-2 { width: 400px; height: 400px; bottom: -200px; left: -150px; background: var(--accent); animation-delay: -6s; }

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0.15; }
  50% { transform: translate(40px, 30px) scale(1.15); opacity: 0.25; }
  100% { transform: translate(-20px, 50px) scale(1); opacity: 0.15; }
}


/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 11, 30, 0.75);
  border-bottom: 1px solid rgba(124, 92, 255, 0.12);
  transition: background var(--transition);
}
.navbar-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  font-family: var(--font-display); font-weight: 900; font-size: 1.1rem;
  letter-spacing: 0.12em; color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-links { display: flex; gap: 8px; align-items: center; }
.navbar-links a {
  color: var(--text-secondary); text-decoration: none;
  font-weight: 600; font-size: 0.88rem; padding: 8px 14px;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.navbar-links a:hover { color: var(--text); background: var(--surface-hover); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; transition: all var(--transition);
  position: relative; overflow: hidden;
  z-index: 1;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--glass-glare); opacity: 0;
  transition: opacity var(--transition); z-index: -1;
}
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.btn:active { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { 
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.5); 
  filter: brightness(1.1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05); color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { 
  background: rgba(255, 255, 255, 0.1); 
  border-color: rgba(255, 255, 255, 0.2); 
}

.btn-outline {
  background: transparent; border: 1px solid rgba(0, 212, 255, 0.4);
  color: var(--accent);
}
.btn-outline:hover { 
  background: rgba(0, 212, 255, 0.1); 
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.btn-lg { padding: 18px 42px; font-size: 1.05rem; border-radius: 18px; }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }


/* ===== GLASS CARD ===== */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.card:hover { border-color: rgba(124, 92, 255, 0.35); }
.card-glow:hover { box-shadow: var(--shadow), var(--shadow-glow); }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); }
.form-input, .form-select {
  background: rgba(6, 11, 30, 0.8);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text); font-family: var(--font); font-size: 0.92rem;
  transition: all var(--transition); width: 100%;
}
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: rgba(155, 164, 196, 0.5); }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 200px; }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 80px; text-align: center;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.25; z-index: 0;
  filter: saturate(1.2) brightness(0.8);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(circle at 50% 50%, rgba(3,6,18,0) 0%, rgba(3,6,18,0.4) 40%, rgba(3,6,18,1) 100%);
}

.hero-content { 
  position: relative; z-index: 2; max-width: 900px; 
  animation: heroAppear 1s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes heroAppear {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-badge {
  display: inline-block; padding: 8px 20px;
  border-radius: 999px; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.25em; text-transform: uppercase;
  background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent); margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}
.hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 5rem); line-height: 1.05;
  margin-bottom: 24px; letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 60%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { 
  font-size: 1.25rem; color: var(--text-secondary); max-width: 640px; 
  margin: 0 auto 36px; line-height: 1.5;
  font-weight: 500;
}

.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-status {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-weight: 600; font-size: 0.88rem;
}

/* ===== STATUS DOT ===== */
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--warning);
  animation: statusPulse 2s infinite;
}
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,176,32,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(255,176,32,0); }
}

/* ===== SECTION ===== */
.section {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: 80px 24px;
}
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 10px;
}
.section-header p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 32px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  cursor: default; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--glass-glare); opacity: 0; transition: opacity var(--transition);
}
.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.1);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}
.feature-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }


/* ===== NEWS GRID ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.news-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(12px); transition: all var(--transition);
}
.news-card:hover { transform: translateY(-4px); border-color: rgba(0, 212, 255, 0.4); }
.news-tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; margin-bottom: 10px;
  background: rgba(124, 92, 255, 0.15); border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--primary);
}
.news-tag.event { background: rgba(0, 212, 255, 0.12); border-color: rgba(0, 212, 255, 0.35); color: var(--accent); }
.news-tag.patch { background: rgba(0, 230, 138, 0.12); border-color: rgba(0, 230, 138, 0.35); color: var(--success); }
.news-card h3 { font-size: 1rem; margin-bottom: 6px; }
.news-card p { color: var(--text-secondary); font-size: 0.88rem; }
.news-meta { font-size: 0.78rem; color: var(--text-secondary); margin-top: 8px; }

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  transition: all 300ms ease;
}
.gallery-grid img:hover { transform: scale(1.03); border-color: var(--accent); }
.gallery-controls { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.login-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 48px 40px; text-align: center;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px var(--primary-glow);
  max-width: 440px; width: 100%; position: relative; z-index: 2;
  animation: cardAppear 0.6s ease-out;
}
.login-card .logo {
  font-family: var(--font-display); font-weight: 900; font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 8px; }
.login-card .subtitle { color: var(--text-secondary); margin-bottom: 32px; font-size: 0.95rem; }
.login-divider {
  display: flex; align-items: center; gap: 12px; margin: 24px 0;
  color: var(--text-secondary); font-size: 0.82rem;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--glass-border);
}
.login-status { margin-top: 16px; font-size: 0.85rem; color: var(--text-secondary); min-height: 20px; }
.login-status.error { color: var(--danger); }

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

/* ===== DASHBOARD LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 260px; background: rgba(6, 11, 30, 0.9);
  border-right: 1px solid var(--glass-border);
  padding: 20px 0; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  backdrop-filter: blur(20px);
}
.sidebar-brand {
  font-family: var(--font-display); font-weight: 900; font-size: 1rem;
  letter-spacing: 0.1em; padding: 0 20px; margin-bottom: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none; display: block;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none;
  font-weight: 600; font-size: 0.88rem; transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--text); background: rgba(124, 92, 255, 0.1);
}
.sidebar-link.active { border-left: 3px solid var(--primary); }
.sidebar-link .icon { font-size: 1.1rem; width: 22px; text-align: center; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--glass-border); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: var(--text-secondary);
}
.sidebar-user img {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--glass-border); object-fit: cover;
}

.main-content {
  flex: 1; margin-left: 260px; padding: 28px 32px;
  min-height: 100vh;
}
.page-header {
  margin-bottom: 28px;
}
.page-header h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
.page-header p { color: var(--text-secondary); margin-top: 4px; }

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(12px); transition: all var(--transition);
}
.stat-card:hover { border-color: rgba(124, 92, 255, 0.35); }
.stat-label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; }
.stat-value {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-icon { font-size: 1.5rem; float: right; opacity: 0.5; }

/* ===== PRE / CODE ===== */
pre {
  margin-top: 12px; max-height: 300px; overflow: auto;
  background: rgba(3, 6, 18, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px;
  color: #a8b8e0; font-size: 0.8rem; line-height: 1.5;
}
code { color: var(--accent); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal-visible { opacity: 1; transform: translateY(0); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gap-row { display: flex; flex-wrap: wrap; gap: 10px; }
.flex-1 { flex: 1; }

/* ===== FOOTER ===== */
.footer {
  position: relative; z-index: 1;
  text-align: center; padding: 40px 24px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary); font-size: 0.85rem;
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--glass-border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; flex-direction: column; gap: 16px;
  color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar-links a:not(.btn) { display: none; }
  .hero { min-height: 80vh; padding: 80px 20px 40px; }
  .hero-title { font-size: 2rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 20px 16px; }
  .login-card { padding: 32px 24px; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ===== TOAST / NOTIFICATION ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px 20px;
  backdrop-filter: blur(16px); color: var(--text);
  font-size: 0.88rem; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease-out;
  max-width: 360px;
}
.toast.success { border-color: rgba(0, 230, 138, 0.4); }
.toast.error { border-color: rgba(255, 77, 109, 0.4); }

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