/* RAVID Game Flagship Polish v30
   Scope: hanya #section-salam / Game Etika.
   Patch ini tidak mengubah logic game, collision, route, atau backend.
*/

/* ===== Hero composition ===== */
body.ravid-premium-theme #section-salam .premium-etika-shell {
  background:
    radial-gradient(circle at 16% 14%, rgba(96, 165, 250, .22), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(14, 165, 233, .18), transparent 32%),
    linear-gradient(180deg, rgba(239, 248, 255, .98), rgba(248, 252, 255, .96)) !important;
  border-color: rgba(191, 219, 254, .88) !important;
  box-shadow:
    0 34px 100px rgba(37, 99, 235, .14),
    inset 0 1px 0 rgba(255,255,255,.92) !important;
}

body.ravid-premium-theme #section-salam .premium-etika-hero {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px) minmax(330px, 420px) !important;
  gap: 26px !important;
  align-items: end !important;
}

body.ravid-premium-theme #section-salam .premium-etika-hero .section-title {
  letter-spacing: -0.065em !important;
  line-height: .96 !important;
}

body.ravid-premium-theme #section-salam .premium-etika-hero .section-subtitle {
  max-width: 520px !important;
  line-height: 1.75 !important;
}

/* ===== Coach card final ===== */
body.ravid-premium-theme #section-salam .game-coach-card {
  grid-template-columns: 68px minmax(0, 1fr) !important;
  min-height: 138px !important;
  padding: 24px 26px !important;
  gap: 18px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(219,234,254,.85), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(247,251,255,.94)) !important;
  border: 1px solid rgba(191,219,254,.9) !important;
  box-shadow:
    0 28px 70px rgba(15, 23, 42, .10),
    0 12px 28px rgba(37, 99, 235, .09),
    inset 0 1px 0 rgba(255,255,255,.98) !important;
  overflow: hidden !important;
}

body.ravid-premium-theme #section-salam .game-coach-card strong {
  display: none !important;
}

body.ravid-premium-theme #section-salam #etika-coach-text {
  grid-column: 2 !important;
  margin: 0 !important;
  max-width: 300px !important;
  color: #0f172a !important;
  font-size: clamp(1rem, 1.02vw, 1.13rem) !important;
  font-weight: 900 !important;
  line-height: 1.48 !important;
  letter-spacing: -0.03em !important;
  text-wrap: balance !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

/* Avatar coach memakai visual Guru, bukan bintang/placeholder */
body.ravid-premium-theme #section-salam .game-coach-avatar {
  width: 62px !important;
  height: 62px !important;
  min-width: 62px !important;
  border-radius: 22px !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 54%, #dbeafe 100%) !important;
  border: 2px solid rgba(226,232,240,.98) !important;
  box-shadow:
    0 18px 36px rgba(37,99,235,.18),
    inset 0 1px 0 rgba(255,255,255,.92) !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

body.ravid-premium-theme #section-salam .game-coach-avatar::before {
  content: none !important;
  display: none !important;
}

body.ravid-premium-theme #section-salam .game-coach-avatar .avatar-illustration {
  width: 58px !important;
  height: 58px !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ===== Student avatar: kopiyah center-presisi ===== */
body.ravid-premium-theme #section-salam .student-avatar {
  position: relative !important;
  overflow: visible !important;
}

body.ravid-premium-theme #section-salam .student-avatar .avatar-face {
  left: 50% !important;
  top: 21px !important;
  transform: translateX(-50%) !important;
  width: 31px !important;
  height: 31px !important;
}

body.ravid-premium-theme #section-salam .student-avatar .avatar-cap {
  left: 50% !important;
  right: auto !important;
  top: 12px !important;
  transform: translateX(-50%) !important;
  width: 34px !important;
  height: 15px !important;
  border-radius: 9px 9px 6px 6px !important;
  background: linear-gradient(135deg, #020617, #172033) !important;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.16),
    0 6px 12px rgba(15,23,42,.22) !important;
  z-index: 8 !important;
}

