/* ==========================================================================
   Zona Hiburan
   Dashboard game/app publik yang terisolasi dari tema utama website.
   ========================================================================== */

.ent-page-hero,
.ent-main,
.ent-profile-modal,
.ent-toast {
  --ent-bg: #08111f;
  --ent-bg-soft: #0b1626;
  --ent-panel: #101d2f;
  --ent-panel-2: #14243a;
  --ent-panel-3: #182a43;
  --ent-line: rgba(179, 205, 235, .12);
  --ent-line-strong: rgba(179, 205, 235, .22);
  --ent-text: #f4f8fc;
  --ent-text-soft: #a9b9cb;
  --ent-text-muted: #73869c;
  --ent-primary: #5ea8ff;
  --ent-primary-strong: #2f7ee2;
  --ent-cyan: #4fd7e5;
  --ent-violet: #a58bff;
  --ent-amber: #f4bf62;
  --ent-green: #5ed6a1;
  --ent-red: #ff7b86;
  --ent-radius-lg: 24px;
  --ent-radius-md: 17px;
  --ent-radius-sm: 12px;
  --ent-shadow-lg: 0 30px 70px rgba(0, 5, 14, .36);
  --ent-shadow-md: 0 18px 40px rgba(0, 5, 14, .24);
  --ent-shadow-sm: 0 10px 24px rgba(0, 5, 14, .18);
  color: var(--ent-text);
}

.ent-page-hero *,
.ent-main *,
.ent-profile-modal *,
.ent-toast * {
  box-sizing: border-box;
}

.ent-page-hero [hidden],
.ent-main [hidden],
.ent-profile-modal [hidden],
.ent-toast[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Hero and dashboard navigation
   -------------------------------------------------------------------------- */

.ent-page-hero {
  position: relative;
  overflow: hidden;
  padding: 1rem 0 3.1rem;
  background:
    radial-gradient(circle at 8% 12%, rgba(65, 139, 231, .18), transparent 28%),
    radial-gradient(circle at 92% 7%, rgba(77, 216, 229, .11), transparent 24%),
    linear-gradient(180deg, #0a1727 0%, var(--ent-bg) 100%);
}

.ent-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(157, 193, 228, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 193, 228, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 20%, transparent 92%);
}

.ent-page-hero::after {
  content: "";
  position: absolute;
  top: 90px;
  right: -220px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(112, 176, 247, .08);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(112, 176, 247, .025),
    0 0 0 120px rgba(112, 176, 247, .018);
  pointer-events: none;
}

.ent-page-hero .container,
.ent-main .container {
  position: relative;
  z-index: 1;
}

.ent-section-nav {
  display: flex;
  width: min(100%, 760px);
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: 0 auto 1.4rem;
  padding: .35rem;
  border: 1px solid var(--ent-line);
  border-radius: 16px;
  background: rgba(12, 25, 42, .86);
  box-shadow:
    0 16px 40px rgba(0, 7, 18, .22),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(16px);
}

.ent-section-nav a {
  display: inline-flex;
  min-height: 42px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  padding: .55rem .78rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ent-text-soft);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-section-nav a i {
  font-size: .92rem;
}

.ent-section-nav a:hover {
  color: var(--ent-text);
  border-color: var(--ent-line);
  background: rgba(255, 255, 255, .035);
  transform: translateY(-1px);
}

.ent-section-nav a.active {
  color: #fff;
  border-color: rgba(103, 170, 249, .25);
  background:
    linear-gradient(180deg, rgba(87, 157, 241, .28), rgba(48, 108, 185, .16));
  box-shadow:
    0 8px 18px rgba(27, 93, 174, .18),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

.ent-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, .68fr);
  gap: 1.15rem;
  align-items: stretch;
  scroll-margin-top: 110px;
}

.ent-hero-copy,
.ent-profile-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ent-line);
  border-radius: 28px;
  box-shadow: var(--ent-shadow-lg);
}

.ent-hero-copy {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.6rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 85% 20%, rgba(71, 141, 231, .18), transparent 25%),
    linear-gradient(145deg, rgba(18, 34, 55, .98), rgba(11, 23, 40, .98));
}

.ent-hero-copy::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -70px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(137, 190, 250, .09);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(137, 190, 250, .025),
    0 0 0 76px rgba(137, 190, 250, .018);
  pointer-events: none;
}

.ent-hero-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .045), transparent 24%),
    linear-gradient(to top, rgba(255, 255, 255, .018), transparent 35%);
}

.ent-hero-copy > * {
  position: relative;
  z-index: 1;
}

.ent-live-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}

.ent-overline,
.ent-eyebrow,
.ent-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #8fb6e0;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .115em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ent-overline {
  padding: .38rem .65rem;
  border: 1px solid rgba(101, 169, 247, .2);
  border-radius: 999px;
  background: rgba(62, 128, 210, .1);
  color: #cfe5ff;
}

.ent-live-indicator,
.ent-profile-status {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  color: var(--ent-text-muted);
  font-size: .7rem;
  font-weight: 700;
}

.ent-live-indicator i,
.ent-profile-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ent-green);
  box-shadow: 0 0 0 4px rgba(94, 214, 161, .12);
}

.ent-hero-copy h1 {
  max-width: 820px;
  margin: 1.1rem 0 .9rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.65rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.04;
}

.ent-hero-copy > p {
  max-width: 68ch;
  margin: 0;
  color: var(--ent-text-soft);
  font-size: clamp(.96rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}

.ent-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.45rem;
}

.ent-hero-actions .btn,
.ent-box-card .btn {
  min-height: 48px;
}

