:root {
  --bg: #0a0f1c;
  --bg-soft: #141b2d;
  --text: #e8ecf7;
  --muted: #8b95ab;
  --primary: #0ea5e9; /* sky blue */
  --primary-600: #0284c7;
  --accent: #f97316;  /* orange */
  --card: rgba(255,255,255,0.07);
  --card-stroke: rgba(255,255,255,0.08);
  --ring: rgba(14,165,233,.35);
  --shadow: 0 8px 24px rgba(0,0,0,.3);
}

body {
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  background:
    linear-gradient(135deg, rgba(14,165,233,.05), transparent 60%),
    linear-gradient(220deg, rgba(249,115,22,.07), transparent 70%),
    var(--bg);
  color: var(--text);
}

.card {
  border-radius: 1rem;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-stroke);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.35); }

.card .card-img-top { height: 220px; object-fit: cover; }

header h1 { font-weight: 800; font-size: 2rem; color: var(--primary); }
header p { color: var(--muted); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  border: none;
}
.btn-success { background: linear-gradient(135deg, #22c55e, #15803d); border: none; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); border: none; }

.badge {
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: .5rem;
}

.table { color: var(--text); }
.table th { color: var(--muted); }

/* Theme palette and UI enhancements
   Indigo + Cyan, glass cards, soft shadows, rounded borders
*/
:root {
  --indigo: #4f46ba;
  --cyan: #06b6d4;
  --bg: #ffffff;
  --text: #111;
  --card-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 6px 16px rgba(0,0,0,.08);
  --radius: 12px;
}
[data-theme="dark"] {
  --bg: #3b5998;
  --text: #e5e7eb;
  --card-bg: rgba(20, 20, 28, 0.92);
  --shadow: 0 10px 20px rgba(0,0,0,.6);
}
html, body {
  background: var(--bg);
  color: var(--text);
}
body, .card, .table {
  border-radius: var(--radius);
}
.card {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.08);
  backdrop-filter: saturate(180%) blur(6px);
}
a, .btn {
  text-decoration: none;
}
input, textarea, select {
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 8px;
  padding: .55rem .75rem;
  background: rgba(255,255,255,0.9);
  transition: box-shadow .2s ease, border-color .2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
}
.btn {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--cyan) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,.08);
}
.btn:hover { filter: brightness(1.05); }
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,.35); }

table {
  border-collapse: separate;
  border-spacing: 0;
}
table th, table td {
  padding: .5rem .75rem;
  vertical-align: middle;
}
table thead th {
  background: rgba(0,0,0,.03);
  color: #1f2937;
  font-weight: 600;
}
[data-theme="dark"] table thead th { color: #e5e7eb; }

[data-theme="dark"] body { color: #e5e7eb; }

/* Image modal glass effect (if modal exists) */
.modal-content {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(6px);
  border: 1px solid rgba(0,0,0,.08);
}
[data-theme="dark"] .modal-content {
  background: rgba(20,20,28,.95);
  color: #e5e7eb;
}
@media (prefers-color-scheme: dark) {
  :root { /* respect system preference by storing into localStorage? handled by toggle */ }
}

/* Visual polish: ensure background animation shows on desktop and header content is aligned to the top */
#particles-js behind the page content
#particles-js { position: fixed; width: 100%; height: 100vh; top: 0; left: 0; z-index: 0; pointer-events: none; }

main.container.position-relative { position: relative; z-index: 1; }

/* Visual polish: ensure background animation shows on desktop and header content is aligned to the top */
#particles-js { position: fixed; width: 100%; height: 100vh; top: 0; left: 0; z-index: 0; pointer-events: none; }

/* Ensure main content starts at the top on large screens (desktop) */
@media (min-width: 1024px) {
 body { padding-top: 0; }
}

/* Ensure the main content starts at the top on large screens, keeping mobile centering intact */ 
@media (min-width: 1024px) {
  body { padding-top: 0; }
  main.container.position-relative { display: block; margin-top: 0; }
}
