@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-alt: #12151c;
  --panel: rgba(18, 21, 28, 0.9);
  --panel-soft: rgba(21, 25, 34, 0.7);
  --text: #f5f7fb;
  --muted: #b8c0d4;
  --red: #e53935;
  --yellow: #f3c85f;
  --line: rgba(255, 255, 255, 0.08);
  --glow: rgba(229, 57, 53, 0.35);
  --accent: var(--red);
  --ink: var(--text);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-ink: var(--text);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
}

body.theme-light {
  color-scheme: light;
  --bg: #f3f6fb;
  --bg-alt: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.75);
  --text: #1c2230;
  --muted: #4e5a6b;
  --line: rgba(27, 34, 48, 0.12);
  --glow: rgba(229, 57, 53, 0.2);
  --accent: var(--red);
  --ink: var(--text);
  --input-bg: rgba(0, 0, 0, 0.06);
  --input-ink: var(--text);
}

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

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1b1e28 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255, 225, 115, 0.18) 0%, transparent 40%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-orbs span {
  position: fixed;
  inset: auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  z-index: -1;
}

.bg-orbs span:nth-child(1) {
  top: -180px;
  left: -120px;
  background: rgba(229, 57, 53, 0.35);
}

.bg-orbs span:nth-child(2) {
  top: 30%;
  right: -220px;
  background: rgba(243, 200, 95, 0.25);
}

.bg-orbs span:nth-child(3) {
  bottom: -220px;
  left: 40%;
  background: rgba(60, 120, 255, 0.25);
}

a {
  color: inherit;
  text-decoration: none;
}

.highlight {
  color: var(--yellow);
  font-weight: 600;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(13, 15, 20, 0.95), rgba(13, 15, 20, 0.7));
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.brand img {
  width: 38px;
  height: 38px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--muted);
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--red);
}

.theme-toggle {
  position: relative;
  width: 64px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  cursor: pointer;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.5;
}

.theme-toggle .moon svg {
  fill: var(--muted);
  stroke: none;
}

.theme-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px var(--glow);
  transition: transform 0.25s ease;
}

body.theme-light .theme-thumb {
  transform: translateX(32px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  flex: 1 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  background: linear-gradient(145deg, rgba(18, 21, 28, 0.9), rgba(10, 12, 16, 0.7));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/img/Header_Banner.jpg') center/cover no-repeat;
  opacity: 0.2;
  z-index: 0;
}

.hero-content,
.hero-media {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  color: var(--red);
  margin: 0 0 16px;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.hero .highlight {
  color: var(--yellow);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
  background: var(--panel);
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--red);
  box-shadow: 0 12px 32px rgba(229, 57, 53, 0.3);
}

.rt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.rt-btn-danger {
  background: var(--red);
  border-color: transparent;
  box-shadow: 0 12px 32px rgba(229, 57, 53, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-media {
  display: grid;
  gap: 16px;
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.hero-card strong {
  color: var(--yellow);
}

.section {
  display: grid;
  gap: 24px;
}

.section h2 {
  font-family: "Oswald", sans-serif;
  color: var(--red);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
}

.section p {
  color: var(--muted);
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.card h3 {
  margin: 0;
  color: var(--yellow);
  font-size: 1.2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.stat strong {
  color: var(--yellow);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.download-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.download-card h3 {
  margin: 0;
  color: var(--red);
  font-family: "Oswald", sans-serif;
  font-size: 1.4rem;
}

.download-card .btn {
  margin-top: auto;
  justify-content: center;
}

.specs {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.specs span {
  display: flex;
  justify-content: space-between;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery img {
  border-radius: 10px;
  border: 1px solid var(--line);
  height: 72px;
  width: 100%;
  object-fit: cover;
}

.page-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.page-hero h1 {
  font-family: "Oswald", sans-serif;
  color: var(--red);
  margin: 0;
}

.page-hero .btn {
  width: fit-content;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 40px 24px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-brand img {
  width: 36px;
  height: 36px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-meta {
  display: flex;
  gap: 16px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  transform: translateY(0);
  border-color: rgba(255, 255, 255, 0.4);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 72px;
    right: 16px;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-toggle {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   AUTH PAGES (USER + ADMIN)
   These styles previously lived in admin/admin.css. They are now
   centralized here so /user/login.php etc keep their styling even
   without loading admin.css.
   ============================================================ */

.auth-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
}

.auth-layout {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px 48px;
  flex: 1;
}

.auth-card {
  width: min(420px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.auth-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.auth-card .field {
  margin-bottom: 12px;
}

.auth-card label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.auth-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--input-ink);
  caret-color: var(--input-ink);
}

.auth-card input:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--input-bg) inset;
  -webkit-text-fill-color: var(--input-ink);
  transition: background-color 9999s ease-out 0s;
  caret-color: var(--input-ink);
}

.auth-resend {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.auth-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-actions button {
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
}

.password-input {
  position: relative;
}

.password-input input[type="password"],
.password-input input[type="text"] {
  padding-right: 48px;
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
}

.toggle-visibility:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.password-feedback {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.password-counter {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}

.password-rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 12px;
}

.password-rules li {
  padding-left: 0;
}

.rule-status {
  font-weight: 600;
  margin-right: 6px;
}

.rule-ok .rule-status {
  color: #2f8f4e;
}

.rule-fail .rule-status {
  color: #d55b4c;
}

.password-success {
  margin-top: 6px;
  color: #2f8f4e;
  font-weight: 700;
}

.auth-links {
  margin-top: 12px;
  font-size: 13px;
}

.auth-links a {
  color: var(--accent);
}

.auth-error {
  background: rgba(229, 57, 53, 0.12);
  border: 1px solid rgba(229, 57, 53, 0.35);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.auth-success {
  background: rgba(47, 143, 78, 0.18);
  border: 1px solid rgba(47, 143, 78, 0.4);
  color: #bfe7bf;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.auth-tools {
  margin-top: 8px;
}

.auth-tools .button {
  background: #2d3a4b;
  color: #ffffff;
  text-decoration: none;
}

.cta-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cta-button {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #2d3a4b;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

.cta-button.primary {
  background: var(--accent);
  border-color: transparent;
}

.cta-button.secondary {
  background: transparent;
  color: var(--ink);
}
