   /* style.css
   ใช้ทุกหน้า */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  position: relative;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    sans-serif;

  color: #e8ecff;

  background:
    radial-gradient(1200px 800px at 80% -10%, #1a1f5a 0%, transparent 60%),
    radial-gradient(1000px 700px at -10% 110%, #0a3b2f 0%, transparent 60%),
    #050814;

  overflow-x: hidden;
}

body::after {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: url("https://www.transparenttextures.com/patterns/stardust.png");
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Brand ---------- */

.brand {
  position: absolute;
  top: 18px;
  left: 24px;
  z-index: 10;
  text-decoration: none;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: 0.2s;
}

.brand:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ---------- Top Nav ---------- */

.top-right {
  position: absolute;
  top: 18px;
  right: 24px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.nav-top {
  text-decoration: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );

  font-size: 15px;
  font-weight: 600;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 95px;
  height: 46px;

  transition: 0.2s;
}

.nav-top:hover {
  transform: translateY(-2px);
}

.nav-top.active {
  background: #5e72eb;
}

/* ---------- Shared Button ---------- */

.btn-primary {
  border: none;
  cursor: pointer;
  color: #fff;
  background: #5e72eb;
  border-radius: 14px;
  transition: 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

/* ===============================
   MOBILE
=============================== */

@media (max-width: 768px) {
  body {
    padding: 12px;
    overflow: auto;
  }

  .brand {
    position: static;
    display: block;
    width: 100%;
    font-size: 44px;
    margin: 0 0 14px;
    text-align: left;
  }

  .top-right {
    position: static;
    width: 100%;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
  }

  .nav-top {
    flex: 1;
    min-width: 0;
    height: 42px;
    font-size: 15px;
    padding: 8px 12px;
  }
}
