:root {
  --bg: #070b12;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --lime-1: #f7fee7;
  --lime-2: #bef264;
  --lime-3: #a3e635;
  --lime-4: #84cc16;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.gate-page {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  width: 100%;
  min-height: 100dvh;
  padding: 2.5rem 1.25rem 6rem;
  background:
    radial-gradient(70% 45% at 50% -5%, rgba(163, 230, 53, .2), transparent 55%),
    radial-gradient(50% 40% at 100% 80%, rgba(190, 242, 100, .1), transparent 50%),
    radial-gradient(40% 30% at 0 60%, rgba(132, 204, 22, .1), transparent 45%),
    linear-gradient(165deg, #0b1220 0%, #070b12 48%, #05080e 100%);
}
/* lưới mờ */
.gate-page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(163, 230, 53, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 230, 53, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 75%);
}
/* vệt quét chạy dọc */
.gate-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background: linear-gradient(transparent 0%, rgba(163, 230, 53, .04) 50%, transparent 100%) 0 0 / 100% 220%;
  animation: scanline 8s linear infinite;
}

.gate-brand { position: relative; z-index: 1; text-align: center; }
.gate-brand-mark {
  margin: 0;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--lime-1) 0%, var(--lime-2) 40%, var(--lime-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 36px rgba(163, 230, 53, .35));
}
.gate-brand-sub {
  margin: .9rem 0 0;
  color: var(--muted);
  font-size: clamp(.95rem, 2.2vw, 1.08rem);
  font-weight: 500;
  letter-spacing: .01em;
}
.gate-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(190, 242, 100, .75);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.services {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  width: 100%;
  max-width: 760px;
}
@media (min-width: 768px) {
  .services { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; max-width: 980px; }
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.service-card:focus-visible { outline: 2px solid var(--lime-2); outline-offset: 4px; border-radius: 1.35rem; }

.circle-wrapper {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 2px;
  border-radius: 1.35rem;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(190, 242, 100, .8), rgba(163, 230, 53, .25) 45%, rgba(132, 204, 22, .2));
  box-shadow: 0 0 0 1px rgba(163, 230, 53, .2), 0 14px 40px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s;
}
.service-card:hover .circle-wrapper {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(190, 242, 100, .5), 0 22px 50px rgba(163, 230, 53, .28);
}
.portal-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(1.35rem - 2px);
  background: #0b1220;
}
.portal-link::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 45%, rgba(7, 11, 18, .55) 100%);
}
/* globes.js đặt kích thước cố định bằng style inline, ép cho quả cầu lấp đầy ô vuông */
.globe-canvas {
  display: block;
  width: 94% !important;
  height: 94% !important;
  flex: none;
  transition: transform .55s;
}
.service-card:hover .globe-canvas { transform: scale(1.08); }

.service-card h3 {
  margin: 0;
  color: var(--text);
  font-family: 'Sora', system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
}

/* Nút CSKH */
.cskh {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  border-radius: 999px;
  color: #0b1220;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--lime-2), var(--lime-4));
  box-shadow: 0 10px 30px rgba(163, 230, 53, .3);
}
.cskh svg { width: 18px; height: 18px; fill: currentColor; }

.fade-in { opacity: 0; animation: fade-in .4s ease-out forwards; }
.float-soft { animation: float-soft 4.8s ease-in-out infinite; }

@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes scanline { from { background-position: 0 0; } to { background-position: 0 -220%; } }

@media (prefers-reduced-motion: reduce) {
  .fade-in, .float-soft, .gate-page::after { animation: none; opacity: 1; }
}
