/* 🎨 Mağaza / Temalar. Everything that changes the site's look is under body.mq-theme-on (set only while the signed-in
   user has an active theme), so without a theme the site is exactly as before. Variables come from mq-themes.js:
   --mqt-accent, --mqt-accent-rgb, --mqt-on-accent, --mqt-bg-color, --mqt-bg-image. */

/* ---- Whole site: accent colour + background ---- */
body.mq-theme-on { --gold: var(--mqt-accent); --blue-accent: var(--mqt-accent); --search-border: var(--mqt-accent); --count-color: var(--mqt-accent);
  background-color: var(--mqt-bg-color);
  background-image: linear-gradient(rgba(5, 11, 20, .74), rgba(5, 11, 20, .84)), var(--mqt-bg-image);
  background-size: cover; background-position: center; background-attachment: fixed; }
body.light-mode.mq-theme-on { background-image: linear-gradient(rgba(248, 250, 252, .82), rgba(248, 250, 252, .9)), var(--mqt-bg-image); }
body.mq-theme-on .main-content { background-color: transparent; }
body.mq-theme-on .sidebar { background: linear-gradient(180deg, rgba(var(--mqt-accent-rgb), .12) 0%, var(--sidebar-bg) 38%); }
body.mq-theme-on .menu-item.active { background: linear-gradient(90deg, rgba(var(--mqt-accent-rgb), .2) 0%, transparent 100%) !important; color: var(--mqt-accent) !important; box-shadow: inset 5px 0 15px rgba(var(--mqt-accent-rgb), .08); }
body.mq-theme-on .match-card:hover { border-color: rgba(var(--mqt-accent-rgb), .45); }
/* Buttons */
body.mq-theme-on .btn-analyze { color: var(--mqt-accent); border-color: var(--mqt-accent); }
body.mq-theme-on .btn-analyze::before { background: linear-gradient(90deg, var(--mqt-accent), rgba(var(--mqt-accent-rgb), .75)); }
body.mq-theme-on .btn-analyze:hover { color: var(--mqt-on-accent); box-shadow: 0 10px 24px -10px rgba(var(--mqt-accent-rgb), .85); }
body.mq-theme-on .btn-buy, body.mq-theme-on .btn-update { background: var(--mqt-accent); color: var(--mqt-on-accent); }
body.mq-theme-on .mq-store-tab.is-active { background: var(--mqt-accent); color: var(--mqt-on-accent); }
/* "Analiz Et" window: frame, header line and the prediction boxes take the theme colour
   (the pick buttons keep their own green / red meaning). */
body.mq-theme-on #analysisModal .modal-content { border-color: rgba(var(--mqt-accent-rgb), .55); box-shadow: 0 30px 80px -30px rgba(var(--mqt-accent-rgb), .55); }
body.mq-theme-on #analysisModal .modal-header { border-bottom: 2px solid var(--mqt-accent); }
body.mq-theme-on #analysisModal .pred-item, body.mq-theme-on #analysisModal .mqx-item { background: rgba(var(--mqt-accent-rgb), .07); border-color: rgba(var(--mqt-accent-rgb), .38); }
body.mq-theme-on #analysisModal .pred-item:hover { border-color: var(--mqt-accent); box-shadow: 0 6px 18px -6px rgba(var(--mqt-accent-rgb), .6); }
body.mq-theme-on #analysisModal .pred-sub, body.mq-theme-on #analysisModal .mqx-sub { color: var(--mqt-accent); }

