/* Globle leaderboard: a night sky with a spinning globe, results coloured hot (few guesses) to cold. */

.gl {
  --bull: #ff2d6f; --hot: #ff5a1f; --warm: #ffb020; --cool: #5ccfff; --cold: #4a6cff;
  --glass: rgba(255, 255, 255, .08); --glass-line: rgba(255, 255, 255, .17);
  position: relative; isolation: isolate; overflow: hidden;
  width: min(1360px, calc(100vw - 24px));
  margin: 20px 0 8px calc(50% - min(680px, 50vw - 12px));
  padding: clamp(18px, 4vw, 40px) clamp(14px, 3vw, 32px) 40px;
  border-radius: 26px; color: #eef4ff;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(255, 90, 31, .28), transparent 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(74, 108, 255, .3), transparent 70%),
    linear-gradient(180deg, #1a1446 0%, #0f1035 45%, #070a1f 100%);
}
.gl a { color: #9fdcff; }
.gl h2 { font: 400 clamp(1.15rem, 3.4vw, 1.45rem)/1.2 "Bungee", "Bricolage Grotesque", system-ui, sans-serif; margin-bottom: 12px; }
.gl-muted { color: rgba(238, 244, 255, .7); }

/* ---- Stars ---- */
.gl-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gl-stars i {
  position: absolute; left: calc(mod(var(--i) * 37, 100) * 1%); top: calc(mod(var(--i) * 53, 100) * 1%);
  width: calc(1px + mod(var(--i), 3) * 1px); aspect-ratio: 1; border-radius: 50%; background: #fff;
  animation: gl-twinkle calc(2s + mod(var(--i), 5) * .7s) ease-in-out infinite; animation-delay: calc(var(--i) * -.31s);
}
@keyframes gl-twinkle { 50% { opacity: .15; } }

/* ---- Hero: spinning globe with a drop pin ---- */
.gl-hero { text-align: center; margin-bottom: 18px; }
.gl-globe { width: clamp(96px, 18vw, 150px); height: auto; display: block; margin: 0 auto 4px; overflow: visible; filter: drop-shadow(0 10px 30px rgba(92, 207, 255, .35)); }
.gl-halo { fill: none; stroke: rgba(92, 207, 255, .35); stroke-width: 3; animation: gl-halo 3s ease-in-out infinite; transform-origin: 60px 60px; }
@keyframes gl-halo { 50% { transform: scale(1.06); opacity: .4; } }
.gl-land { fill: #6fe08a; opacity: .9; animation: gl-spin 14s linear infinite; }
@keyframes gl-spin { to { transform: translateX(-120px); } }
.gl-grid { stroke: rgba(255, 255, 255, .22); stroke-width: .8; }
.gl-pin path { fill: var(--bull); stroke: #fff; stroke-width: 1.5; }
.gl-pin { transform-origin: 60px 40px; animation: gl-drop 2.8s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes gl-drop { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-10px); } }
.gl-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: #ffcf9c; }
.gl-title { font: 400 clamp(2.6rem, 11vw, 5.6rem)/1 "Bungee", "Arial Black", sans-serif; margin: 6px 0 4px; display: flex; justify-content: center; flex-wrap: wrap; }
.gl-title span {
  display: inline-block;
  background: linear-gradient(180deg, #ffe08a 0%, #ff8a3d 45%, #ff2d6f 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #ff8a3d;
  filter: drop-shadow(0 3px 0 #3a1066) drop-shadow(0 6px 12px rgba(255, 90, 31, .35));
  animation: gl-wave 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .13s);
}
@keyframes gl-wave { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-9px) rotate(3deg); } }
.gl-date { font-weight: 700; color: #cfd9ff; }

/* ---- Cards ---- */
.gl-card {
  position: relative; margin: 16px auto; max-width: 1240px; padding: clamp(16px, 3vw, 24px);
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.gl.js .gl-reveal { opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.2); }
.gl.js .gl-reveal.in { opacity: 1; transform: none; }
.gl-pair { max-width: 1240px; margin: 0 auto; }
@media (min-width: 980px) {
  .gl-pair { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: start; margin: 16px auto; }
  .gl-pair > .gl-card { margin: 0; }
}
.gl-error { max-width: 1240px; margin: 0 auto; padding: 10px 16px; border-radius: 12px; background: #ff5f6d; color: #fff; font-weight: 700; }
.gl-splash {
  position: relative; max-width: 1240px; margin: 0 auto 8px; padding: 14px 18px; border-radius: 18px; text-align: center;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; align-items: center;
  background: linear-gradient(120deg, #ffe08a, #ff8a3d, #ff2d6f); color: #2a0a1c; font-size: 1.05rem;
  box-shadow: 0 8px 24px rgba(255, 90, 31, .35); animation: gl-pop .6s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes gl-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.gl-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.gl-burst i { position: absolute; font-style: normal; font-size: var(--s); animation: gl-fly var(--t) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes gl-fly { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* ---- Heat colours ---- */
.gl-heat { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: .8rem; font-weight: 800; color: #fff; }
.gl-heat.bull, .gl-bar i.bull, .gl-dot.bull, .gl-chart rect.bull { background: var(--bull); fill: var(--bull); }
.gl-heat.hot, .gl-bar i.hot, .gl-dot.hot, .gl-chart rect.hot { background: var(--hot); fill: var(--hot); }
.gl-heat.warm, .gl-bar i.warm, .gl-dot.warm, .gl-chart rect.warm { background: var(--warm); fill: var(--warm); color: #2a1600; }
.gl-heat.cool, .gl-bar i.cool, .gl-dot.cool, .gl-chart rect.cool { background: var(--cool); fill: var(--cool); color: #04263a; }
.gl-heat.cold, .gl-bar i.cold, .gl-dot.cold, .gl-chart rect.cold { background: var(--cold); fill: var(--cold); }
.gl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* ---- Your Globle today / log form ---- */
.gl-mine { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.gl-mine-one { flex: 1 1 140px; display: grid; justify-items: start; gap: 4px; padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); }
.gl-mode { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #ffcf9c; }
.gl-big { font: 400 clamp(2.4rem, 8vw, 3.4rem)/1 "Bungee", sans-serif; color: #fff; }
.gl-mine-one small { color: rgba(238, 244, 255, .75); }
.gl-fix { margin-top: 12px; }
.gl-fix summary { cursor: pointer; color: #9fdcff; font-weight: 600; }
.gl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; align-items: end; }
.gl-form .gl-wide { grid-column: 1 / -1; }
.gl-form label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .85rem; font-weight: 700; color: rgba(238, 244, 255, .85); }
.gl .gl-form input, .gl .gl-form select {
  width: 100%; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--glass-line);
  background: rgba(0, 0, 0, .28); color: #fff; font-size: 1.05rem; color-scheme: dark;
}
.gl-preview { grid-column: 1 / -1; min-height: 1.4em; font-weight: 700; }
.gl-form button {
  grid-column: 1 / -1; justify-self: start; padding: .75rem 1.6rem; border: none; border-radius: 99px;
  font: 400 1.05rem "Bungee", sans-serif; color: #2a0a1c;
  background: linear-gradient(90deg, #ffe08a, #ff8a3d); box-shadow: 0 6px 0 #a3361b, 0 10px 20px rgba(0, 0, 0, .25);
  transition: transform .1s, box-shadow .1s;
}
.gl-form button:hover { opacity: 1; filter: brightness(1.06); transform: translateY(-1px); }
.gl-form button:active { transform: translateY(5px); box-shadow: 0 1px 0 #a3361b; }

/* ---- Today's results ---- */
.gl-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gl-today h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #ffcf9c; margin-bottom: 8px; }
.gl-bars { list-style: none; display: grid; gap: 6px; }
.gl-bars li {
  display: grid; grid-template-columns: 2em minmax(3.5em, 7em) 1fr 2.2em; gap: 8px; align-items: center;
  padding: 5px 8px; border-radius: 12px; animation: gl-slide .5s ease both; animation-delay: calc(var(--d) * 70ms);
}
.gl-bars li.me { background: rgba(255, 207, 156, .14); outline: 1px solid rgba(255, 207, 156, .4); }
.gl-pos { text-align: center; font-weight: 800; }
.gl-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.gl-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; animation: gl-grow 1.1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--d) * 70ms + .2s); }
.gl-val { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
@keyframes gl-slide { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes gl-grow { from { width: 0; } }
.gl-waiting { margin-top: 12px; color: rgba(238, 244, 255, .75); font-size: .92rem; }

/* ---- Last week's champions ---- */
.gl-champs { max-width: 1240px; margin: 18px auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.gl-champ {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 16px;
  padding: 16px 22px; border-radius: 22px; color: #2a0a1c;
  background: linear-gradient(115deg, #fff1a8 0%, #ffcf3f 40%, #ff9a3c 75%, #ffe08a 100%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .5) inset, 0 12px 30px rgba(255, 154, 60, .4);
}
.gl-champ::after {
  content: ""; position: absolute; inset: -40% auto -40% -30%; width: 30%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-18deg); animation: gl-shine 4.5s ease-in-out infinite;
}
@keyframes gl-shine { 0%, 55% { left: -30%; } 100% { left: 130%; } }
.gl-champ-trophy { flex: none; font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1; animation: gl-trophy 2.4s ease-in-out infinite; }
@keyframes gl-trophy { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-6px); } }
.gl-champ-kicker { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7a3200; }
.gl .gl-champ-name { font: 400 clamp(1.5rem, 5vw, 2.2rem)/1.05 "Bungee", sans-serif; margin: 4px 0 6px; color: #2a0a1c; }
.gl-champ-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; }
.gl-champ-stats b { font-weight: 800; }

/* ---- Leaderboard ---- */
.gl-tabrow { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.gl-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(0, 0, 0, .3); max-width: 100%; overflow-x: auto; }
.gl-tabs a { padding: 7px 14px; border-radius: 99px; color: #d6e4ff; text-decoration: none; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s; }
.gl-tabs a.on { background: #ffcf3f; color: #2a0a1c; }
.gl-period { display: flex; align-items: center; gap: 12px; }
.gl-period h2 { margin: 0; }
.gl-period a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; text-decoration: none; font-size: 1.4rem; line-height: 1; color: #fff; background: rgba(255, 255, 255, .14); }
.gl-rule { margin-top: 6px; font-size: .88rem; }
.gl-podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 2vw, 16px); margin: 22px 0 14px; min-height: 220px; }
.gl-step { flex: 0 1 150px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.gl-medal { font-size: 2rem; animation: gl-bob 2.2s ease-in-out infinite; }
.gl-step.p1 .gl-medal { font-size: 2.6rem; }
.gl-pname { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-ptotal { font-size: .85rem; color: rgba(238, 244, 255, .85); }
.gl-block {
  width: 100%; margin-top: 6px; border-radius: 14px 14px 4px 4px; display: grid; place-items: start center; padding-top: 10px;
  font: 400 1.6rem "Bungee", sans-serif; color: rgba(42, 10, 28, .5);
  transform-origin: bottom; animation: gl-rise .9s cubic-bezier(.2, .9, .3, 1.15) both;
}
.gl-step.p1 .gl-block { height: 125px; background: linear-gradient(#fff3a6, #ffc93c); animation-delay: .25s; }
.gl-step.p2 .gl-block { height: 90px; background: linear-gradient(#f2f6ff, #b9c6dd); animation-delay: .1s; }
.gl-step.p3 .gl-block { height: 66px; background: linear-gradient(#ffd6b0, #e09a5f); animation-delay: .4s; }
.gl-step.me .gl-pname { color: #ffcf3f; }
@keyframes gl-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes gl-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.gl-table-wrap { overflow-x: auto; }
.gl-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.gl-table th, .gl-table td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); text-align: left; white-space: nowrap; }
.gl-table th { color: rgba(238, 244, 255, .65); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.gl-table tr.me td { background: rgba(255, 207, 63, .12); }
.gl-table tr.nq td { opacity: .5; }
.gl-table tbody tr:hover td { background: rgba(255, 255, 255, .06); }
.gl-note { margin-top: 8px; font-size: .85rem; }

/* ---- Hall of fame ---- */
.gl-fame { max-width: 1240px; margin: 30px auto 10px; }
.gl-section-title { text-align: center; }
.gl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gl-tile { position: relative; padding: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); transition: transform .25s, background .25s; }
.gl-tile:hover { transform: translateY(-4px) rotate(-.6deg); background: rgba(255, 255, 255, .13); }
.gl-tile h3 { padding-right: 2.2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(238, 244, 255, .7); }
.gl-tile p { color: rgba(238, 244, 255, .85); font-size: .9rem; }
.gl-tile .gl-bigval { font: 400 1.4rem/1.2 "Bungee", sans-serif; color: #fff; margin: 4px 0; }
.gl-ico { position: absolute; top: 12px; right: 14px; font-size: 1.7rem; animation: gl-bob 3s ease-in-out infinite; }
.gl-tile:nth-child(2n) .gl-ico { animation-delay: -1.2s; }

/* ---- Your stats ---- */
.gl-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gl-chips div { padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .25); text-align: center; }
.gl-chips b { display: block; font: 400 1.35rem "Bungee", sans-serif; color: #ffcf3f; }
.gl-chips span { font-size: .78rem; color: rgba(238, 244, 255, .75); }
.gl-chart-title { margin: 18px 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(238, 244, 255, .7); }
.gl-chart-title small { text-transform: none; letter-spacing: 0; }
.gl-chart { width: 100%; height: clamp(110px, 22vw, 160px); display: block; }
.gl-chart rect { transform-box: fill-box; transform-origin: bottom; animation: gl-rise .8s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(var(--d) * 25ms); }
.gl-axis { stroke: rgba(255, 255, 255, .25); stroke-width: 1; }
.gl-miss { fill: rgba(255, 255, 255, .25); }
.gl-legend { margin-top: 8px; font-size: .8rem; color: rgba(238, 244, 255, .7); }
.gl-legend .gl-dot { margin-left: 8px; margin-right: 3px; }

/* ---- Admin ---- */
.gl-admin { border-style: dashed; }
.gl-admin-buttons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
.gl .gl-form .gl-danger { background: transparent; color: #ffb3c8; box-shadow: none; border: 1px solid rgba(255, 179, 200, .6); font-family: inherit; font-size: .9rem; }
.gl-admin-msg { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: rgba(111, 224, 138, .2); font-weight: 700; }
.gl-admin-msg.bad { background: rgba(255, 95, 109, .25); }

@media (max-width: 560px) {
  .gl-form { grid-template-columns: 1fr; }
  .gl-table th:nth-child(5), .gl-table td:nth-child(5) { display: none; }
  .gl-podium { min-height: 190px; }
  .gl-champ { flex-direction: column; text-align: center; }
  .gl-champ-stats { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .gl *, .gl *::before, .gl *::after { animation: none !important; transition: none !important; }
  .gl.js .gl-reveal { opacity: 1; transform: none; }
}
