/* =====================================================================
   Goa Pride Games — player Login / Ticket-mode / Lobby screens.
   Fixed 1366x768 stage, scaled to fit any window (same idea as the
   game pages), so the layout looks identical in the Windows app,
   Android app and a browser. Artwork is pure CSS/SVG — no images
   except the Goa Pride Games logo.
   ===================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #07031a; }
body {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: #fff;
  -webkit-user-select: none; user-select: none;
}
input { -webkit-user-select: text; user-select: text; }

/* ---- full-window casino night background ---- */
.mg-bg {
  position: fixed; top:0;right:0;bottom:0;left:0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(120, 60, 255, 0.35), transparent 70%),
    radial-gradient(ellipse 45% 40% at 85% 85%, rgba(255, 90, 40, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 90%, rgba(0, 140, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #0b0630 0%, #140a3d 45%, #1d0827 100%);
}
/* spotlight beams from the ceiling */
.mg-bg::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: -20%; height: 90%;
  background:
    conic-gradient(from 190deg at 20% 0%, transparent 0deg, rgba(160, 140, 255, 0.10) 8deg, transparent 18deg),
    conic-gradient(from 170deg at 80% 0%, transparent 0deg, rgba(120, 190, 255, 0.10) 8deg, transparent 18deg),
    conic-gradient(from 178deg at 50% 0%, transparent 0deg, rgba(255, 220, 150, 0.07) 6deg, transparent 12deg);
  filter: blur(2px);
}
/* soft out-of-focus lights */
.mg-bg::after {
  content: ""; position: absolute; top:0;right:0;bottom:0;left:0;
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 210, 120, 0.35) 0 5px, transparent 22px),
    radial-gradient(circle at 26% 12%, rgba(140, 170, 255, 0.35) 0 4px, transparent 18px),
    radial-gradient(circle at 44% 30%, rgba(255, 120, 200, 0.25) 0 6px, transparent 24px),
    radial-gradient(circle at 63% 14%, rgba(120, 220, 255, 0.30) 0 4px, transparent 20px),
    radial-gradient(circle at 78% 26%, rgba(255, 200, 90, 0.30) 0 6px, transparent 26px),
    radial-gradient(circle at 92% 10%, rgba(180, 140, 255, 0.35) 0 4px, transparent 18px),
    radial-gradient(circle at 6% 55%, rgba(120, 200, 255, 0.25) 0 5px, transparent 22px),
    radial-gradient(circle at 96% 58%, rgba(255, 170, 90, 0.25) 0 5px, transparent 22px),
    radial-gradient(circle at 35% 70%, rgba(255, 230, 160, 0.18) 0 4px, transparent 20px);
  animation: mg-twinkle 6s ease-in-out infinite alternate;
}
@keyframes mg-twinkle { from { opacity: 0.55; } to { opacity: 1; } }

/* ---- scaled stage ---- */
.mg-stage {
  position: absolute; left: 50%; top: 50%; width: 1366px; height: 768px;
  transform: translate(-50%, -50%); transform-origin: center center; z-index: 1; overflow: hidden;
}