body.ravid-premium-theme #section-salam .student-avatar .avatar-cap::after {
  left: 8px !important;
  right: 8px !important;
  bottom: 3px !important;
  height: 2px !important;
  background: rgba(96,165,250,.86) !important;
}

/* ===== Board premium ===== */
body.ravid-premium-theme #section-salam .etika-board-wrap {
  padding: 15px !important;
  border-radius: 34px !important;
  background:
    linear-gradient(180deg, rgba(83, 153, 255, 1), rgba(28, 96, 226, 1)) !important;
  box-shadow:
    0 34px 90px rgba(37,99,235,.24),
    inset 0 2px 0 rgba(255,255,255,.58),
    inset 0 -8px 14px rgba(24,78,201,.24) !important;
}

body.ravid-premium-theme #section-salam .etika-board {
  border-radius: 26px !important;
  overflow: hidden !important;
  background:
    linear-gradient(rgba(147,197,253,.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147,197,253,.24) 1px, transparent 1px),
    radial-gradient(circle at 15% 15%, rgba(219,234,254,.98), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(224,242,254,.74), transparent 35%),
    linear-gradient(180deg, #fbfdff 0%, #eef8ff 100%) !important;
  background-size: 40px 40px, 40px 40px, auto, auto, auto !important;
}

body.ravid-premium-theme #section-salam .etika-board .cell.blocked {
  border-radius: 18px !important;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8) !important;
  border-color: rgba(147,197,253,.72) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 10px 18px rgba(37,99,235,.28) !important;
}

/* ===== Keterangan / legenda ===== */
body.ravid-premium-theme #section-salam .game-legend-card {
  padding: 22px 24px !important;
  border-radius: 28px !important;
  min-height: 112px !important;
}

body.ravid-premium-theme #section-salam .game-legend-card > strong {
  display: block !important;
  margin-bottom: 14px !important;
  color: #1d4ed8 !important;
  font-size: 1.02rem !important;
  font-weight: 950 !important;
  letter-spacing: -0.025em !important;
}

body.ravid-premium-theme #section-salam .game-legend-items {
  border: 1px solid rgba(191, 219, 254, .68) !important;
  border-radius: 18px !important;
  padding: 12px 14px !important;
  background: rgba(255,255,255,.72) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 18px !important;
}

body.ravid-premium-theme #section-salam .game-legend-items span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #334155 !important;
  font-size: .96rem !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}

/* ===== Tips card clean ===== */
body.ravid-premium-theme #section-salam .game-tips-card {
  padding: 22px 24px !important;
  min-height: 112px !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 9% 20%, rgba(254,240,138,.34), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,251,255,.92)) !important;
}

body.ravid-premium-theme #section-salam .game-tips-emoji {
  display: none !important;
}

body.ravid-premium-theme #section-salam .game-tips-card strong {
  color: #1d4ed8 !important;
  font-weight: 950 !important;
  letter-spacing: -0.02em !important;
}

body.ravid-premium-theme #section-salam .game-tips-card p {
  margin: 8px 0 0 !important;
  color: #475569 !important;
  font-weight: 760 !important;
  line-height: 1.65 !important;
}

/* ===== Control pad refinement ===== */
body.ravid-premium-theme #section-salam .salam-controls.salam-controls-plus .btn {
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease !important;
}

body.ravid-premium-theme #section-salam .salam-controls.salam-controls-plus .btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 18px 34px rgba(37,99,235,.18) !important;
}

@media (max-width: 1100px) {
  body.ravid-premium-theme #section-salam .premium-etika-hero {
    grid-template-columns: 1fr !important;
  }

  body.ravid-premium-theme #section-salam .game-coach-card {
    max-width: 100% !important;
  }

  body.ravid-premium-theme #section-salam #etika-coach-text {
    max-width: 100% !important;
  }
}
