/* ============================================================
   MİNİ GOLF — /play/mini-golf
   ============================================================ */
.mg-wrap { max-width: 980px; }
#mg-view { width: 100%; margin-top: 16px; }
.mg-card { background: var(--card, #14102b); border: 1.5px solid var(--line); border-radius: 22px; padding: 18px; color: var(--ink); }
.mg-card h3 { margin: 6px 0 4px; font: 600 20px "Fredoka", sans-serif; }
.mg-card p { margin: 0 0 12px; color: var(--ink-dim); font-size: 14.5px; line-height: 1.45; }
.mg-card small { display: block; margin-top: 10px; color: var(--ink-dim); font-size: 13px; }
.mg-card .btn { width: 100%; justify-content: center; cursor: pointer; }

/* ---------- menü ---------- */
.mg-menu { display: flex; flex-direction: column; gap: 14px; }
.mg-me { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.mg-me label { font: 600 14px "Fredoka", sans-serif; color: var(--ink-dim); }
.mg-me input, .mg-join input { min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card-2, #1b1538); color: var(--ink); font: 600 16px "Manrope", sans-serif; outline: none; }
.mg-me input:focus, .mg-join input:focus { border-color: var(--violet); }
.mg-cols { display: flex; gap: 8px; }
.mg-col { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; background: var(--c); cursor: pointer; padding: 0; box-shadow: inset 0 -4px 6px rgba(0, 0, 0, .25), 0 0 0 1.5px var(--line); transition: transform .15s; }
.mg-col.on { border-color: var(--violet); transform: scale(1.15); }
.mg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mg-cards .mg-card { display: flex; flex-direction: column; }
.mg-cards .mg-card p { flex: 1 1 auto; }
.mg-ic { font-size: 34px; line-height: 1; }
.mg-join { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.mg-join input { text-align: center; letter-spacing: .28em; text-transform: uppercase; font: 700 18px "Fredoka", sans-serif; }
.mg-join .btn { width: auto; }
.mg-how { margin: 0; padding: 14px 18px 14px 34px; border-radius: 18px; border: 1.5px dashed var(--line); color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

/* ---------- oda ---------- */
.mg-room, .mg-end { max-width: 560px; margin: 0 auto; text-align: center; }
.mg-end { max-width: 760px; }
.mg-room > small { margin: 0; text-transform: uppercase; letter-spacing: .12em; }
.mg-code { font: 700 46px/1.1 "Fredoka", sans-serif; letter-spacing: .22em; margin: 4px 0 12px; color: #ffcc33; }
.mg-room h3 { margin-top: 18px; text-align: left; }
.mg-room h3 em { font-style: normal; color: var(--ink-dim); font-size: 15px; }
.mg-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.mg-li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card-2, #1b1538); text-align: left; font-weight: 600; }
.mg-li i, .mg-p i, .mg-tbl i { width: 16px; height: 16px; flex: none; border-radius: 50%; display: inline-block; box-shadow: inset 0 -3px 4px rgba(0, 0, 0, .3); }
.mg-li span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-li em { font-style: normal; color: var(--ink-dim); font-weight: 500; }
.mg-li b { font: 600 12px "Fredoka", sans-serif; padding: 3px 9px; border-radius: 99px; background: rgba(255, 204, 51, .16); color: #ffcc33; }
.mg-li.gone { opacity: .45; }
.mg-wait { margin: 6px 0 12px !important; }
.mg-leave { margin-top: 10px; }
.mg-trophy { font-size: 52px; line-height: 1; }
.mg-end h2 { margin: 8px 0 6px; font: 700 28px "Fredoka", sans-serif; }
.mg-res b { color: #ffcc33; }
.mg-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mg-row > * { flex: 1 1 150px; }
.mg-row .mg-wait { flex-basis: 100%; }

/* ---------- skor tablosu ---------- */
.mg-tbl-wrap { overflow-x: auto; margin-top: 10px; border-radius: 14px; }
.mg-tbl { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink, #f5f3ff); }
.mg-tbl th, .mg-tbl td { padding: 7px 6px; text-align: center; white-space: nowrap; }
.mg-tbl th { font: 600 12px "Fredoka", sans-serif; color: var(--ink-dim, #b8afd9); }
.mg-tbl td:first-child { text-align: left; font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.mg-tbl td:first-child i { margin-right: 7px; vertical-align: -2px; }
.mg-tbl tr.par td { color: var(--ink-dim, #b8afd9); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.mg-tbl tbody tr:nth-child(odd) { background: rgba(139, 92, 246, .08); }
.mg-tbl tr.me td:first-child { color: #ffcc33; }
.mg-tbl td.u { color: #4abf8c; font-weight: 700; }
.mg-tbl td.o { color: #f2799a; }

/* ---------- oyun sahnesi ---------- */
.mg-stage { position: relative; width: 100%; height: min(76vh, 760px); min-height: 430px; border-radius: 24px; overflow: hidden; border: 1.5px solid var(--line); background: #1b1440; user-select: none; -webkit-user-select: none; }
.mg-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; cursor: grab; }
.mg-canvas:active { cursor: grabbing; }
.mg-hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; align-items: flex-start; gap: 8px; pointer-events: none; }
.mg-chip { display: flex; align-items: baseline; gap: 8px; padding: 8px 13px; border-radius: 14px; background: rgba(15, 11, 30, .72); color: #f5f3ff; font: 600 15px "Fredoka", sans-serif; backdrop-filter: blur(6px); }
.mg-chip span { color: #cfc8ee; font-size: 13.5px; }
.mg-chip.r { margin-left: auto; }
.mg-chip b { color: #fff; }
.mg-chip #mg-str b { color: #ffcc33; font-size: 17px; }
#mg-timer { font-variant-numeric: tabular-nums; }
#mg-timer.low { color: #ff7a8a; }
.mg-exit { pointer-events: auto; width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(15, 11, 30, .72); color: #f5f3ff; font-size: 15px; cursor: pointer; }
.mg-pl { position: absolute; left: 10px; top: 58px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; max-width: 46%; }
.mg-p { display: flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 11px; background: rgba(15, 11, 30, .62); color: #f5f3ff; font: 600 12.5px "Manrope", sans-serif; }
.mg-p span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-p b { color: #ffcc33; min-width: 12px; text-align: center; }
.mg-p em { font-style: normal; color: #b8afd9; min-width: 16px; text-align: right; }
.mg-p.done b { color: #4abf8c; }
.mg-p.gone { opacity: .4; }
.mg-banner { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -8px) scale(.9); padding: 10px 20px; border-radius: 18px; background: rgba(15, 11, 30, .82); color: #fff; font: 700 21px "Fredoka", sans-serif; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1); max-width: 86%; }
.mg-banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.mg-hint { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; background: rgba(15, 11, 30, .66); color: #e6e0ff; font: 600 13.5px "Manrope", sans-serif; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.mg-power { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(260px, 70%); height: 14px; border-radius: 99px; background: rgba(15, 11, 30, .7); overflow: hidden; pointer-events: none; border: 2px solid rgba(255, 255, 255, .25); }
.mg-power i { display: block; height: 100%; width: 0; border-radius: 99px; }
.mg-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; background: rgba(15, 11, 30, .7); color: #fff; text-align: center; backdrop-filter: blur(3px); }
.mg-over[hidden], .mg-hint[hidden], .mg-power[hidden], .mg-pl[hidden] { display: none; }
.mg-o-big { font: 700 40px "Fredoka", sans-serif; }
.mg-o-sub { font: 600 18px "Fredoka", sans-serif; color: #ffcc33; }
.mg-o-title { font: 700 20px "Fredoka", sans-serif; margin-bottom: 4px; }
.mg-over .mg-tbl-wrap { width: min(640px, 100%); background: rgba(20, 16, 43, .85); padding: 6px; }
.mg-over .mg-tbl { color: #f5f3ff; }

@media (max-width: 640px) {
  .mg-cards { grid-template-columns: 1fr; }
  .mg-me { grid-template-columns: 1fr; gap: 8px; }
  .mg-stage { height: min(70vh, 640px); min-height: 400px; border-radius: 18px; }
  .mg-code { font-size: 38px; }
  .mg-tbl { font-size: 12.5px; }
  .mg-tbl th, .mg-tbl td { padding: 6px 3px; }
  .mg-banner { font-size: 18px; }
  .mg-o-big { font-size: 32px; }
}
.mg-row { align-items: center; }
.mg-row .btn { width: auto; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mg-row .btn svg { width: 18px; height: 18px; flex: none; }