/* ---- window buttons (top-right) ---- */
.mg-winbtns { position: absolute; top: 10px; right: 14px; display: flex; gap: 10px; z-index: 5; }
.mg-winbtn {
  width: 54px; height: 50px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.55);
  font: 900 26px/1 Arial, sans-serif; color: #fff; cursor: pointer; display: none;
  align-items: center; justify-content: center; text-decoration: none;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.25), 0 3px 10px rgba(0,0,0,0.5);
}
.mg-winbtn.min { background: linear-gradient(180deg, #7ddf5b, #2e9a1f); }
.mg-winbtn.close { background: linear-gradient(180deg, #ff6a5c, #c41d12); }
.mg-winbtn.show { display: flex; }

/* ---- gold text ---- */
.mg-gold {
  background: linear-gradient(180deg, #fff6c0 0%, #ffd54a 45%, #e59a10 70%, #ffe27a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #5a2d00) drop-shadow(0 0 8px rgba(255, 170, 0, 0.35));
  font-family: Impact, "Arial Black", sans-serif; letter-spacing: 1px;
}

/* ---- logo block (stars + logo image) ---- */
.mg-logo { position: absolute; text-align: center; }
.mg-logo .stars { display: block; margin: 0 auto -18px; position: relative; z-index: 2; }
.mg-logo img {
  display: block; margin: 0 auto; width: 100%;
  filter: drop-shadow(0 0 18px rgba(255, 60, 60, 0.45)) drop-shadow(0 6px 12px rgba(0,0,0,0.6));
}

/* ---- glass panels ---- */
.mg-panel {
  position: absolute;
  background: linear-gradient(180deg, rgba(20, 16, 60, 0.82), rgba(10, 8, 34, 0.9));
  border: 2px solid #2f6bff; border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(120,160,255,0.25) inset, 0 0 26px rgba(40, 100, 255, 0.45), 0 18px 40px rgba(0,0,0,0.55);
}
.mg-panel.red {
  border-color: #d8452f;
  background: linear-gradient(180deg, rgba(40, 10, 14, 0.82), rgba(18, 6, 10, 0.9));
  box-shadow: 0 0 0 1px rgba(255,140,120,0.2) inset, 0 0 22px rgba(255, 70, 40, 0.35), 0 18px 40px rgba(0,0,0,0.55);
}

/* ---- inputs & buttons ---- */
.mg-label { display: block; font-size: 24px; font-weight: 700; color: #e9ecff; margin: 0 0 8px 12px; text-shadow: 0 2px 3px #000; }
.mg-input {
  width: 100%; height: 60px; border-radius: 16px; border: 2px solid #2a64ff; outline: none;
  background: linear-gradient(180deg, #02030c, #0c0f24); color: #fff;
  font: 700 26px "Trebuchet MS", Arial, sans-serif; text-align: center;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.85), 0 0 12px rgba(40, 110, 255, 0.45);
}
.mg-input:focus { border-color: #61a0ff; box-shadow: inset 0 4px 12px rgba(0,0,0,0.85), 0 0 18px rgba(80, 160, 255, 0.85); }
.mg-btn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border: none;
  height: 58px; padding: 0 38px; border-radius: 30px;
  font: 900 26px Impact, "Arial Black", sans-serif; letter-spacing: 1.5px; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, #8fd0ff 0%, #2f86ff 45%, #0b4fd6 55%, #1d6cf0 100%);
  border: 3px solid #cfe8ff;
  box-shadow: 0 0 14px rgba(60, 150, 255, 0.8), inset 0 -4px 0 rgba(0,0,0,0.25);
  text-shadow: 0 2px 2px rgba(0,0,0,0.6);
}
.mg-btn:hover { filter: brightness(1.12); }
.mg-btn:active { transform: translateY(2px); }

.mg-error {
  background: rgba(170, 20, 20, 0.35); border: 1px solid #ff6b6b; color: #ffd2d2;
  border-radius: 10px; padding: 10px 14px; font-size: 16px; text-align: center; margin-bottom: 14px;
}

/* ---- 18+ notice ---- */
.mg-age { display: flex; align-items: center; gap: 16px; padding: 10px 18px; }
.mg-age .badge {
  flex: 0 0 64px; height: 64px; border-radius: 50%; background: #fff; border: 6px solid #e0261b;
  display: flex; align-items: center; justify-content: center; font: 900 22px Arial, sans-serif; color: #111;
}
.mg-age .t1 { font: 900 22px Impact, "Arial Black", sans-serif; color: #ff4b3e; letter-spacing: 0.5px; }
.mg-age .t2 { font-size: 15px; color: #f1f1f1; margin-top: 2px; }

/* ---- info bullets ---- */
.mg-info { padding: 26px 30px; }
.mg-info li { list-style: none; font-size: 21px; line-height: 1.55; color: #f4f4ff; text-shadow: 0 2px 3px #000; }
.mg-info li::before { content: "#"; margin-right: 12px; color: #ffd54a; font-weight: 900; }

/* ---- roulette wheel decoration ---- */
.mg-wheel { position: absolute; pointer-events: none; filter: drop-shadow(0 -10px 40px rgba(255, 120, 40, 0.35)); }
.mg-wheel .spin { animation: mg-spin 60s linear infinite; transform-origin: 50% 50%; transform-box: fill-box; }
@keyframes mg-spin { to { transform: rotate(360deg); } }

/* ---- top bar (mode + lobby) ---- */
.mg-topbar {
  position: absolute; left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: center; gap: 22px;
  padding: 0 150px 0 24px;
  background: linear-gradient(180deg, #0e2a7a 0%, #0a1b52 55%, #07123a 100%);
  border-bottom: 2px solid #2f6bff; box-shadow: 0 6px 18px rgba(0,0,0,0.55);
}
.mg-topbar .ver { font: 700 15px Arial, sans-serif; color: #fff; opacity: 0.9; }
.mg-topbar .sep { width: 2px; height: 40px; background: linear-gradient(180deg, transparent, #3d7bff, transparent); }
.mg-topbar .welcome { font: 900 22px "Trebuchet MS", Arial, sans-serif; color: #fff; text-transform: uppercase; }
.mg-topbar .balance { display: flex; align-items: center; gap: 10px; font: 900 24px Impact, "Arial Black", sans-serif; color: #ffe27a; letter-spacing: 1px; }
.mg-topbar .coin {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c0, #ffc21a 45%, #b36b00 100%);
  box-shadow: 0 0 8px rgba(255, 190, 0, 0.8), inset 0 0 0 3px rgba(255,255,255,0.35);
}
.mg-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 10px;
  border: 2px solid #ffd54a; color: #ffe9a0; font: 900 15px Arial, sans-serif; letter-spacing: 1px;
  background: rgba(0,0,0,0.3); text-decoration: none; cursor: pointer;
}
.mg-chip:hover { background: rgba(255, 213, 74, 0.15); }
.mg-logout {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px;
  border: 2px solid #ff8a7a; color: #fff; font: 900 15px Arial, sans-serif; text-decoration: none;
  background: linear-gradient(180deg, #e2463a, #9e1a12); cursor: pointer; margin-left: auto;
}
.mg-logout:hover { filter: brightness(1.12); }

/* ---- bottom ticker ---- */
.mg-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; overflow: hidden; background: rgba(0,0,0,0.35); }
.mg-ticker span {
  position: absolute; white-space: nowrap; top: 7px; font: 700 18px Arial, sans-serif; color: #ffe04a;
  animation: mg-ticker 28s linear infinite;
}
@keyframes mg-ticker { from { transform: translateX(1366px); } to { transform: translateX(-100%); } }

/* ---- ticket-mode cards ---- */
.mg-mode {
  position: absolute; width: 400px; height: 330px; border-radius: 26px; cursor: pointer; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: #fff; text-align: center; padding: 22px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mg-mode:hover { transform: translateY(-6px) scale(1.02); }
.mg-mode .icon { width: 130px; height: 130px; }
.mg-mode .name { font: 900 44px Impact, "Arial Black", sans-serif; letter-spacing: 2px; text-shadow: 0 3px 0 rgba(0,0,0,0.5); }
.mg-mode .desc { font-size: 17px; line-height: 1.4; color: #eef; max-width: 330px; }
.mg-mode .key {
  position: absolute; top: 16px; left: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font: 900 24px Arial, sans-serif;
  background: rgba(0,0,0,0.35); border: 2px solid rgba(255,255,255,0.6);
}
.mg-mode .last { position: absolute; top: 18px; right: 18px; font: 900 13px Arial, sans-serif; letter-spacing: 1px;
  padding: 5px 10px; border-radius: 8px; background: #ffd54a; color: #3a2200; }
.mg-mode.print {
  background: linear-gradient(160deg, #1d7a2f 0%, #0c4a1a 60%, #083612 100%);
  box-shadow: 0 0 0 3px #7dff8d inset, 0 0 30px rgba(60, 255, 110, 0.35), 0 20px 40px rgba(0,0,0,0.6);
}
.mg-mode.nonprint {
  background: linear-gradient(160deg, #2a4fd8 0%, #122c8c 60%, #0a1a5c 100%);
  box-shadow: 0 0 0 3px #8fc3ff inset, 0 0 30px rgba(70, 150, 255, 0.4), 0 20px 40px rgba(0,0,0,0.6);
}

/* ---- lobby ---- */
.mg-hall {
  position: absolute; left: 56px; top: 94px; width: 996px; height: 630px; border-radius: 28px;
  border: 4px solid #f3cf6a;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 90, 170, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(40, 8, 44, 0.78), rgba(18, 4, 26, 0.9));
  box-shadow: 0 0 0 2px #7a4a00 inset, 0 0 30px rgba(255, 200, 80, 0.35), 0 18px 50px rgba(0,0,0,0.6);
}
.mg-hall .plate {
  position: absolute; left: 18px; top: 18px; padding: 8px 20px; border-radius: 8px;
  border: 3px solid #d9a93a; background: linear-gradient(180deg, #2a1a05, #120a02);
  box-shadow: inset 0 0 0 2px #5c3a08; font-size: 36px;
}
.mg-tiles {
  position: absolute; left: 30px; right: 30px; top: 176px; bottom: 14px;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 26px 44px;
}
.mg-tile { width: 250px; text-align: center; text-decoration: none; color: #fff; cursor: pointer; transition: transform 0.15s; }
.mg-tile:hover { transform: translateY(-6px) scale(1.04); }
.mg-tile .disc {
  width: 158px; height: 158px; margin: 0 auto; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #3a2a6a 0%, #150b33 70%);
  box-shadow: 0 0 0 6px #f1c84f, 0 0 0 10px #7a4a00, 0 0 26px rgba(255, 190, 70, 0.55), inset 0 -18px 30px rgba(0,0,0,0.55);
}
.mg-tile .disc svg { position: absolute; top:0;right:0;bottom:0;left:0; width: 100%; height: 100%; }
.mg-tile .disc img.disc-art { position: absolute; top:0;right:0;bottom:0;left:0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mg-tile .ribbon {
  display: inline-block; margin-top: -26px; position: relative; padding: 7px 18px; border-radius: 10px;
  font: 900 20px Impact, "Arial Black", sans-serif; letter-spacing: 1px; color: #fff;
  background: linear-gradient(180deg, #7bd03b 0%, #3f8f16 55%, #2e6d0e 100%);
  border: 3px solid #f6dc80; box-shadow: 0 4px 10px rgba(0,0,0,0.6); text-shadow: 0 2px 2px rgba(0,0,0,0.6);
}
.mg-tile.hide { display: none; }

.mg-cats { position: absolute; right: 150px; top: 108px; display: flex; flex-direction: column; gap: 26px; }
.mg-cat {
  width: 118px; height: 118px; border-radius: 50%; cursor: pointer; position: relative; border: none; color: #fff;
  background: radial-gradient(circle at 50% 35%, #5a2f86, #1b0b33 75%);
  box-shadow: 0 0 0 5px #f1c84f, 0 0 0 8px #7a4a00, 0 0 20px rgba(255, 190, 70, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 900 17px Impact, "Arial Black", sans-serif; letter-spacing: 0.5px; line-height: 1.05; text-align: center;
}
.mg-cat svg { width: 46px; height: 46px; }
.mg-cat:hover { filter: brightness(1.15); }
.mg-cat.active::before {
  content: ""; position: absolute; left: -34px; top: 50%; transform: translateY(-50%);
  border: 16px solid transparent; border-right: 22px solid #f1c84f; border-left-width: 0;
}
.mg-cat.active { box-shadow: 0 0 0 5px #fff1a8, 0 0 0 8px #b87a00, 0 0 30px rgba(255, 220, 90, 0.9); }