.ent-btn-primary,
.ent-btn-secondary,
.ent-btn-quiet,
.ent-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 12px;
  font-weight: 750;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.ent-btn-primary {
  border: 1px solid rgba(143, 199, 255, .25);
  background: linear-gradient(180deg, var(--ent-primary), var(--ent-primary-strong));
  color: #fff;
  box-shadow:
    0 12px 24px rgba(35, 110, 205, .24),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.ent-btn-primary:hover,
.ent-btn-primary:focus-visible {
  border-color: rgba(180, 218, 255, .42);
  background: linear-gradient(180deg, #73b5ff, #3c89eb);
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 15px 30px rgba(35, 110, 205, .3),
    inset 0 1px 0 rgba(255, 255, 255, .24);
}

.ent-btn-secondary {
  border: 1px solid var(--ent-line-strong);
  background: rgba(255, 255, 255, .045);
  color: var(--ent-text);
}

.ent-btn-secondary:hover,
.ent-btn-secondary:focus-visible {
  border-color: rgba(149, 195, 244, .32);
  background: rgba(255, 255, 255, .075);
  color: #fff;
  transform: translateY(-1px);
}

.ent-btn-primary:disabled,
.ent-btn-secondary:disabled,
.ent-btn-quiet:disabled,
.ent-play-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ent-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  max-width: 650px;
  margin-top: 1.45rem;
}

.ent-hero-metrics > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .6rem;
  align-items: center;
  padding: .68rem .72rem;
  border: 1px solid var(--ent-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

.ent-metric-icon {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 10px;
  background: rgba(94, 168, 255, .1);
  color: #9dcbff;
  font-size: .86rem;
}

.ent-hero-metrics strong {
  overflow: hidden;
  color: var(--ent-text);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-hero-metrics small {
  overflow: hidden;
  color: var(--ent-text-muted);
  font-size: .64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Player profile
   -------------------------------------------------------------------------- */

.ent-profile-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  padding: 1.3rem;
  background:
    radial-gradient(circle at 85% 10%, rgba(82, 164, 250, .14), transparent 25%),
    linear-gradient(180deg, rgba(19, 35, 56, .98), rgba(12, 24, 41, .98));
}

.ent-profile-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -85px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(151, 198, 247, .07);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(151, 198, 247, .018);
  pointer-events: none;
}

.ent-profile-card > * {
  position: relative;
  z-index: 1;
}

.ent-profile-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--ent-line);
  color: var(--ent-text-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ent-profile-topline > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
}

.ent-profile-loading {
  min-height: 290px;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  color: var(--ent-text-soft);
  font-size: .84rem;
  text-align: center;
}

#entProfileContent {
  display: flex;
  min-height: 300px;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.ent-player-row {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.ent-player-name {
  min-width: 0;
}

.ent-player-name small {
  display: block;
  margin-bottom: .16rem;
  color: var(--ent-text-muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.ent-player-name strong {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: var(--ent-text);
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#entFeaturedBadgePill {
  width: max-content;
  max-width: 180px;
  margin-top: .3rem;
  overflow: hidden;
  padding: .22rem .45rem;
  border: 1px solid rgba(244, 191, 98, .18);
  border-radius: 999px;
  background: rgba(244, 191, 98, .08);
  color: #f7d28e;
  font-size: .62rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border: 2px solid rgba(173, 205, 240, .18);
  border-radius: 18px;
  background:
    linear-gradient(145deg, #f9fcff, #dce9f7);
  color: #3477ca;
  box-shadow:
    0 12px 24px rgba(0, 6, 16, .24),
    inset 0 1px 0 #fff;
  font-size: 1.45rem;
}

.ent-avatar.ent-frame-green {
  border-color: var(--ent-green);
  box-shadow: 0 0 0 3px rgba(94, 214, 161, .12), var(--ent-shadow-sm);
}

.ent-avatar.ent-frame-blue {
  border-color: var(--ent-primary);
  box-shadow: 0 0 0 3px rgba(94, 168, 255, .12), var(--ent-shadow-sm);
}

.ent-avatar.ent-frame-gold {
  border-color: var(--ent-amber);
  box-shadow: 0 0 0 3px rgba(244, 191, 98, .12), var(--ent-shadow-sm);
}

.ent-profile-divider {
  height: 1px;
  margin: 1.15rem 0;
  background: var(--ent-line);
}

.ent-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.ent-stat-grid > div {
  min-width: 0;
  padding: .75rem;
  border: 1px solid var(--ent-line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

.ent-stat-grid span {
  display: block;
  overflow: hidden;
  color: var(--ent-text);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-stat-grid small {
  display: block;
  margin-top: .1rem;
  color: var(--ent-text-muted);
  font-size: .63rem;
  font-weight: 650;
}

.ent-icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ent-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: var(--ent-text-soft);
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-icon-button:hover,
.ent-icon-button:focus-visible {
  border-color: rgba(119, 183, 250, .3);
  background: rgba(94, 168, 255, .1);
  color: #cfe5ff;
  transform: translateY(-1px);
}

.ent-profile-error,
.ent-form-error {
  margin-top: 1rem;
  padding: .72rem .8rem;
  border: 1px solid rgba(255, 123, 134, .25);
  border-radius: 12px;
  background: rgba(255, 123, 134, .08);
  color: #ffc0c6;
  font-size: .78rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Main dashboard shell
   -------------------------------------------------------------------------- */

.ent-main {
  position: relative;
  overflow: hidden;
  padding: 2.7rem 0 5rem;
  background:
    radial-gradient(circle at 100% 20%, rgba(50, 111, 191, .08), transparent 26%),
    linear-gradient(180deg, #08111f 0%, #07101c 100%);
}

.ent-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(157, 193, 228, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 193, 228, .025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 75%);
}

.ent-workspace-head,
.ent-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.ent-workspace-head {
  margin-bottom: 1.15rem;
}

.ent-workspace-head h2,
.ent-section-head h2,
.ent-card-head h2,
.ent-stage-head h2 {
  margin: .24rem 0 0;
  color: var(--ent-text);
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.025em;
}

.ent-workspace-head p,
.ent-section-head p,
.ent-card-title-group p {
  margin: .35rem 0 0;
  color: var(--ent-text-muted);
  font-size: .83rem;
  line-height: 1.55;
}

.ent-workspace-badge,
.ent-section-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
  padding: .48rem .7rem;
  border: 1px solid var(--ent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  font-size: .69rem;
  font-weight: 700;
}

.ent-workspace-badge i {
  color: var(--ent-green);
}

.ent-section-chip i {
  color: var(--ent-primary);
}

.ent-disabled-state {
  display: flex;
  max-width: 760px;
  align-items: flex-start;
  gap: .85rem;
  margin: 2rem auto;
  padding: 1.1rem;
  border: 1px solid var(--ent-line);
  border-radius: var(--ent-radius-md);
  background: var(--ent-panel);
  box-shadow: var(--ent-shadow-md);
}

.ent-disabled-state > i {
  color: var(--ent-primary);
  font-size: 1.35rem;
}

.ent-disabled-state strong {
  display: block;
  color: var(--ent-text);
}

.ent-disabled-state p {
  margin: .25rem 0 0;
  color: var(--ent-text-soft);
  font-size: .84rem;
}

.ent-dashboard-grid,
.ent-bottom-grid {
  display: grid;
  gap: 1rem;
}

.ent-dashboard-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
  margin-bottom: 3.3rem;
}

.ent-bottom-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
}

.ent-card,
.ent-game-card,
.ent-stage-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ent-line);
  border-radius: var(--ent-radius-lg);
  background:
    linear-gradient(180deg, rgba(17, 31, 50, .98), rgba(12, 24, 40, .98));
  box-shadow: var(--ent-shadow-md);
}

.ent-card::before,
.ent-game-card::before,
.ent-stage-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, .04), transparent 22%),
    linear-gradient(to top, rgba(255, 255, 255, .015), transparent 32%);
}

.ent-card > *,
.ent-game-card > *,
.ent-stage-wrap > * {
  position: relative;
  z-index: 1;
}

.ent-card {
  padding: 1.35rem;
}

.ent-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ent-card-title-group {
  min-width: 0;
}

.ent-card-kicker i {
  color: var(--ent-primary);
  font-size: .75rem;
}

.ent-mission-summary {
  min-width: 108px;
  padding: .62rem .72rem;
  border: 1px solid var(--ent-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .026);
  text-align: right;
}

.ent-mission-summary strong {
  display: block;
  color: var(--ent-text);
  font-size: 1rem;
  font-weight: 850;
}

.ent-mission-summary span {
  display: block;
  margin-top: .12rem;
  color: var(--ent-green);
  font-size: .62rem;
  font-weight: 700;
}

.ent-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.15rem 0 .42rem;
  color: var(--ent-text-muted);
  font-size: .64rem;
  font-weight: 650;
}

.ent-progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .03);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
}

