/* EduPlay shell — attractive background + clean menu (home, login, activate) */

/* Animated soft mesh background */
.ep-bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(233, 196, 106, 0.45), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(82, 183, 136, 0.35), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(231, 111, 81, 0.18), transparent 55%),
    linear-gradient(165deg, #fff8f0 0%, #e8f5ef 42%, #d4f0e8 72%, #e0f2f1 100%);
}

.ep-bg-scene::before,
.ep-bg-scene::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: ep-blob 18s ease-in-out infinite alternate;
}

.ep-bg-scene::before {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  top: 8%;
  left: -8%;
  background: radial-gradient(circle, rgba(42, 157, 143, 0.35), transparent 70%);
}

.ep-bg-scene::after {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  bottom: 5%;
  right: -6%;
  background: radial-gradient(circle, rgba(244, 162, 97, 0.4), transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.ep-bg-dots {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(27, 67, 50, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}

@keyframes ep-blob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.08); }
  100% { transform: translate(-12px, 20px) scale(0.95); }
}

/* Page chrome */
.ep-shell {
  position: relative;
  min-height: 100vh;
  z-index: 0;
}

.ep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--ep-max, 1100px);
  margin: 0 auto;
  padding: 14px 18px 0;
}

.ep-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ep-primary-dark, #1b4332);
  text-decoration: none;
  font-size: 1.05rem;
}

.ep-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #52b788, #2d6a4f);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(45, 106, 79, 0.28);
}

/* Compact menu grid */
.ep-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 16px auto 0;
  padding: 0 16px;
}

.ep-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.08);
  text-decoration: none;
  color: var(--ep-primary-dark, #1b4332);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s;
  font-family: inherit;
}

.ep-menu-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(27, 67, 50, 0.14);
  background: #fff;
}

.ep-menu-item:active { transform: scale(0.97); }

.ep-menu-item .mi-ico {
  font-size: 1.55rem;
  line-height: 1;
}

.ep-menu-item.mi-gold {
  background: linear-gradient(145deg, rgba(233, 196, 106, 0.55), rgba(255, 255, 255, 0.85));
  border-color: rgba(233, 196, 106, 0.55);
}

.ep-menu-item.mi-primary {
  background: linear-gradient(145deg, rgba(82, 183, 136, 0.35), rgba(255, 255, 255, 0.9));
  border-color: rgba(82, 183, 136, 0.4);
}

.ep-menu-item.mi-soft {
  opacity: 0.95;
}

/* Hero glass card */
.ep-hero-card {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 22px 20px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 50px rgba(27, 67, 50, 0.12);
}

.ep-timer-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(27, 67, 50, 0.06);
  border: 1px solid rgba(45, 106, 79, 0.12);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ep-primary-dark, #1b4332);
}

.ep-timer-pill .t-live {
  font-variant-numeric: tabular-nums;
  color: #b45309;
  background: #fff7ed;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #fed7aa;
}

.ep-timer-pill.ok .t-live {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ep-timer-pill.warn .t-live {
  color: #9a3412;
  background: #fff7ed;
}

/* Subject cards polish */
.ep-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  max-width: var(--ep-max, 1100px);
  margin: 22px auto 28px;
  padding: 0 18px;
}

.ep-subject {
  position: relative;
  display: block;
  text-decoration: none;
  text-align: center;
  padding: 22px 14px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 28px rgba(27, 67, 50, 0.1);
  border-bottom: 5px solid var(--ep-primary, #2d6a4f);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.ep-subject::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent);
  pointer-events: none;
}

.ep-subject:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(27, 67, 50, 0.16);
}

.ep-subject .icon {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.ep-subject h2 {
  font-size: 1.15rem;
  margin: 4px 0;
  font-weight: 800;
  color: var(--ep-text, #081c15);
}

.ep-subject .topics {
  font-size: 0.78rem;
  color: var(--ep-text-muted, #6b7280);
  line-height: 1.35;
}

.ep-subject .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--ep-gold, #e9c46a);
  color: var(--ep-text, #081c15);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.ep-subject.card-math { border-bottom-color: var(--ep-math, #e76f51); }
.ep-subject.card-sains { border-bottom-color: var(--ep-sains, #2a9d8f); }
.ep-subject.card-bm { border-bottom-color: var(--ep-bm, #40916c); }
.ep-subject.card-english { border-bottom-color: var(--ep-english, #2d6a4f); }
.ep-subject.card-umum { border-bottom-color: var(--ep-umum, #e9c46a); }
.ep-subject.card-sejarah { border-bottom-color: var(--ep-sejarah, #f4a261); }
.ep-subject.card-arab { border-bottom-color: #c9a227; }

/* Auth pages (login / activate) */
.ep-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px 28px;
}

.ep-auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: 26px 22px 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(27, 67, 50, 0.14);
  position: relative;
  overflow: hidden;
}

.ep-auth-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(90deg, #2d6a4f, #52b788, #e9c46a, #e76f51);
}

@media (max-width: 600px) {
  .ep-subjects {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ep-subject {
    padding: 16px 10px 14px;
  }
  .ep-subject .icon { font-size: 2.1rem; }
  .ep-subject h2 { font-size: 1rem; }
  .ep-menu {
    grid-template-columns: repeat(3, 1fr);
  }
  .ep-menu-item {
    min-height: 72px;
    font-size: 0.78rem;
  }
}
