:root {
  --bg: #0f1218;
  --panel: #171b24;
  --panel-2: #202736;
  --text: #e7eef8;
  --muted: #a9b5c9;
  --accent: #ff4655;
  --accent-2: #00d1b2;
  --danger: #d93a4a;
  --border: #2e374a;
  --font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  --custom-bg-image: none;
}

html.smooth-scroll {
  scroll-behavior: smooth;
}

html.light-mode {
  --bg: #edf2f8;
  --panel: #ffffff;
  --panel-2: #f6f9fc;
  --text: #111827;
  --muted: #4b5563;
  --border: #d1d9e6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text);
  background:
    linear-gradient(rgba(10, 12, 18, 0.72), rgba(10, 12, 18, 0.72)),
    var(--custom-bg-image),
    radial-gradient(circle at top right, #192131 0%, var(--bg) 50%);
  background-size: cover, cover, 200% 200%;
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

body.animated-bg {
  animation: bgPulse 16s ease-in-out infinite;
}

body.particles-bg::before,
body.particles-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.particles-bg::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 26px 26px, 40px 40px;
  background-position: 0 0, 20px 20px;
  animation: particlesFloat 30s linear infinite;
}

body.particles-bg::after {
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06), transparent 45%),
              radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05), transparent 35%);
  animation: particlesPulse 12s ease-in-out infinite;
}

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

@keyframes particlesFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-120px); }
}

@keyframes particlesPulse {
  0% { opacity: 0.5; }
  50% { opacity: 0.95; }
  100% { opacity: 0.5; }
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 16, 0.22);
  z-index: 0;
  pointer-events: none;
}

.header,
.top-banner,
.main,
.footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--text);
  text-decoration: none;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 18, 24, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.logo {
  font-weight: 800;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.main {
  padding: 28px 0 46px;
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.hero {
  background: linear-gradient(160deg, #1b2333 0%, #121722 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 24px;
}

.lead {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stack {
  display: grid;
  gap: 14px;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: linear-gradient(120deg, var(--accent), #ff6f61);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.btn-small {
  padding: 8px 12px;
}

.btn-danger {
  background: linear-gradient(120deg, var(--danger), #ff5a5a);
}

.btn-outline {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric {
  font-size: 32px;
  font-weight: 700;
}

.flash-wrap {
  margin-bottom: 12px;
}

.flash {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.flash-success {
  border-color: #2e7d5f;
  background: rgba(0, 209, 178, 0.12);
}

.flash-error {
  border-color: #8a3142;
  background: rgba(217, 58, 74, 0.14);
}

.badge {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
}

.image-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.media-el {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e121a;
}

.top-banner {
  margin-top: 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #1b2333 0%, #121722 100%);
}

.top-banner-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.top-banner-content {
  padding: 16px 18px;
}

.top-banner-content h2 {
  margin: 0 0 8px;
}

.top-banner-content p {
  margin: 0;
  color: var(--muted);
}

.card-caption {
  margin-top: 8px;
  color: var(--muted);
}

.admin-auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.admin-auth {
  width: min(460px, 92%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}