.ent-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ent-primary-strong), var(--ent-cyan));
  box-shadow: 0 0 18px rgba(79, 215, 229, .28);
  transition: width .45s ease;
}

.ent-mission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .95rem;
}

.ent-mission-item {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: .6rem;
  padding: .65rem .72rem;
  border: 1px solid var(--ent-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
  color: var(--ent-text-soft);
  font-size: .78rem;
  font-weight: 650;
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-mission-item i {
  color: var(--ent-text-muted);
}

.ent-mission-item.done {
  border-color: rgba(94, 214, 161, .18);
  background: rgba(94, 214, 161, .06);
  color: #dff9ee;
}

.ent-mission-item.done i {
  color: var(--ent-green);
}

.ent-skeleton {
  height: 42px;
  border-radius: 11px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  background-size: 220% 100%;
  animation: entSkeleton 1.35s linear infinite;
}

.ent-box-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 12%, rgba(244, 191, 98, .12), transparent 32%),
    linear-gradient(180deg, rgba(25, 37, 53, .98), rgba(14, 25, 40, .98));
}

.ent-box-visual {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.ent-box-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(244, 191, 98, .16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 24px rgba(244, 191, 98, .04),
    0 0 0 10px rgba(244, 191, 98, .025);
}

.ent-box-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(244, 191, 98, .22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(244, 191, 98, .2), rgba(244, 191, 98, .08));
  color: #ffd58b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font-size: 1.35rem;
}

.ent-box-card h2 {
  margin: .28rem 0 .45rem;
  color: var(--ent-text);
  font-size: 1.45rem;
  font-weight: 800;
}

.ent-box-card p {
  margin: 0 0 1rem;
  color: var(--ent-text-soft);
  font-size: .8rem;
  line-height: 1.55;
}

.ent-box-card.is-opened .ent-box-icon {
  border-color: rgba(94, 214, 161, .25);
  background: rgba(94, 214, 161, .1);
  color: var(--ent-green);
}

.ent-box-card .ent-btn-primary {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Sections and interactive cards
   -------------------------------------------------------------------------- */

.ent-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 105px;
}

.ent-section-head {
  margin-bottom: 1rem;
}

.ent-interactive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ent-interactive-card {
  min-width: 0;
  min-height: 330px;
  display: flex;
  flex-direction: column;
}

.ent-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: 1rem;
}

.ent-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--ent-line);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  font-size: 1.1rem;
}

.ent-card-icon.is-cyan {
  border-color: rgba(79, 215, 229, .18);
  background: rgba(79, 215, 229, .08);
  color: #80e7f0;
}

.ent-card-icon.is-violet {
  border-color: rgba(165, 139, 255, .18);
  background: rgba(165, 139, 255, .08);
  color: #c1b0ff;
}

.ent-card-icon.is-amber {
  border-color: rgba(244, 191, 98, .18);
  background: rgba(244, 191, 98, .08);
  color: #f8d495;
}

.ent-card-number {
  color: rgba(179, 205, 235, .2);
  font-size: 1.9rem;
  font-weight: 850;
  letter-spacing: -.05em;
}

.ent-interactive-card h3 {
  margin: .35rem 0 .8rem;
  color: var(--ent-text);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
}

.ent-interactive-card p {
  color: var(--ent-text-soft);
  font-size: .8rem;
  line-height: 1.65;
}

.ent-poll-content,
#entStoryContent {
  margin-top: auto;
}

.ent-poll-options,
.ent-story-choices {
  display: grid;
  gap: .5rem;
}

.ent-poll-option,
.ent-story-choice {
  width: 100%;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .64rem .7rem;
  border: 1px solid var(--ent-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  text-align: left;
  font-size: .76rem;
  font-weight: 650;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-poll-option:hover:not(:disabled),
.ent-story-choice:hover:not(:disabled) {
  border-color: rgba(94, 168, 255, .28);
  background: rgba(94, 168, 255, .07);
  color: var(--ent-text);
  transform: translateY(-1px);
}

.ent-poll-option:disabled,
.ent-story-choice:disabled {
  opacity: .56;
  cursor: default;
  transform: none;
}

.ent-poll-result {
  margin-bottom: .62rem;
}

.ent-poll-result-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .32rem;
  color: var(--ent-text-soft);
  font-size: .72rem;
}

.ent-poll-result-head strong {
  color: var(--ent-text);
}

.ent-poll-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
}

.ent-poll-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ent-primary-strong), var(--ent-cyan));
}

.ent-poll-meta {
  margin-top: .72rem;
  color: var(--ent-text-muted);
  font-size: .68rem;
}

.ent-story-copy {
  margin: 0 0 .85rem !important;
}

.ent-story-ending {
  padding: .8rem;
  border: 1px solid rgba(94, 214, 161, .16);
  border-radius: 12px;
  background: rgba(94, 214, 161, .05);
  color: var(--ent-text-soft);
}

.ent-story-ending small {
  display: block;
}

.ent-story-ending .btn {
  border-color: rgba(94, 168, 255, .28);
  color: #b8d9ff;
}

.ent-story-ending .btn:hover {
  background: rgba(94, 168, 255, .1);
  color: #fff;
}

.ent-fact-card #entFactText {
  flex: 1;
  margin-bottom: 1rem;
}

.ent-btn-quiet {
  width: 100%;
  min-height: 42px;
  justify-content: space-between;
  padding-inline: .75rem;
  border: 1px solid var(--ent-line);
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  font-size: .76rem;
}

.ent-btn-quiet:hover,
.ent-btn-quiet:focus-visible {
  border-color: rgba(94, 168, 255, .28);
  background: rgba(94, 168, 255, .07);
  color: var(--ent-text);
}

/* --------------------------------------------------------------------------
   Game library
   -------------------------------------------------------------------------- */

.ent-game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ent-game-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: .72rem;
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.ent-game-card:hover {
  border-color: rgba(117, 179, 247, .2);
  box-shadow: var(--ent-shadow-lg);
  transform: translateY(-4px);
}

.ent-game-card.disabled {
  opacity: .54;
}

.ent-game-cover {
  position: relative;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: .85rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 17px;
}

.ent-game-cover::before {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -60px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .022);
}

.ent-game-cover > * {
  position: relative;
  z-index: 1;
}