/* ---- Mağaza "🎨 Temalar" cards ---- */
.mq-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.mq-theme-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; text-align: center; background: linear-gradient(170deg, #131d33, #080e1c); border: 1px solid rgba(255, 255, 255, .12); transition: transform .25s ease, box-shadow .25s ease; }
.mq-theme-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .8); }
.mq-theme-card.is-active { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, .3) inset; }
.mq-theme-card.is-owned { border-color: rgba(96, 165, 250, .6); }
.mq-theme-card__name { font-size: 16px; font-weight: 900; color: #fff; overflow-wrap: anywhere; }
.mq-theme-card__price { font-size: 13px; font-weight: 800; color: #fde68a; }
.mq-theme-card__btn { width: 100%; padding: 10px 8px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 900; color: #0b1120; background: linear-gradient(135deg, #fde68a, #facc15 50%, #f59e0b); }
.mq-theme-card.is-owned .mq-theme-card__btn { color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.mq-theme-card.is-active .mq-theme-card__btn { color: #fff; background: linear-gradient(135deg, #22c55e, #15803d); }
.mq-theme-card__btn:disabled { cursor: default; }
.mq-theme-card:not(.is-active) .mq-theme-card__btn:disabled { opacity: .55; filter: grayscale(.4); }
.mq-themes__reset { grid-column: 1 / -1; justify-self: center; padding: 6px 12px; border: 0; background: none; cursor: pointer; font-size: 13px; font-weight: 700; color: #94a3b8; text-decoration: underline; }
/* Preview swatch: the theme's background with an "Analiz Et" chip in its accent colour. */
.mq-theme-swatch { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 96px; padding: 10px; border-radius: 12px; overflow: hidden; background-color: #0b1221; background-size: cover; background-position: center; border: 2px solid var(--mqt-swatch-accent, rgba(255, 255, 255, .15)); }
.mq-theme-swatch::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(5, 11, 20, .55)); }
.mq-theme-swatch__chip { position: relative; padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 800; background: #334155; color: #fff; }
.mq-theme-swatch--big { height: 130px; margin-bottom: 10px; }
.mq-theme-swatch--row { width: 92px; height: 52px; flex: none; padding: 5px; }
.mq-theme-swatch--row .mq-theme-swatch__chip { padding: 2px 8px; font-size: 10px; }
.mq-theme-swatch--admin { height: 110px; }
@media (max-width: 600px) { .mq-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .mq-theme-swatch { height: 78px; } }
body.light-mode .mq-theme-card { background: #fff; border-color: #e2e8f0; }
body.light-mode .mq-theme-card__name { color: #0f172a; }
body.light-mode .mq-theme-card__price { color: #92400e; }

/* ---- Admin card ---- */
#themes-admin-card .themes-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
#themes-admin-card .themes-admin-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
#themes-admin-card .themes-admin-form .input-box { margin: 0; }
#themes-admin-card .themes-admin-color { display: flex; align-items: center; gap: 8px; }
#themes-admin-card .themes-admin-color input[type="color"] { width: 54px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); background: #0f172a; cursor: pointer; }
#themes-admin-card .themes-admin-color input[type="color"]:disabled { opacity: .35; cursor: not-allowed; }
#themes-admin-card .themes-admin-color label { flex-direction: row; align-items: center; gap: 6px; font-weight: 600; }
#themes-admin-card .themes-admin-wide { grid-column: 1 / -1; }
.themes-admin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.themes-admin-row__text { display: flex; flex-direction: column; flex: 1 1 140px; min-width: 0; }
.themes-admin-row__info { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.themes-admin-row__price { width: 110px; margin: 0; }
@media (max-width: 760px) { #themes-admin-card .themes-admin-form { grid-template-columns: 1fr; } }

/* ---- Admin preview: "Plana Bax" live button (reacts like the site's outline buttons) ---- */
.mq-theme-swatch__chip.is-live { padding: 8px 22px; font-size: 13px; font-family: inherit; cursor: pointer; color: var(--chip-accent, #fff); background: rgba(5, 11, 20, .55); border: 1.5px solid var(--chip-accent, #fff); transition: background-color .2s ease, color .2s ease, box-shadow .25s ease, transform .15s ease, filter .15s ease; }
.mq-theme-swatch__chip.is-live:hover { color: var(--chip-on, #0b1120); background: var(--chip-accent, #fff); box-shadow: 0 10px 24px -8px rgba(var(--chip-rgb, 255, 255, 255), .9); transform: translateY(-2px); }
.mq-theme-swatch__chip.is-live:active { transform: translateY(0) scale(.94); filter: brightness(.85); box-shadow: 0 4px 10px -4px rgba(var(--chip-rgb, 255, 255, 255), .9); }
.mq-theme-swatch__chip.is-live:focus-visible { outline: 2px solid var(--chip-accent, #fff); outline-offset: 3px; }
.mq-theme-swatch__chip.is-live.is-clicked { animation: mqtChipPulse .55s ease-out; }
@keyframes mqtChipPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--chip-rgb, 255, 255, 255), .75); } 100% { box-shadow: 0 0 0 16px rgba(var(--chip-rgb, 255, 255, 255), 0); } }
@media (prefers-reduced-motion: reduce) { .mq-theme-swatch__chip.is-live, .mq-theme-swatch__chip.is-live:hover { transition: none; transform: none; } .mq-theme-swatch__chip.is-live.is-clicked { animation: none; } }

/* ---- Admin gallery: ready-made backgrounds and colours ---- */
#themes-admin-card .themes-admin-gallery { display: flex; flex-direction: column; gap: 8px; }
.themes-admin-gallery__title { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.themes-admin-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.themes-admin-gallery__grid--colors { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.themes-admin-gallery__tile { position: relative; display: flex; align-items: flex-end; height: 66px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background-color: #0b1221; background-size: cover; background-position: center; border: 2px solid rgba(255, 255, 255, .12); transition: border-color .2s ease, transform .2s ease; }
.themes-admin-gallery__tile--color { height: 44px; }
.themes-admin-gallery__tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .4); }
.themes-admin-gallery__tile.is-selected { border-color: #fbbf24; box-shadow: 0 0 0 2px rgba(251, 191, 36, .35); }
.themes-admin-gallery__tile.is-selected::after { content: "✓"; position: absolute; top: 4px; right: 6px; font-size: 13px; font-weight: 900; color: #fbbf24; text-shadow: 0 1px 3px #000; }
.themes-admin-gallery__tile span { width: 100%; padding: 3px 6px; font-size: 11px; font-weight: 700; text-align: left; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Profil: "🎨 Mənim Arxa Planlarım (Temalarım)" ---- */
.mq-my-themes { border: 1px solid rgba(212, 175, 55, .4); background: linear-gradient(180deg, #0b1221 0%, rgba(212, 175, 55, .07) 100%); }
.mq-my-themes__head { display: flex; gap: 10px; align-items: center; margin-bottom: 5px; }
.mq-my-themes__marker { width: 3px; height: 20px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 8px var(--gold); }
.mq-my-themes__head h3 { margin: 0; color: #fff; font-family: Georgia, serif; font-size: 20px; }
.mq-my-themes__lead { margin: 0 0 14px; padding-left: 13px; font-size: 13px; color: var(--text-muted); }
.mq-my-themes__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mq-my-theme { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1); }
.mq-my-theme.is-active { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, .25) inset; }
.mq-my-theme__name { font-size: 14px; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.mq-my-theme__btn { padding: 9px 8px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 900; color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.mq-my-theme.is-active .mq-my-theme__btn { background: linear-gradient(135deg, #22c55e, #15803d); cursor: default; }
.mq-my-theme:not(.is-active) .mq-my-theme__btn:disabled { opacity: .6; }
.mq-theme-swatch--mine { height: 74px; }
.mq-my-themes__hint { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--text-muted); background: rgba(0, 0, 0, .3); border: 1px dashed rgba(212, 175, 55, .4); }
.mq-my-themes__go { padding: 8px 14px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; color: #0b1120; background: linear-gradient(135deg, #fde68a, #facc15 50%, #f59e0b); }
@media (max-width: 600px) { .mq-my-themes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .mq-theme-swatch--mine { height: 64px; } }
body.light-mode .mq-my-themes { background: #fff; }
body.light-mode .mq-my-themes__head h3, body.light-mode .mq-my-theme__name { color: #0f172a; }
body.light-mode .mq-my-theme { background: #f8fafc; border-color: #e2e8f0; }
/* ================= VIP extras: font, neon glow, VIP name frame, button hover animation ================= */
/* Font: headings, navigation, buttons, team names and prediction boxes (long body text keeps the readable site font). */
/* The theme font covers the WHOLE site: left menu, right menu, mobile menus, bulletin, windows, forms, every text. */
body.mq-theme-font, body.mq-theme-font *, body.mq-theme-font *::before, body.mq-theme-font *::after, body.mq-theme-font ::placeholder { font-family: var(--mqt-font) !important; }
body.mq-theme-font :is(h1, h2, h3, h4, .menu-item, .btn-analyze, .pred-btn, .mq-store-tab) { letter-spacing: .02em; }
/* Exceptions: code keeps a monospace font; theme previews (store, profile, admin) show THEIR own font, not the active one. */
body.mq-theme-font :is(code, pre, kbd, samp) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; }
body.mq-theme-font .mq-theme-swatch.has-font :is(.mq-theme-swatch__chip, .mq-theme-swatch__title) { font-family: var(--mqt-swatch-font) !important; }
body.mq-theme-font .mq-theme-swatch:not(.has-font) :is(.mq-theme-swatch__chip, .mq-theme-swatch__title) { font-family: var(--mq-font, "Inter", system-ui, sans-serif) !important; }

/* Neon glow (theme option): buttons and boxes shine in the theme colour. */
body.mq-theme-glow .btn-analyze { box-shadow: 0 0 10px rgba(var(--mqt-accent-rgb), .55), 0 0 22px rgba(var(--mqt-accent-rgb), .25); }
body.mq-theme-glow .match-card { box-shadow: 0 0 0 1px rgba(var(--mqt-accent-rgb), .22), 0 0 18px -4px rgba(var(--mqt-accent-rgb), .35); }
body.mq-theme-glow #analysisModal .pred-item, body.mq-theme-glow #analysisModal .mqx-item { box-shadow: 0 0 14px -2px rgba(var(--mqt-accent-rgb), .5), inset 0 0 12px -6px rgba(var(--mqt-accent-rgb), .6); }
body.mq-theme-glow #analysisModal .modal-content { box-shadow: 0 0 40px -6px rgba(var(--mqt-accent-rgb), .6); }
body.mq-theme-glow .menu-item.active { box-shadow: inset 5px 0 15px rgba(var(--mqt-accent-rgb), .15), 0 0 16px -6px rgba(var(--mqt-accent-rgb), .7); }
body.mq-theme-glow .mq-store-tab.is-active, body.mq-theme-glow .btn-update, body.mq-theme-glow .btn-buy { box-shadow: 0 0 14px rgba(var(--mqt-accent-rgb), .55); }

/* Button hover animation (any active theme): a light grow + a shine sweeping across in the theme colour. */
body.mq-theme-on .btn-analyze { transition: color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
body.mq-theme-on .btn-analyze::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: 0; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); opacity: 0; }
body.mq-theme-on .btn-analyze:hover { transform: scale(1.05); }
body.mq-theme-on .btn-analyze:hover::after { animation: mqtShine .75s ease-out; }
body.mq-theme-on .btn-analyze:active { transform: scale(.97); }
@keyframes mqtShine { 0% { left: -60%; opacity: 1; } 100% { left: 120%; opacity: 0; } }

/* VIP name frame: Profil name + Liderlər Lövhəsi names of users with an active theme. */
.mq-vip-name { display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--vip-accent); background: rgba(var(--vip-rgb), .14); color: #fff !important; box-shadow: 0 0 0 1px rgba(var(--vip-rgb), .25), 0 0 12px -2px rgba(var(--vip-rgb), .7); animation: mqtVipPulse 2.6s ease-in-out infinite; }
.mq-vip-name::before { content: "👑"; font-size: .85em; line-height: 1; filter: drop-shadow(0 0 4px rgba(var(--vip-rgb), .9)); }
.mq-vip-name.is-glow { box-shadow: 0 0 0 1px rgba(var(--vip-rgb), .35), 0 0 18px rgba(var(--vip-rgb), .85), 0 0 34px -6px rgba(var(--vip-rgb), .7); }
@keyframes mqtVipPulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(var(--vip-rgb), .25), 0 0 10px -2px rgba(var(--vip-rgb), .55); } 50% { box-shadow: 0 0 0 1px rgba(var(--vip-rgb), .4), 0 0 18px rgba(var(--vip-rgb), .85); } }
body.light-mode .mq-vip-name { color: #0f172a !important; }
@media (prefers-reduced-motion: reduce) { .mq-vip-name { animation: none; } body.mq-theme-on .btn-analyze:hover { transform: none; } body.mq-theme-on .btn-analyze:hover::after { animation: none; } }

/* Previews (store cards, profile list, admin): font + glow + the admin's "Plana Bax" premium hover. */
.mq-theme-swatch.has-font .mq-theme-swatch__chip, .mq-theme-swatch.has-font .mq-theme-swatch__title { font-family: var(--mqt-swatch-font); letter-spacing: .03em; }
.mq-theme-swatch.is-glow { box-shadow: 0 0 16px -2px rgba(var(--mqt-swatch-rgb, 255, 255, 255), .75); }
.mq-theme-swatch.is-glow .mq-theme-swatch__chip { box-shadow: 0 0 12px rgba(var(--mqt-swatch-rgb, 255, 255, 255), .8); }
.mq-theme-swatch__title { position: absolute; top: 10px; left: 12px; z-index: 1; font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.mq-theme-swatch__chip.is-live { position: relative; overflow: hidden; }
.mq-theme-swatch__chip.is-live::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); opacity: 0; pointer-events: none; }
.mq-theme-swatch__chip.is-live:hover { transform: translateY(-2px) scale(1.06); }
.mq-theme-swatch__chip.is-live:hover::after { animation: mqtShine .75s ease-out; }
.mq-theme-swatch__chip.is-live:active { transform: translateY(0) scale(.94); }
.mq-theme-swatch.is-glow .mq-theme-swatch__chip.is-live { box-shadow: 0 0 12px rgba(var(--chip-rgb, 255, 255, 255), .7); }
.mq-theme-swatch.is-glow .mq-theme-swatch__chip.is-live:hover { box-shadow: 0 0 22px rgba(var(--chip-rgb, 255, 255, 255), .95), 0 10px 24px -8px rgba(var(--chip-rgb, 255, 255, 255), .9); }
#themes-admin-card .themes-admin-check, #themes-admin-card .themes-admin-form label.themes-admin-check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--text-color); cursor: pointer; }
/* ================= Premium 4: live trial, sale countdown, light-mode adaptation ================= */
/* "Sınaqdan Keçir" button + the 10-second bar at the bottom of the screen. */
.mq-theme-card__try { width: 100%; padding: 8px; border: 1px dashed rgba(255, 255, 255, .3); border-radius: 12px; cursor: pointer; font-weight: 800; font-size: 13px; color: #e2e8f0; background: rgba(255, 255, 255, .05); transition: background .2s ease, border-color .2s ease; }
.mq-theme-card__try:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); }
.mq-theme-trial { position: fixed; left: 50%; bottom: 22px; z-index: 100000; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 999px; color: #fff; background: rgba(8, 13, 26, .94); border: 1px solid var(--mqt-accent, #d4af37); box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .8), 0 0 0 4px rgba(var(--mqt-accent-rgb, 212, 175, 55), .18); overflow: hidden; font-size: 14px; }
.mq-theme-trial[hidden] { display: none; }
/* Phones: at the top, under the header (the bottom corners hold the floating "Yarışma Kuponum" button). */
@media (max-width: 600px) { .mq-theme-trial { top: 74px; bottom: auto; font-size: 13px; } }
.mq-theme-trial::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--trial-progress, 1) * 100%); background: var(--mqt-accent, #d4af37); transition: width 1s linear; }
.mq-theme-trial__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mq-theme-trial__count { flex: none; white-space: nowrap; min-width: 52px; text-align: center; padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; color: var(--mqt-on-accent, #0b1120); background: var(--mqt-accent, #d4af37); }
.mq-theme-trial__stop { padding: 6px 12px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .14); }
/* Sale countdown on the card. */
.mq-theme-card__timer { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; font-size: 12px; color: #fecaca; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); }
.mq-theme-card__timer-value { font-variant-numeric: tabular-nums; color: #fff; }
.mq-theme-card__timer.is-soon { animation: mqtSoon 1s ease-in-out infinite; }
@keyframes mqtSoon { 50% { border-color: rgba(239, 68, 68, .9); background: rgba(239, 68, 68, .22); } }
body.light-mode .mq-theme-card__timer { color: #991b1b; background: #fef2f2; border-color: #fca5a5; }
body.light-mode .mq-theme-card__timer-value { color: #7f1d1d; }
body.light-mode .mq-theme-card__try { color: #334155; background: #f8fafc; border-color: #cbd5e1; }
/* Admin form bits. */
#themes-admin-card .themes-admin-inline { display: flex; gap: 8px; align-items: center; }
#themes-admin-card .themes-admin-inline .input-box { flex: 1; min-width: 0; }
#themes-admin-card .themes-admin-inline .news-admin-btn { flex: none; }
.themes-admin-row.is-expired { opacity: .6; }

/* Light mode with an active theme: the accent used as TEXT switches to a darker readable shade (--mqt-accent-ink,
   contrast ≥ 4.5 on white); fills / borders keep the real colour; the background image gets a lighter veil. */
body.light-mode.mq-theme-on { --gold: var(--mqt-accent-ink); --blue-accent: var(--mqt-accent-ink); --count-color: var(--mqt-accent-ink); --search-border: var(--mqt-accent); }
body.light-mode.mq-theme-on .main-content { background-color: rgba(248, 250, 252, .55); }
body.light-mode.mq-theme-on .sidebar { background: linear-gradient(180deg, rgba(var(--mqt-accent-rgb), .1) 0%, var(--sidebar-bg) 38%); }
body.light-mode.mq-theme-on .menu-item.active { color: var(--mqt-accent-ink) !important; background: linear-gradient(90deg, rgba(var(--mqt-accent-rgb), .16) 0%, transparent 100%) !important; }
body.light-mode.mq-theme-on .btn-analyze { color: var(--mqt-accent-ink); border-color: var(--mqt-accent); background: rgba(255, 255, 255, .85); }
body.light-mode.mq-theme-on .btn-analyze:hover { color: var(--mqt-on-accent); }
body.light-mode.mq-theme-on .match-card { background-color: rgba(255, 255, 255, .92); }
body.light-mode.mq-theme-on #analysisModal .pred-item, body.light-mode.mq-theme-on #analysisModal .mqx-item { background: rgba(var(--mqt-accent-rgb), .08); border-color: rgba(var(--mqt-accent-rgb), .45); }
body.light-mode.mq-theme-on #analysisModal .pred-sub, body.light-mode.mq-theme-on #analysisModal .mqx-sub { color: var(--mqt-accent-ink); }
body.light-mode.mq-theme-on .mq-vip-name, body.light-mode .mq-vip-name { color: #0f172a !important; background: rgba(var(--vip-rgb), .12); }
body.light-mode.mq-theme-glow .btn-analyze { box-shadow: 0 0 10px rgba(var(--mqt-accent-rgb), .45); }
body.light-mode.mq-theme-glow .match-card { box-shadow: 0 0 0 1px rgba(var(--mqt-accent-rgb), .3), 0 8px 20px -10px rgba(var(--mqt-accent-rgb), .45); }
/* ================= VIP 3: theme badge, Designer Pack, icon + logo tint ================= */
/* Theme badge next to the name (Profil + Liderlər Lövhəsi). */
.mq-theme-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 9px; border-radius: 999px; vertical-align: middle; white-space: nowrap; font-size: 12px; font-weight: 800; line-height: 1.4; color: #fff; background: linear-gradient(135deg, rgba(var(--vip-rgb), .85), rgba(var(--vip-rgb), .55)); border: 1px solid var(--vip-accent); box-shadow: 0 2px 10px -3px rgba(var(--vip-rgb), .8); text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.mq-theme-badge.is-glow { box-shadow: 0 0 12px rgba(var(--vip-rgb), .9); }
#contest-podium .mq-theme-badge { margin: 6px auto 0; display: table; }
body.light-mode .mq-theme-badge { color: #fff; }

/* Menu icons + logo follow the theme colour (only while a theme is on). */
.mq-menu-icon { display: inline-block; }
body.mq-theme-on .sidebar .mq-menu-icon,
body.mq-theme-on .mobile-drawer-link > span:first-child:not([class]):not([data-az]),
body.mq-theme-on .mq-brand .mq-logo-ball, body.mq-theme-on .mq-secret-mobile-logo .mq-logo-ball { filter: var(--mqt-icon-filter); transition: filter .4s ease; }
body.mq-theme-on .mq-logo-word { background: linear-gradient(100deg, #ffffff 0%, rgba(var(--mqt-accent-rgb), .55) 28%, var(--mqt-accent) 58%, #ffffff 82%, var(--mqt-accent) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 8px rgba(var(--mqt-accent-rgb), .45)); }
body.mq-theme-on .mq-logo-ai { color: var(--mqt-on-accent); background: linear-gradient(135deg, #ffffff 0%, var(--mqt-accent) 55%, rgba(var(--mqt-accent-rgb), .7) 100%); box-shadow: 0 4px 14px -4px rgba(var(--mqt-accent-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
body.light-mode.mq-theme-on .mq-logo-word { background: linear-gradient(100deg, var(--mqt-accent-ink) 0%, var(--mqt-accent) 45%, var(--mqt-accent-ink) 100%); -webkit-background-clip: text; background-clip: text; }

/* Designer Pack: store card + the profile builder. */
.mq-designer-swatch { background: conic-gradient(from 200deg at 50% 60%, #f43f5e, #f59e0b, #facc15, #22c55e, #0ea5e9, #6366f1, #a855f7, #f43f5e); align-items: center; }
.mq-designer-swatch::before { background: radial-gradient(circle, rgba(5, 11, 20, .15), rgba(5, 11, 20, .55)); }
.mq-designer-swatch__icon { position: relative; font-size: 34px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5)); }
.mq-designer-card { border-color: rgba(250, 204, 21, .55); background: radial-gradient(120% 80% at 50% 0%, rgba(168, 85, 247, .22), transparent 60%), linear-gradient(170deg, #131d33, #080e1c); }
.mq-designer-card__text { font-size: 12px; color: #cbd5e1; line-height: 1.4; }
body.light-mode .mq-designer-card { background: #fff; }
body.light-mode .mq-designer-card__text { color: #475569; }
.mq-designer-panel { margin-top: 14px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(168, 85, 247, .4); }
.mq-designer-panel.is-locked { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); border-style: dashed; }
.mq-designer-panel__title { display: block; margin-bottom: 10px; font-size: 15px; color: #fff; }
.mq-designer-panel__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mq-designer-panel__grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.mq-designer-panel__grid input[type="color"] { width: 100%; height: 42px; padding: 2px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: #0f172a; cursor: pointer; }
.mq-designer-panel__grid .input-box { margin: 0; height: 42px; padding: 0 12px; line-height: 40px; }
.mq-designer-panel__preview { margin: 12px 0; }
.mq-theme-swatch--designer { height: 110px; }
.mq-designer-panel__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mq-designer-panel__actions button { flex: 1 1 160px; padding: 11px 12px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 900; }
.mq-designer-try { color: #e2e8f0; background: rgba(255, 255, 255, .1); border: 1px dashed rgba(255, 255, 255, .3) !important; }
.mq-designer-save { color: #0b1120; background: linear-gradient(135deg, #fde68a, #facc15 50%, #f59e0b); }
.mq-designer-save:disabled { opacity: .6; cursor: wait; }
.mq-designer-panel__status { min-height: 18px; margin-top: 8px; font-size: 13px; font-weight: 700; color: #4ade80; }
.mq-designer-panel__status.is-error { color: #f87171; }
@media (max-width: 600px) { .mq-designer-panel__grid { grid-template-columns: 1fr 1fr; } .mq-designer-panel__grid label:last-child { grid-column: 1 / -1; } }
body.light-mode .mq-designer-panel { background: #f8fafc; }
body.light-mode .mq-designer-panel__title { color: #0f172a; }
body.light-mode .mq-designer-try { color: #334155; background: #fff; }
#themes-admin-card .themes-admin-designer { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(168, 85, 247, .5); background: rgba(168, 85, 247, .06); }
#themes-admin-card .themes-admin-designer p { margin: 6px 0 10px; font-size: 12px; color: var(--text-muted); }
#themes-admin-card .themes-admin-designer .themes-admin-inline .input-box { max-width: 180px; }
/* ================= One badge + tooltip + "Mənim Nişanlarım" ================= */
/* Long badge names are cut with "…" next to the name; the tooltip shows the full name. */
.mq-theme-badge { max-width: 170px; overflow: hidden; text-overflow: ellipsis; cursor: help; outline: none; }
.mq-theme-badge:focus-visible, .mq-rank-badge:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--vip-accent, #d4af37); }
.mq-rank-badge { cursor: help; max-width: 190px; }
.mq-rank-badge__name { overflow: hidden; text-overflow: ellipsis; }
.mq-badge-tip { position: fixed; z-index: 100001; display: flex; flex-direction: column; gap: 2px; max-width: min(260px, calc(100vw - 16px)); padding: 8px 12px; border-radius: 10px; pointer-events: none; color: #fff; background: rgba(8, 13, 26, .96); border: 1px solid var(--tip-accent, #d4af37); box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .8), 0 0 14px -4px var(--tip-accent, #d4af37); opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease; }
.mq-badge-tip.is-on { opacity: 1; transform: translateY(0); }
.mq-badge-tip[hidden] { display: none; }
.mq-badge-tip strong { font-size: 14px; font-weight: 900; overflow-wrap: anywhere; }
.mq-badge-tip small { font-size: 11px; color: #cbd5e1; }
.mq-badge-tip::after { content: ""; position: absolute; left: var(--tip-arrow, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: inherit; border-right: 1px solid var(--tip-accent, #d4af37); border-bottom: 1px solid var(--tip-accent, #d4af37); transform: rotate(45deg); }
.mq-badge-tip.is-below::after { bottom: auto; top: -6px; transform: rotate(225deg); }
body.light-mode .mq-badge-tip { color: #0f172a; background: #fff; }
body.light-mode .mq-badge-tip small { color: #475569; }
@media (prefers-reduced-motion: reduce) { .mq-badge-tip { transition: none; } }

/* Profil: "🏅 Mənim Nişanlarım" list (same look as "Mənim Arxa Planlarım"). */
.mq-my-badges__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mq-my-badge { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 10px; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1); }
.mq-my-badge.is-active { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, .25) inset; }
.mq-my-badge__pill { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 12px; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, rgba(var(--vip-rgb, 212, 175, 55), .85), rgba(var(--vip-rgb, 212, 175, 55), .5)); border: 1px solid var(--vip-accent, #d4af37); text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.mq-my-badge.is-none .mq-my-badge__pill { color: #cbd5e1; background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .3); text-shadow: none; }
.mq-my-badge__sub { min-height: 16px; font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.mq-my-badge .mq-my-theme__btn { width: 100%; }
.mq-my-badge.is-active .mq-my-theme__btn { background: linear-gradient(135deg, #22c55e, #15803d); cursor: default; }
@media (max-width: 600px) { .mq-my-badges__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
body.light-mode .mq-my-badge { background: #f8fafc; border-color: #e2e8f0; }
body.light-mode .mq-my-badge.is-none .mq-my-badge__pill { color: #475569; background: #fff; border-color: #cbd5e1; }
/* ================= Stock (limited themes) + ready sounds ================= */
.mq-theme-card__stock { padding: 6px 8px; border-radius: 10px; font-size: 13px; font-weight: 900; color: #fff7ed; background: linear-gradient(135deg, rgba(249, 115, 22, .35), rgba(239, 68, 68, .3)); border: 1px solid rgba(249, 115, 22, .6); }
.mq-theme-card__stock.is-low { animation: mqtStockPulse 1.4s ease-in-out infinite; }
.mq-theme-card__stock.is-out { color: #e2e8f0; background: rgba(100, 116, 139, .25); border-color: rgba(148, 163, 184, .45); }
@keyframes mqtStockPulse { 50% { box-shadow: 0 0 14px rgba(249, 115, 22, .65); border-color: #f97316; } }
.mq-theme-card.is-soldout .mq-theme-swatch { filter: grayscale(.85) brightness(.75); }
.mq-theme-card__btn.is-soldout { color: #cbd5e1; background: rgba(100, 116, 139, .35); cursor: not-allowed; opacity: 1; filter: none; }
.mq-theme-card:not(.is-active) .mq-theme-card__btn.is-soldout:disabled { opacity: 1; filter: none; }
body.light-mode .mq-theme-card__stock { color: #9a3412; background: #fff7ed; border-color: #fdba74; }
body.light-mode .mq-theme-card__stock.is-out { color: #475569; background: #f1f5f9; border-color: #cbd5e1; }
body.light-mode .mq-theme-card__btn.is-soldout { color: #475569; background: #e2e8f0; }
@media (prefers-reduced-motion: reduce) { .mq-theme-card__stock.is-low { animation: none; } }
#themes-admin-card .themes-admin-sound #theme-sound-preset { flex: 0 1 230px; min-width: 150px; }
@media (max-width: 760px) { #themes-admin-card .themes-admin-sound { flex-wrap: wrap; } #themes-admin-card .themes-admin-sound #theme-sound-preset { flex: 1 1 100%; } }
/* ================= Profil "🗑 Sil" ================= */
.mq-my-theme, .mq-my-badge { position: relative; }
.mq-item-del { position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer; color: #fecaca; background: rgba(15, 23, 42, .78); border: 1px solid rgba(248, 113, 113, .45); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .7); transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease; }
.mq-item-del:hover { color: #fff; background: #dc2626; border-color: #ef4444; transform: scale(1.08); }
.mq-item-del:active { transform: scale(.95); }
.mq-item-del:focus-visible { outline: 2px solid #f87171; outline-offset: 2px; }
.mq-item-del:disabled { opacity: .5; cursor: wait; }
@media (hover: none) { .mq-item-del { width: 34px; height: 34px; } }
body.light-mode .mq-item-del { color: #b91c1c; background: #fff; border-color: #fca5a5; }
body.light-mode .mq-item-del:hover { color: #fff; background: #dc2626; }
/* Confirmation window: red "Bəli, sil". */
.mq-remove-dialog__icon { font-size: 46px; line-height: 1; margin-bottom: 6px; text-align: center; }
.mq-rank-dialog__yes.is-danger { color: #fff; background: linear-gradient(135deg, #ef4444, #b91c1c); }
.mq-rank-dialog__no:disabled { opacity: .5; }
/* ================= Club colours (two team colours) + 🎄 New Year luxury ================= */
/* Club themes: the left menu, the mobile left / right menus and the right panel take BOTH team colours. Without a
   second colour (--mqt-accent2 = accent) the look stays exactly like a one-colour theme. */
body.mq-theme-dual .sidebar { background: linear-gradient(180deg, rgba(var(--mqt-accent-rgb), .16) 0%, rgba(var(--mqt-accent2-rgb), .08) 30%, var(--sidebar-bg) 60%); border-right: 1px solid transparent; border-image: linear-gradient(180deg, var(--mqt-accent), var(--mqt-accent2)) 1; }
body.mq-theme-dual .menu-item.active { background: linear-gradient(90deg, rgba(var(--mqt-accent-rgb), .24) 0%, rgba(var(--mqt-accent2-rgb), .12) 55%, transparent 100%) !important; box-shadow: inset 4px 0 0 var(--mqt-accent), inset 0 -2px 0 rgba(var(--mqt-accent2-rgb), .5); }
body.mq-theme-dual .menu-item:hover { background: linear-gradient(90deg, rgba(var(--mqt-accent2-rgb), .14), transparent 80%); }
body.mq-theme-dual .mobile-drawer { border-color: rgba(var(--mqt-accent-rgb), .5); background-image: linear-gradient(180deg, rgba(var(--mqt-accent-rgb), .14), rgba(var(--mqt-accent2-rgb), .08) 35%, transparent 70%); }
body.mq-theme-dual .mobile-drawer-left { border-right: 3px solid transparent; border-image: linear-gradient(180deg, var(--mqt-accent), var(--mqt-accent2)) 1; }
body.mq-theme-dual .mobile-drawer-right { border-left: 3px solid transparent; border-image: linear-gradient(180deg, var(--mqt-accent2), var(--mqt-accent)) 1; }
body.mq-theme-dual .mobile-drawer-link.active { background: linear-gradient(90deg, rgba(var(--mqt-accent-rgb), .22), rgba(var(--mqt-accent2-rgb), .12)); }
body.mq-theme-dual .right-panel { border-left: 1px solid transparent; border-image: linear-gradient(180deg, var(--mqt-accent2), var(--mqt-accent)) 1; }
body.mq-theme-dual .mq-store-tab.is-active { background: linear-gradient(135deg, var(--mqt-accent), var(--mqt-accent2)); }
body.mq-theme-dual .mq-logo-ai { background: linear-gradient(135deg, var(--mqt-accent) 0%, var(--mqt-accent2) 100%); }

/* 🎄 New Year: gold-red luxury frames around the menus, a light garland on top, the effect canvas. */
.mq-theme-ny-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 8990; contain: strict; }
body.mq-theme-fx-newyear .sidebar { box-shadow: inset -2px 0 0 rgba(212, 175, 55, .55), inset -6px 0 18px -10px rgba(220, 38, 38, .7); }
body.mq-theme-fx-newyear .sidebar::before, body.mq-theme-fx-newyear .mobile-drawer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 6px 5px, #fde68a 0 2.5px, transparent 3px) 0 0 / 24px 10px repeat-x, radial-gradient(circle at 18px 5px, #ef4444 0 2.5px, transparent 3px) 0 0 / 24px 10px repeat-x, linear-gradient(180deg, rgba(212, 175, 55, .35), transparent);
  animation: mqtGarland 1.6s steps(2) infinite; }
body.mq-theme-fx-newyear .mobile-drawer { box-shadow: 0 0 0 1px rgba(212, 175, 55, .55), 0 0 26px -6px rgba(220, 38, 38, .55); }
body.mq-theme-fx-newyear .mobile-drawer-heading { border-bottom: 1px solid rgba(212, 175, 55, .45); }
body.mq-theme-fx-newyear .menu-item.active { box-shadow: inset 4px 0 0 #d4af37, 0 0 14px -4px rgba(220, 38, 38, .6); }
body.mq-theme-fx-newyear .mq-logo-ball { box-shadow: 0 0 0 1px rgba(253, 230, 138, .7), 0 0 18px rgba(220, 38, 38, .55); }
@keyframes mqtGarland { 50% { filter: brightness(1.45) hue-rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) { body.mq-theme-fx-newyear .sidebar::before, body.mq-theme-fx-newyear .mobile-drawer::before { animation: none; } }

/* Previews: team-colour band and the 🎄 mark. */
.mq-theme-swatch__dual { position: absolute; left: 0; right: 0; top: 0; height: 5px; z-index: 1; }
.mq-theme-swatch__fx { position: absolute; top: 6px; right: 8px; z-index: 1; font-size: 16px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7)); }
/* Admin template tiles. */
#themes-admin-card .themes-admin-gallery__sub { font-size: 12px; font-weight: 800; color: var(--text-color); }
#themes-admin-card .themes-admin-gallery__sub small { font-weight: 600; color: var(--text-muted); }
.themes-admin-template { height: 74px; }
.themes-admin-template__colors { position: absolute; top: 0; left: 0; right: 0; height: 5px; }
/* ================= Club themes: vivid background, team-colour glow, readable cards ================= */
/* Lighter veil than one-colour themes (the team colours stay full and rich) + soft team-colour light from the corners. */
body.mq-theme-dual:not(.light-mode) {
  background-image:
    radial-gradient(55% 45% at 12% 0%, rgba(var(--mqt-accent-rgb), .30), transparent 70%),
    radial-gradient(50% 45% at 92% 100%, rgba(var(--mqt-accent2-rgb), .26), transparent 70%),
    linear-gradient(rgba(5, 11, 20, .30), rgba(5, 11, 20, .55)),
    var(--mqt-bg-image);
}
/* Depth: cards and boxes float with a light team-colour glow. */
body.mq-theme-dual:not(.light-mode) .match-card,
body.mq-theme-dual:not(.light-mode) .main-content .card {
  box-shadow: 0 0 0 1px rgba(var(--mqt-accent-rgb), .28), 0 12px 32px -16px rgba(0, 0, 0, .85), 0 0 26px -10px rgba(var(--mqt-accent-rgb), .55);
}
body.mq-theme-dual:not(.light-mode) .match-card:hover { box-shadow: 0 0 0 1px rgba(var(--mqt-accent2-rgb), .5), 0 14px 36px -16px rgba(0, 0, 0, .9), 0 0 32px -8px rgba(var(--mqt-accent2-rgb), .6); }
/* Readability: a dark gradient behind the match details (time, league, team names) + a light text shadow. */
body.mq-theme-dual:not(.light-mode) .match-card {
  background-image: linear-gradient(135deg, rgba(6, 10, 20, .9) 0%, rgba(6, 10, 20, .78) 55%, rgba(6, 10, 20, .88) 100%);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
body.mq-theme-dual:not(.light-mode) :is(.match-card, .main-content .card, .main-content h1, .main-content h2, .main-content h3, .league-name-inside, .team-home-col span, .team-away-col span, .time) { text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 10px rgba(0, 0, 0, .45); }
body.mq-theme-dual:not(.light-mode) .main-content .card { background-image: linear-gradient(180deg, rgba(6, 10, 20, .86), rgba(6, 10, 20, .74)); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { body.mq-theme-dual:not(.light-mode) .match-card { background-image: linear-gradient(135deg, rgba(6, 10, 20, .94), rgba(6, 10, 20, .86)); } }
/* ================= Theme logo (centre of the background) + premium club template tiles ================= */
/* Own background layer: z-index -1 (under every part of the page, above the theme background), never takes clicks. */
.mq-theme-crest { position: fixed; inset: 0; z-index: -1; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.mq-theme-crest[hidden] { display: none; }
/* The composition: logo, the team name right below — soft (opacity) so the bulletin stays easy to read. */
.mq-theme-crest__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4vh, 26px); opacity: .34; max-width: 92vw; }
/* Gentle dark veil over the composition: premium depth without tiring the eyes. */
.mq-theme-crest__inner::after { content: ""; position: absolute; inset: -12% -18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(5, 11, 20, .32), rgba(5, 11, 20, .12) 62%, transparent); }
.mq-theme-crest__emblem { display: grid; place-items: center; animation: mqtCrestGlow 6s ease-in-out infinite;
  filter: drop-shadow(0 0 28px rgba(var(--mqt-accent-rgb, 212, 175, 55), .75)) drop-shadow(0 0 70px rgba(var(--mqt-accent2-rgb, 212, 175, 55), .45)); }
.mq-theme-crest__emblem img { display: block; width: min(38vw, 440px); max-height: 50vh; object-fit: contain; }
@keyframes mqtCrestGlow { 50% { filter: drop-shadow(0 0 38px rgba(var(--mqt-accent-rgb, 212, 175, 55), .95)) drop-shadow(0 0 96px rgba(var(--mqt-accent2-rgb, 212, 175, 55), .6)); } }
/* No logo (or a broken link) on a club theme: an elegant gold shield with a ball. */
.mq-theme-crest.is-shield .mq-theme-crest__emblem img { display: none; }
.mq-theme-crest.is-shield .mq-theme-crest__emblem { position: relative; width: min(26vw, 260px); aspect-ratio: 52 / 60; }
.mq-theme-crest.is-shield .mq-theme-crest__emblem::before { content: ""; position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 15%, 100% 50%, 93% 70%, 78% 86%, 50% 100%, 22% 86%, 7% 70%, 0 50%, 0 15%);
  background: linear-gradient(160deg, #fff4c2 0%, #e8c25a 38%, #9a7414 100%); }
.mq-theme-crest.is-shield .mq-theme-crest__emblem::after { content: "⚽"; position: relative; font-size: min(11vw, 112px); line-height: 1; }
/* Team name: premium serif, gold gradient with a soft glow in the team colours. */
.mq-theme-crest__name { position: relative; text-align: center; line-height: 1.1;
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: clamp(28px, 5vw, 76px); letter-spacing: .06em;
  background-image: linear-gradient(100deg, #fff6c9 0%, #f6d77a 30%, #d4af37 55%, #fff2b3 80%, #e8c25a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #f6d77a;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)) drop-shadow(0 0 18px rgba(var(--mqt-accent-rgb, 212, 175, 55), .65)) drop-shadow(0 0 42px rgba(255, 236, 170, .35)); }
@media (max-width: 760px) { .mq-theme-crest__inner { opacity: .27; } .mq-theme-crest__emblem img { width: 64vw; } .mq-theme-crest.is-shield .mq-theme-crest__emblem { width: 44vw; } .mq-theme-crest.is-shield .mq-theme-crest__emblem::after { font-size: 18vw; } .mq-theme-crest__name { font-size: 9vw; } }
body.light-mode .mq-theme-crest__inner { opacity: .17; }
body.light-mode .mq-theme-crest__inner::after { display: none; }
@media (prefers-reduced-motion: reduce) { .mq-theme-crest__emblem { animation: none; } }
/* Logo inside the previews. */
.mq-theme-swatch__logo { position: absolute; left: 50%; top: 44%; z-index: 1; width: auto; height: 58%; max-width: 70%; object-fit: contain; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .65)) drop-shadow(0 0 12px rgba(var(--mqt-swatch-rgb, 212, 175, 55), .6)); pointer-events: none; }
/* Admin: premium club tiles — team-colour gradient, emblem in the middle, gold name below. */
.themes-admin-template.is-club { height: 132px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px 8px;
  background: radial-gradient(70% 60% at 50% 38%, rgba(var(--tpl-a-rgb), .55), transparent 72%), linear-gradient(135deg, rgba(var(--tpl-a-rgb), .55) 0%, #070a12 52%, rgba(var(--tpl-b-rgb), .55) 100%);
  border-color: rgba(var(--tpl-a-rgb), .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 24px -14px rgba(var(--tpl-a-rgb), .9); }
.themes-admin-template.is-club:hover { border-color: rgba(var(--tpl-b-rgb), .9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 30px -12px rgba(var(--tpl-b-rgb), .95); }
.themes-admin-template__emblem { display: grid; place-items: center; width: 64px; height: 64px; flex: none; }
.themes-admin-template__emblem img { max-width: 64px; max-height: 64px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)) drop-shadow(0 0 10px rgba(var(--tpl-a-rgb), .7)); }
/* No logo yet: an elegant gold shield with a ball (a placeholder, not a club crest). */
.themes-admin-template__emblem.is-shield { width: 52px; height: 60px; clip-path: path("M26 0 L52 9 L52 30 C52 46 40 56 26 60 C12 56 0 46 0 30 L0 9 Z");
  background: linear-gradient(160deg, #fff4c2 0%, #e8c25a 38%, #9a7414 100%); position: relative; }
.themes-admin-template__emblem.is-shield::after { content: "⚽"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.themes-admin-template.is-club .themes-admin-template__name { width: auto; padding: 0; background: none; text-align: center; white-space: normal; line-height: 1.15;
  font-family: 'Playfair Display', Georgia, serif; font-size: 14px; font-weight: 700; letter-spacing: .02em;
  background-image: linear-gradient(100deg, #fff6c9 0%, #f6d77a 35%, #d4af37 60%, #fff2b3 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .9)); }
#theme-templates-club { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }