/* =================================================================
 *  ElAshkef — HOTFIX BUGS 2026-05-13 — Styles
 *  -----------------------------------------------------------------
 *  Companion to hotfix-2026-05-13-bugs.js
 *  Provides the unified tutorial overlay (.utut-*) and hides the
 *  legacy how-to-play overlay (.htp-overlay) if it ever re-appears.
 * =================================================================*/

/* --- Force legacy how-to overlay invisible if anything still shows it --- */
.htp-overlay { display: none !important; }
#htp-help-fab { display: none !important; }

/* --- Hide major-upgrade tutorial in favor of unified one --- */
#game-tutorial-overlay { display: none !important; }

/* =================================================================
 *  UNIFIED TUTORIAL OVERLAY  —  .utut-*
 * =================================================================*/
.utut-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 10, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 220ms ease;
}
.utut-overlay.is-open { opacity: 1; }

.utut-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg,
    rgba(34, 36, 56, 0.95) 0%,
    rgba(22, 24, 38, 0.95) 100%);
  border: 1px solid rgba(232, 183, 48, 0.22);
  border-radius: 22px;
  padding: 28px 26px 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(232, 183, 48, 0.06) inset;
  opacity: 0;
  transform: scale(0.94) translateY(14px);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(.18,.7,.32,1);
  color: #E8EAF1;
}
.utut-overlay.is-open .utut-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.utut-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  background: linear-gradient(135deg,
    rgba(232, 183, 48, 0.30),
    transparent 40%,
    rgba(167, 139, 250, 0.20));
  z-index: -1;
  filter: blur(8px);
  opacity: 0.6;
  pointer-events: none;
}

.utut-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 220ms ease, background 220ms ease;
  z-index: 2;
}
.utut-close:hover {
  background: rgba(239, 68, 68, 0.30);
  transform: rotate(90deg);
}

.utut-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-inline-end: 32px;
}

.utut-orb {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}
.utut-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(232, 183, 48, 0.55);
  animation: utut-spin 6s linear infinite;
}
.utut-orb-core {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(232, 183, 48, 0.95),
    rgba(232, 183, 48, 0.55));
  color: #1a1d2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 18px rgba(232, 183, 48, 0.5);
}
@keyframes utut-spin { to { transform: rotate(360deg); } }

.utut-titles { min-width: 0; flex: 1; }
.utut-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
  line-height: 1.25;
}
.utut-game {
  color: var(--gold, #E8B730);
  font-weight: 900;
}
.utut-sub {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.35;
}

.utut-intro {
  background: rgba(232, 183, 48, 0.06);
  border: 1px solid rgba(232, 183, 48, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

.utut-rules-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold, #E8B730);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.utut-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.utut-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translateY(8px);
  animation: utut-step-in 460ms cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 70ms);
}
@keyframes utut-step-in {
  to { opacity: 1; transform: translateY(0); }
}
.utut-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg,
    rgba(232, 183, 48, 0.25),
    rgba(232, 183, 48, 0.12));
  border: 1px solid rgba(232, 183, 48, 0.30);
  color: var(--gold, #E8B730);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
}
.utut-text { flex: 1; }

.utut-chat-ex {
  background: rgba(145, 70, 255, 0.08);
  border: 1px solid rgba(145, 70, 255, 0.22);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.utut-chat-ex-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}
.utut-chat-user { color: #A78BFA; font-weight: 700; }
.utut-chat-msg  { color: rgba(255, 255, 255, 0.92); }

.utut-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.utut-dont {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}
.utut-dont input { display: none; }
.utut-dont span {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms ease;
  position: relative;
}
.utut-dont input:checked + span {
  background: var(--gold, #E8B730);
  border-color: var(--gold, #E8B730);
}
.utut-dont input:checked + span::after {
  content: '✓';
  color: #1a1d2e;
  font-weight: 900;
  font-size: 0.78rem;
}
.utut-dont em { font-style: normal; }

.utut-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--gold, #E8B730), #F5D261);
  color: #1a1d2e;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 6px 18px rgba(232, 183, 48, 0.32);
}
.utut-cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 24px rgba(232, 183, 48, 0.42);
}
.utut-cta:active { transform: translateY(0) scale(0.99); }

/* --- Mobile tweaks --- */
@media (max-width: 600px) {
  .utut-card { padding: 22px 18px 18px; border-radius: 18px; }
  .utut-title { font-size: 1.1rem; }
  .utut-orb { width: 48px; height: 48px; }
  .utut-orb-core { font-size: 1.25rem; }
  .utut-foot { flex-direction: column; align-items: stretch; }
  .utut-cta { width: 100%; justify-content: center; }
}