.cover-quiz {
  background:
    radial-gradient(circle at 82% 16%, rgba(79, 215, 229, .18), transparent 28%),
    linear-gradient(145deg, #16344b, #102637);
}

.cover-memory {
  background:
    radial-gradient(circle at 82% 16%, rgba(165, 139, 255, .19), transparent 28%),
    linear-gradient(145deg, #2d2b50, #1d203b);
}

.cover-puzzle {
  background:
    radial-gradient(circle at 82% 16%, rgba(94, 214, 161, .16), transparent 28%),
    linear-gradient(145deg, #183c36, #112b2a);
}

.cover-wheel {
  background:
    radial-gradient(circle at 82% 16%, rgba(244, 191, 98, .18), transparent 28%),
    linear-gradient(145deg, #47351f, #2f261d);
}

.ent-game-type {
  width: max-content;
  padding: .28rem .48rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(8, 17, 31, .22);
  color: rgba(255, 255, 255, .72);
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ent-game-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  font-size: 1.25rem;
}

.ent-game-index {
  position: absolute;
  right: .85rem;
  bottom: .65rem;
  color: rgba(255, 255, 255, .18);
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -.08em;
}

.ent-game-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: .85rem .3rem .3rem;
}

.ent-game-copy h3 {
  margin: 0 0 .42rem;
  color: var(--ent-text);
  font-size: 1.02rem;
  font-weight: 800;
}

.ent-game-copy p {
  margin: 0;
  color: var(--ent-text-muted);
  font-size: .75rem;
  line-height: 1.55;
}

.ent-game-status {
  margin-top: auto;
  padding-top: .72rem;
  color: var(--ent-text-muted);
  font-size: .66rem;
  font-weight: 650;
}

.ent-game-status.done {
  color: var(--ent-green);
}

.ent-play-btn {
  min-height: 43px;
  justify-content: space-between;
  margin-top: .55rem;
  padding-inline: .75rem;
  border: 1px solid var(--ent-line);
  background: rgba(255, 255, 255, .035);
  color: var(--ent-text-soft);
  font-size: .76rem;
}

.ent-play-btn:hover,
.ent-play-btn:focus-visible {
  border-color: rgba(112, 179, 250, .28);
  background: rgba(94, 168, 255, .08);
  color: #fff;
}

.ent-play-btn i {
  transition: transform .18s ease;
}

.ent-play-btn:hover i {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   In-page game stage
   -------------------------------------------------------------------------- */

.ent-stage-wrap {
  margin: -1.9rem 0 3.5rem;
  padding: 1.15rem;
  scroll-margin-top: 105px;
  background:
    radial-gradient(circle at 90% 0%, rgba(94, 168, 255, .08), transparent 24%),
    linear-gradient(180deg, rgba(18, 33, 53, .99), rgba(10, 21, 36, .99));
}

.ent-stage-wrap.is-opening {
  animation: entStageIn .28s ease both;
}

.ent-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
  padding: .15rem .2rem;
}

.ent-close-stage {
  border-color: rgba(255, 123, 134, .16);
  color: #ffabb3;
}

.ent-close-stage:hover,
.ent-close-stage:focus-visible {
  border-color: rgba(255, 123, 134, .3);
  background: rgba(255, 123, 134, .08);
  color: #ffd1d5;
}

.ent-stage {
  min-height: 260px;
  padding: clamp(1rem, 3vw, 1.7rem);
  border: 1px solid var(--ent-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(48, 106, 181, .07), transparent 34%),
    rgba(5, 13, 24, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.ent-game-shell {
  max-width: 860px;
  margin: 0 auto;
}

.ent-list-loading,
.ent-empty {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  color: var(--ent-text-muted);
  font-size: .77rem;
  line-height: 1.55;
  text-align: center;
}

.ent-quiz-question {
  max-width: 720px;
  margin: 0 auto 1.15rem;
  color: var(--ent-text);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.ent-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.ent-quiz-option {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: .7rem;
  padding: .72rem;
  border: 1px solid var(--ent-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  text-align: left;
  font-size: .78rem;
  font-weight: 650;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-quiz-option .letter {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid var(--ent-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: var(--ent-text);
  font-weight: 850;
}

.ent-quiz-option:hover:not(:disabled) {
  border-color: rgba(94, 168, 255, .3);
  background: rgba(94, 168, 255, .07);
  color: var(--ent-text);
  transform: translateY(-1px);
}

.ent-quiz-option.correct {
  border-color: rgba(94, 214, 161, .35);
  background: rgba(94, 214, 161, .08);
  color: #e3faef;
}

.ent-quiz-option.wrong {
  border-color: rgba(255, 123, 134, .35);
  background: rgba(255, 123, 134, .08);
  color: #ffd6da;
}

.ent-game-result {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(94, 168, 255, .18);
  border-radius: 13px;
  background: rgba(94, 168, 255, .06);
  color: var(--ent-text);
  text-align: center;
}

.ent-game-result strong {
  display: block;
  margin-bottom: .25rem;
}

.ent-game-result p {
  margin: 0;
  color: var(--ent-text-soft);
  font-size: .78rem;
  line-height: 1.5;
}

.ent-game-meta {
  display: flex;
  justify-content: center;
  gap: .55rem;
  margin-bottom: 1rem;
}

.ent-game-meta span {
  padding: .38rem .62rem;
  border: 1px solid var(--ent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  font-size: .69rem;
  font-weight: 700;
}

.ent-memory-board {
  display: grid;
  max-width: 540px;
  grid-template-columns: repeat(var(--ent-memory-columns, 4), minmax(0, 1fr));
  gap: .55rem;
  margin: 0 auto;
  perspective: 1000px;
}

.ent-memory-card {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform .34s ease;
}

.ent-memory-card.open,
.ent-memory-card.matched {
  transform: rotateY(180deg);
}

.ent-memory-card .front,
.ent-memory-card .back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--ent-line);
  border-radius: 13px;
  backface-visibility: hidden;
}

.ent-memory-card .front {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .08), transparent 25%),
    linear-gradient(145deg, #2e74c8, #1f5799);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  font-size: 1.15rem;
}

.ent-memory-card .back {
  background: var(--ent-panel-2);
  color: var(--ent-text);
  font-size: 1.65rem;
  transform: rotateY(180deg);
}

.ent-memory-card.matched .back {
  border-color: rgba(94, 214, 161, .35);
  background: rgba(94, 214, 161, .09);
}

.ent-puzzle-board {
  display: grid;
  width: min(100%, 480px);
  aspect-ratio: 1;
  grid-template-columns: repeat(var(--ent-puzzle-grid, 3), 1fr);
  gap: 4px;
  margin: 0 auto;
  overflow: hidden;
  padding: 4px;
  border: 1px solid var(--ent-line);
  border-radius: 16px;
  background: var(--ent-panel-2);
}

.ent-puzzle-tile {
  border: 0;
  border-radius: 5px;
  background-color: var(--ent-panel-3);
  background-repeat: no-repeat;
  cursor: pointer;
  transition:
    opacity .15s ease,
    outline .15s ease,
    transform .18s ease;
}

.ent-puzzle-tile:hover {
  transform: scale(.98);
}

.ent-puzzle-tile.selected {
  z-index: 1;
  outline: 4px solid var(--ent-amber);
  outline-offset: -4px;
  opacity: .82;
}

.ent-tile-swap {
  animation: entTileSwap .3s ease;
}

.ent-wheel-shell {
  display: grid;
  grid-template-columns: minmax(230px, .82fr) minmax(260px, 1.18fr);
  gap: 2rem;
  align-items: center;
}

.ent-wheel-wrap {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: auto;
}

.ent-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border: 10px solid #dce9f7;
  border-radius: 50%;
  background:
    conic-gradient(
      #3179c8 0 72deg,
      #5b49bd 72deg 144deg,
      #2f9b78 144deg 216deg,
      #c68732 216deg 288deg,
      #b84d69 288deg 360deg
    );
  box-shadow:
    0 18px 40px rgba(0, 5, 14, .32),
    inset 0 0 0 4px rgba(8, 17, 31, .22);
  transition: transform 4.2s cubic-bezier(.12, .72, .12, 1);
}

.ent-wheel::after {
  content: "";
  position: absolute;
  inset: 40%;
  border: 5px solid #dce9f7;
  border-radius: 50%;
  background: #2f7ee2;
  box-shadow: 0 6px 14px rgba(0, 5, 14, .25);
}

.ent-wheel-pointer {
  position: absolute;
  z-index: 2;
  top: -8px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 25px solid #f6f9fc;
  border-right: 13px solid transparent;
  border-left: 13px solid transparent;
  filter: drop-shadow(0 5px 5px rgba(0, 5, 14, .28));
  transform: translateX(-50%);
}

.ent-wheel-info h3 {
  margin: 0 0 .5rem;
  color: var(--ent-text);
  font-weight: 800;
}

.ent-wheel-info p {
  color: var(--ent-text-soft);
  font-size: .84rem;
  line-height: 1.65;
}

.ent-wheel-info .btn {
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ent-primary), var(--ent-primary-strong));
  color: #fff;
  box-shadow: 0 12px 24px rgba(35, 110, 205, .24);
}

/* --------------------------------------------------------------------------
   Leaderboard and badges
   -------------------------------------------------------------------------- */

.ent-leaderboard,
.ent-badge-grid {
  display: grid;
  gap: .5rem;
  margin-top: 1rem;
}

.ent-leader-row {
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  min-width: 0;
  padding: .64rem .7rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-leader-row:hover {
  border-color: var(--ent-line);
  background: rgba(255, 255, 255, .04);
  transform: translateX(2px);
}

.ent-leader-rank {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--ent-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: var(--ent-text-soft);
  font-size: .72rem;
  font-weight: 850;
}

.ent-leader-row:nth-child(1) .ent-leader-rank {
  border-color: rgba(244, 191, 98, .26);
  background: rgba(244, 191, 98, .09);
  color: #ffd893;
}

.ent-leader-row:nth-child(2) .ent-leader-rank {
  border-color: rgba(191, 205, 222, .22);
  background: rgba(191, 205, 222, .07);
  color: #dbe5ef;
}

.ent-leader-row:nth-child(3) .ent-leader-rank {
  border-color: rgba(206, 143, 91, .22);
  background: rgba(206, 143, 91, .07);
  color: #eab688;
}

.ent-avatar.ent-leader-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-width: 1px;
  border-radius: 11px;
  box-shadow: none;
  font-size: .92rem;
}

.ent-leader-name {
  min-width: 0;
}

.ent-leader-name strong {
  display: block;
  overflow: hidden;
  color: var(--ent-text);
  font-size: .79rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-leader-name small {
  display: block;
  margin-top: .08rem;
  overflow: hidden;
  color: var(--ent-text-muted);
  font-size: .62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-leader-points {
  color: #9bcaff;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.ent-badge-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem;
  border: 1px solid var(--ent-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-badge-item:hover {
  border-color: rgba(244, 191, 98, .2);
  background: rgba(244, 191, 98, .04);
  transform: translateX(2px);
}

.ent-badge-item > i {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  place-items: center;
  border: 1px solid rgba(244, 191, 98, .17);
  border-radius: 11px;
  background: rgba(244, 191, 98, .07);
  color: #f7cf87;
}

.ent-badge-item strong {
  display: block;
  color: var(--ent-text);
  font-size: .76rem;
  font-weight: 750;
}

.ent-badge-item small {
  display: block;
  margin-top: .08rem;
  color: var(--ent-text-muted);
  font-size: .62rem;
}

/* --------------------------------------------------------------------------
   Profile modal and toast
   -------------------------------------------------------------------------- */

.ent-profile-modal {
  overflow: hidden;
  border: 1px solid var(--ent-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0%, rgba(94, 168, 255, .1), transparent 25%),
    linear-gradient(180deg, #14233a, #0d1a2c);
  color: var(--ent-text);
  box-shadow: 0 34px 80px rgba(0, 5, 14, .52);
}

.ent-profile-modal .modal-header,
.ent-profile-modal .modal-footer {
  border-color: var(--ent-line);
}

.ent-profile-modal .modal-title {
  margin-top: .18rem;
  color: var(--ent-text);
  font-weight: 800;
}

.ent-profile-modal .form-label {
  color: var(--ent-text-soft);
  font-size: .76rem;
  font-weight: 700;
}

.ent-profile-modal .form-control,
.ent-profile-modal .form-select {
  min-height: 44px;
  border-color: var(--ent-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: var(--ent-text);
  box-shadow: none;
}

.ent-profile-modal .form-control::placeholder {
  color: var(--ent-text-muted);
}

.ent-profile-modal .form-control:focus,
.ent-profile-modal .form-select:focus {
  border-color: rgba(94, 168, 255, .42);
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 3px rgba(94, 168, 255, .11);
}

.ent-profile-modal .form-select option {
  background: #14233a;
  color: var(--ent-text);
}

.ent-choice-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .45rem;
}

.ent-avatar-choice {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--ent-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  color: #a9d0ff;
  font-size: 1.08rem;
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.ent-avatar-choice:hover {
  border-color: rgba(94, 168, 255, .28);
  transform: translateY(-1px);
}

.ent-avatar-choice.active {
  border-color: rgba(94, 168, 255, .5);
  background: rgba(94, 168, 255, .1);
  box-shadow: 0 0 0 3px rgba(94, 168, 255, .08);
}

.ent-frame-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .45rem;
}

.ent-frame-choice {
  min-height: 42px;
  border: 1px solid var(--ent-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  font-size: .69rem;
  font-weight: 700;
}

.ent-frame-choice:hover {
  border-color: rgba(94, 168, 255, .28);
  color: var(--ent-text);
}

.ent-frame-choice.active {
  border-color: rgba(94, 168, 255, .45);
  background: rgba(94, 168, 255, .09);
  color: #cfe5ff;
}

.ent-toast {
  position: fixed;
  z-index: 1090;
  right: 18px;
  bottom: 18px;
  display: flex;
  max-width: min(380px, calc(100vw - 36px));
  align-items: center;
  gap: .62rem;
  padding: .78rem .9rem;
  border: 1px solid var(--ent-line);
  border-radius: 14px;
  background: rgba(14, 27, 45, .97);
  color: var(--ent-text);
  box-shadow: var(--ent-shadow-lg);
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.ent-toast i {
  color: var(--ent-green);
}

/* --------------------------------------------------------------------------
   Feedback effects
   -------------------------------------------------------------------------- */

.ent-confetti-layer {
  position: fixed;
  z-index: 2000;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ent-confetti-piece {
  position: absolute;
  top: var(--ent-y);
  left: var(--ent-x);
  width: var(--ent-size);
  height: calc(var(--ent-size) * .55);
  border-radius: 2px;
  background: var(--ent-color);
  animation: entConfetti var(--ent-duration) ease-out forwards;
}

.ent-spark {
  position: fixed;
  z-index: 2001;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ent-color);
  pointer-events: none;
  animation: entSpark .65s ease-out forwards;
}

.ent-refresh-btn.is-loading i,
#entRefreshLeaderboard.is-loading i {
  display: inline-block;
  animation: entSpin .8s linear infinite;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes entSkeleton {
  to { background-position: -220% 0; }
}

@keyframes entStageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes entTileSwap {
  50% { transform: scale(.94); }
}

@keyframes entConfetti {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0);
  }
  to {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--ent-dx)), calc(-50% + var(--ent-dy)))
      rotate(var(--ent-rotate));
  }
}

@keyframes entSpark {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--ent-dx)), calc(-50% + var(--ent-dy)))
      scale(0);
  }
}

@keyframes entSpin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Responsive layout
   -------------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
  .ent-hero-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  }

  .ent-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ent-interactive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ent-fact-card {
    grid-column: 1 / -1;
    min-height: 250px;
  }
}

@media (max-width: 991.98px) {
  .ent-page-hero {
    padding-top: .85rem;
  }

  .ent-hero-layout {
    grid-template-columns: 1fr;
  }

  .ent-hero-copy,
  .ent-profile-card {
    min-height: auto;
  }

  .ent-profile-card {
    max-width: none;
  }

  #entProfileContent {
    min-height: 240px;
  }

  .ent-dashboard-grid,
  .ent-bottom-grid {
    grid-template-columns: 1fr;
  }

  .ent-box-card {
    min-height: 300px;
  }
}

@media (max-width: 767.98px) {
  .ent-page-hero {
    padding-bottom: 2.3rem;
  }

  .ent-section-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ent-section-nav::-webkit-scrollbar {
    display: none;
  }

  .ent-section-nav a {
    min-width: 130px;
    flex: 0 0 auto;
  }

  .ent-hero-copy {
    min-height: 390px;
    padding: 1.35rem;
    border-radius: 22px;
  }

  .ent-profile-card,
  .ent-card,
  .ent-game-card,
  .ent-stage-wrap {
    border-radius: 20px;
  }

  .ent-hero-copy h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .ent-main {
    padding-top: 2.1rem;
  }

  .ent-workspace-head,
  .ent-section-head {
    align-items: flex-start;
  }

  .ent-workspace-badge,
  .ent-section-chip {
    display: none;
  }

  .ent-interactive-grid,
  .ent-game-grid {
    grid-template-columns: 1fr;
  }

  .ent-fact-card {
    grid-column: auto;
  }

  .ent-interactive-card {
    min-height: 290px;
  }

  .ent-game-cover {
    min-height: 165px;
  }

  .ent-mission-list {
    grid-template-columns: 1fr;
  }

  .ent-wheel-shell {
    grid-template-columns: 1fr;
  }

  .ent-wheel-info {
    text-align: center;
  }

  .ent-choice-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ent-frame-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .ent-section-nav a {
    min-width: 115px;
    min-height: 40px;
    padding-inline: .65rem;
    font-size: .72rem;
  }

  .ent-hero-copy {
    min-height: auto;
  }

  .ent-live-row {
    justify-content: space-between;
  }

  .ent-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ent-hero-actions .btn {
    width: 100%;
  }

  .ent-hero-metrics {
    grid-template-columns: 1fr;
  }

  .ent-profile-card {
    padding: 1rem;
  }

  .ent-player-name strong {
    max-width: 150px;
  }

  .ent-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ent-card {
    padding: 1rem;
  }

  .ent-card-head {
    align-items: center;
  }

  .ent-card-title-group p,
  .ent-progress-row span:last-child {
    display: none;
  }

  .ent-mission-summary {
    min-width: 84px;
    padding: .5rem .55rem;
  }

  .ent-mission-summary span {
    display: none;
  }

  .ent-section {
    margin-bottom: 3rem;
  }

  .ent-quiz-options {
    grid-template-columns: 1fr;
  }

  .ent-memory-board {
    gap: .38rem;
  }

  .ent-memory-card .back {
    font-size: 1.3rem;
  }

  .ent-stage-wrap {
    padding: .75rem;
  }

  .ent-stage {
    padding: .75rem;
  }

  .ent-leader-row {
    grid-template-columns: 30px 36px minmax(0, 1fr);
    padding: .58rem;
  }

  .ent-leader-points {
    grid-column: 3;
  }

  .ent-profile-modal {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ent-skeleton,
  .ent-confetti-piece,
  .ent-spark,
  .ent-refresh-btn i,
  #entRefreshLeaderboard i,
  .ent-stage-wrap.is-opening,
  .ent-tile-swap {
    animation: none !important;
  }

  .ent-section-nav a,
  .ent-btn-primary,
  .ent-btn-secondary,
  .ent-btn-quiet,
  .ent-play-btn,
  .ent-icon-button,
  .ent-mission-item,
  .ent-game-card,
  .ent-game-card *,
  .ent-progress-track span,
  .ent-memory-card,
  .ent-puzzle-tile,
  .ent-wheel,
  .ent-leader-row,
  .ent-badge-item {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


/* ==========================================================================
   Dashboard awal terpadu — Zona Bermain
   ========================================================================== */

.ent-overview-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  border: 1px solid var(--ent-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 0%, rgba(79, 215, 229, .12), transparent 28%),
    radial-gradient(circle at 8% 100%, rgba(94, 168, 255, .12), transparent 30%),
    linear-gradient(145deg, rgba(18, 34, 55, .98), rgba(11, 23, 40, .98));
  box-shadow: var(--ent-shadow-lg);
  scroll-margin-top: 110px;
}

.ent-overview-card::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -100px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(137, 190, 250, .08);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(137, 190, 250, .02),
    0 0 0 96px rgba(137, 190, 250, .014);
  pointer-events: none;
}

.ent-overview-card > * {
  position: relative;
  z-index: 1;
}

.ent-overview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ent-line);
}

.ent-overview-title h1 {
  margin: .28rem 0 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 850;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.ent-overview-card .ent-profile-topline {
  width: auto;
  min-width: min(100%, 260px);
  padding: .65rem .75rem;
  border: 1px solid var(--ent-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.ent-overview-card .ent-profile-loading {
  min-height: 190px;
}

.ent-overview-card #entProfileContent.ent-overview-content {
  display: block;
  min-height: 0;
}

.ent-overview-profile-row {
  padding: 1.15rem 0;
}

.ent-overview-card .ent-player-row {
  max-width: 520px;
}

.ent-overview-card .ent-player-name strong {
  max-width: min(60vw, 360px);
  font-size: 1.08rem;
}

.ent-overview-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .6rem;
}

.ent-overview-stat {
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .62rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--ent-line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
}

.ent-overview-stat-icon {
  display: grid;
  width: 36px;
  height: 36px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 11px;
  background: rgba(94, 168, 255, .1);
  color: #9dcbff;
  font-size: .9rem;
}

.ent-overview-stat strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ent-text);
  font-size: .92rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-overview-stat small {
  display: block;
  min-width: 0;
  margin-top: .18rem;
  overflow: hidden;
  color: var(--ent-text-muted);
  font-size: .62rem;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-overview-card .ent-profile-error {
  margin-top: 1rem;
}

@media (max-width: 1199.98px) {
  .ent-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ent-page-hero {
    padding-bottom: 2rem;
  }

  .ent-overview-topbar {
    align-items: flex-start;
  }

  .ent-overview-card .ent-profile-topline {
    min-width: 0;
  }

  .ent-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ent-overview-stat:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 479.98px) {
  .ent-overview-card {
    padding: .9rem;
    border-radius: 22px;
  }

  .ent-overview-topbar {
    flex-direction: column;
  }

  .ent-overview-card .ent-profile-topline {
    width: 100%;
  }

  .ent-overview-profile-row {
    padding: 1rem 0;
  }

  .ent-overview-stat {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: .65rem;
  }

  .ent-overview-stat-icon {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   Kenyamanan, konten adaptif, dan optimasi render
   ========================================================================== */

.ent-comfort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.15rem 0 1.35rem;
  padding: .78rem .9rem;
  border: 1px solid var(--ent-line);
  border-radius: 16px;
  background: rgba(16, 29, 47, .76);
  box-shadow: 0 12px 28px rgba(0, 5, 14, .14);
}

.ent-comfort-bar > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
  color: var(--ent-primary);
}

.ent-comfort-bar > div:first-child > i {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
  background: rgba(94, 168, 255, .1);
}

.ent-comfort-bar strong,
.ent-comfort-bar small {
  display: block;
}

.ent-comfort-bar strong {
  color: var(--ent-text);
  font-size: .77rem;
}

.ent-comfort-bar small {
  margin-top: .12rem;
  color: var(--ent-text-muted);
  font-size: .67rem;
  line-height: 1.45;
}

.ent-comfort-actions {
  display: flex;
  flex: 0 0 auto;
  gap: .45rem;
}

.ent-comfort-actions button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: .42rem;
  padding: .5rem .68rem;
  border: 1px solid var(--ent-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  color: var(--ent-text-soft);
  font-size: .69rem;
  font-weight: 750;
  touch-action: manipulation;
}

.ent-comfort-actions button:hover,
.ent-comfort-actions button:focus-visible,
.ent-comfort-actions button.active {
  border-color: rgba(94, 168, 255, .32);
  background: rgba(94, 168, 255, .09);
  color: #fff;
  outline: none;
}

.ent-ai-context {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: .45rem;
  margin: 0 auto .8rem;
  padding: .38rem .62rem;
  border: 1px solid rgba(79, 215, 229, .2);
  border-radius: 999px;
  background: rgba(79, 215, 229, .065);
  color: #bceff4;
  font-size: .66rem;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
}

.ent-game-context {
  max-width: 680px;
  margin: -.25rem auto 1rem;
  color: var(--ent-text-muted);
  font-size: .73rem;
  line-height: 1.55;
  text-align: center;
}

.ent-memory-board,
.ent-puzzle-board {
  contain: layout paint;
}

.ent-memory-card,
.ent-puzzle-tile,
.ent-quiz-option,
.ent-play-btn,
.ent-comfort-actions button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ent-memory-card:focus-visible,
.ent-puzzle-tile:focus-visible,
.ent-quiz-option:focus-visible {
  outline: 3px solid rgba(94, 168, 255, .72);
  outline-offset: 3px;
}

.ent-section,
.ent-bottom-grid {
  content-visibility: auto;
  contain-intrinsic-size: 1px 760px;
}

.ent-stage-wrap:not([hidden]) {
  content-visibility: visible;
}

.ent-wheel {
  will-change: transform;
}

html.ent-comfort-mode .ent-page-hero::before,
html.ent-comfort-mode .ent-page-hero::after,
html.ent-comfort-mode .ent-overview-card::before,
html.ent-comfort-mode .ent-box-ring,
html.ent-comfort-mode .ent-confetti-layer,
html.ent-comfort-mode .ent-spark {
  display: none !important;
}

html.ent-comfort-mode .ent-section-nav,
html.ent-comfort-mode .ent-overview-card,
html.ent-comfort-mode .ent-card,
html.ent-comfort-mode .ent-game-card,
html.ent-comfort-mode .ent-stage-wrap,
html.ent-comfort-mode .ent-stage,
html.ent-comfort-mode .ent-comfort-bar {
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html.ent-comfort-mode .ent-page-hero,
html.ent-comfort-mode .ent-main {
  background-image: none;
}

html.ent-comfort-mode .ent-page-hero {
  background-color: #0b1727;
}

html.ent-comfort-mode .ent-main {
  background-color: #08111f;
}

html.ent-comfort-mode .ent-section-nav a,
html.ent-comfort-mode .ent-btn-primary,
html.ent-comfort-mode .ent-btn-secondary,
html.ent-comfort-mode .ent-btn-quiet,
html.ent-comfort-mode .ent-play-btn,
html.ent-comfort-mode .ent-icon-button,
html.ent-comfort-mode .ent-mission-item,
html.ent-comfort-mode .ent-game-card,
html.ent-comfort-mode .ent-game-card *,
html.ent-comfort-mode .ent-progress-track span,
html.ent-comfort-mode .ent-memory-card,
html.ent-comfort-mode .ent-puzzle-tile,
html.ent-comfort-mode .ent-wheel,
html.ent-comfort-mode .ent-leader-row,
html.ent-comfort-mode .ent-badge-item {
  animation: none !important;
  scroll-behavior: auto !important;
  transition: none !important;
}

html.ent-comfort-mode .ent-game-copy p,
html.ent-comfort-mode .ent-game-status,
html.ent-comfort-mode .ent-card-title-group p,
html.ent-comfort-mode .ent-game-context,
html.ent-comfort-mode .ent-list-loading {
  color: #b8c7d8;
  font-size: max(.78rem, 14px);
}

html.ent-comfort-mode .ent-quiz-option {
  min-height: 64px;
  font-size: max(.82rem, 15px);
}

html.ent-comfort-mode .ent-mission-item,
html.ent-comfort-mode .ent-poll-option,
html.ent-comfort-mode .ent-story-choice {
  min-height: 48px;
}

@media (max-width: 767.98px) {
  .ent-comfort-bar {
    align-items: flex-start;
    margin-top: -.75rem;
  }

  .ent-comfort-bar > div:first-child small {
    display: none;
  }

  .ent-comfort-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ent-comfort-actions button span {
    display: none;
  }

  .ent-comfort-actions button {
    width: 42px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 479.98px) {
  .ent-comfort-bar {
    flex-direction: column;
  }

  .ent-comfort-actions {
    justify-content: stretch;
  }

  .ent-comfort-actions button {
    width: auto;
    flex: 1;
  }

  .ent-comfort-actions button span {
    display: inline;
  }

  .ent-memory-card .back {
    font-size: 1.12rem;
  }
}

@media (prefers-reduced-data: reduce) {
  .ent-page-hero::before,
  .ent-page-hero::after,
  .ent-overview-card::before {
    display: none;
  }

  .ent-section-nav,
  .ent-overview-card,
  .ent-card,
  .ent-game-card {
    box-shadow: none;
    backdrop-filter: none;
  }
}

