@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0a0c16;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(0, 0, 0, 0.08);
  --accent-green: #23a55a;
  --accent-green-dark: #1a7a42;
  --accent-blue: #5865f2;
  --accent-nitro: #eb459e;
  --accent-boost: #ff73fa;
  --accent-gold: #fee75c;
  --accent-red: #ef4444;
  --accent-red-dark: #dc2626;
  --text-dark: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-white: #ffffff;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-dark);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
}

/* ═══════ BACKGROUND ═══════ */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('../a/background.webp');
  background-size: cover;
  background-position: center;
  filter: brightness(0.6) saturate(1.2) blur(3px);
}

#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 25% 25%, rgba(16, 185, 129, 0.22) 0%, transparent 60%),
              radial-gradient(ellipse at 75% 70%, rgba(245, 158, 11, 0.18) 0%, transparent 60%),
              radial-gradient(circle at 50% 50%, rgba(5, 150, 105, 0.12) 0%, transparent 70%);
}

/* ═══════ RAINING NITRO PARTICLES ═══════ */
.nitro-particle, .robux-rain {
  position: fixed;
  top: -30px;
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 115, 250, 0.45));
  animation: particle-fall linear infinite;
}

@keyframes particle-fall {
  0% { transform: translateY(-30px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; }
  90% { opacity: 0.35; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

/* ═══════ LANGUAGE SELECTOR ═══════ */
.lang-selector-wrapper {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  font-family: inherit;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.2s ease;
  user-select: none;
}

.lang-selector-btn:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.lang-flag {
  width: 20px;
  border-radius: 3px;
  object-fit: contain;
}

.lang-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.lang-selector-wrapper.open .lang-chevron,
.lang-selector-wrapper.open .lang-selector-btn .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 220px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1001;
}

.lang-selector-wrapper.open .lang-dropdown,
.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.lang-search-wrapper {
  position: relative;
  padding: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.lang-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.lang-search-wrapper input {
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(0,0,0,0.02);
  outline: none;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.lang-search-wrapper input:focus {
  border-color: var(--accent-blue);
  background: #ffffff;
}

.lang-list {
  max-height: 250px;
  overflow-y: auto;
}

.lang-item {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-dark);
}

.lang-item:hover {
  background: rgba(0,0,0,0.04);
}

.lang-item.active {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  font-weight: 600;
}

.lang-item.active::after {
  content: '✓';
  margin-left: auto;
  font-weight: 700;
  color: #10B981;
}

/* ═══════ LAYOUT ═══════ */
#app {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.main-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  max-width: 1200px;
  width: 100%;
  justify-content: center;
}

/* ═══════ GLASS CARD (white frosted) ═══════ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

/* ═══════ MAIN PANEL (CENTER) ═══════ */
.panel-main {
  width: 420px;
  min-height: auto;
  height: auto;
  padding: 2rem;
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
  transition: all 0.3s ease;
}

/* ═══════ SIDE PANELS ═══════ */
.panel-side {
  width: 300px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Left Panel: Help & FAQ wraps tightly around questions, expands naturally on open */
#panel-faq {
  align-self: flex-start;
  height: auto;
  min-height: auto;
  transition: all 0.3s ease;
}

/* Right Panel: Live Claims Chat is the only column that stays long */
#panel-chat {
  align-self: flex-start;
  height: auto;
  min-height: 540px;
}

/* ═══════ STEP TRANSITIONS ═══════ */
.step-view {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.step-view.hidden {
  display: none;
}

.step-view.fade-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.step-view.fade-in {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

/* ═══════ STEP 0: REWARD SELECTION ═══════ */
.step-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.step-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.step-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.reward-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 0.95rem 0.45rem 0.75rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(8px);
}

.reward-card:hover {
  transform: translateY(-3px);
  background: #ffffff;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

.reward-card.selected {
  transform: translateY(-2px);
  background: rgba(16, 185, 129, 0.04);
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22), 0 8px 20px rgba(16, 185, 129, 0.16);
}

/* Row 1: 3 cards (1k, 2k, 5k) span 2 columns each */
.reward-card:nth-child(1),
.reward-card:nth-child(2),
.reward-card:nth-child(3) {
  grid-column: span 2;
}

/* Row 2: 2 cards (10k, 15k) span 3 columns each */
.reward-card:nth-child(4),
.reward-card:nth-child(5) {
  grid-column: span 3;
}

/* Tag Pill at top */
.reward-tag {
  position: absolute;
  top: -9px;
  padding: 0.18rem 0.55rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 4;
  white-space: nowrap;
}

.reward-card .check-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
}

.reward-card.selected .check-badge {
  opacity: 1;
  transform: scale(1);
}

.reward-card .check-badge svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.reward-card .reward-icon-wrapper {
  width: 48px;
  height: 48px;
  margin: 0.35rem auto 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.reward-card:hover .reward-icon-wrapper,
.reward-card.selected .reward-icon-wrapper {
  transform: scale(1.1) rotate(-3deg);
}

.reward-card img.reward-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.reward-amount {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.reward-currency {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #059669;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.reward-sub {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

/* ═══════ USERNAME INPUT ═══════ */
.input-area {
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.input-area.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.input-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  align-items: stretch;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  color: var(--text-dark);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.input-wrapper input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  background: #ffffff;
}

.input-wrapper input.error {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
  background: #FFF5F5 !important;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #059669;
  pointer-events: none;
}

.input-verify-badge {
  display: none !important;
}

.username-error-msg {
  display: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #EF4444;
  margin-top: 0.5rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  animation: shakeError 0.35s ease;
}

.username-error-msg.visible {
  display: flex;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.btn-next {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.btn-next:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-next .glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-next:hover .glow { opacity: 1; }

/* ═══════ STEP 1: CONFIRM PROFILE ═══════ */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  border: 3.5px solid #10B981;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
  margin-bottom: 0.75rem;
  background: #f1f5f9;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.discord-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 22px;
  height: 22px;
  background-color: #10B981;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.claimed-reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
}

.profile-avatar.loading {
  animation: pulse-avatar 1.5s ease-in-out infinite;
}

@keyframes pulse-avatar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.profile-username {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.confirm-buttons {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.btn-confirm {
  flex: 1;
  max-width: 170px;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  justify-content: center;
  text-decoration: none;
  user-select: none;
}

.btn-confirm:hover { transform: translateY(-2px); }
.btn-confirm:active { transform: scale(0.96); }

.btn-confirm.btn-no {
  background: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-confirm.btn-no:hover {
  background: #dc2626 !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-confirm.btn-yes {
  background: linear-gradient(135deg, #10B981, #059669) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-confirm.btn-yes:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* ═══════ STEP 2: OFFERS / QUESTS ═══════ */
#step-2 {
  position: relative;
  padding-top: 0.5rem;
}

.step2-header-deco {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 0.6rem;
  z-index: 5;
  pointer-events: none;
}

.builder-man-deco {
  height: 80px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18));
  animation: floatMascot 3s ease-in-out infinite alternate;
}

@keyframes floatMascot {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

.step2-player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.player-chip-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #10B981;
  background: #ffffff;
}

.player-chip-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}

.player-chip-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dark);
}

.player-chip-reward {
  font-size: 0.65rem;
  font-weight: 700;
  color: #059669;
}

/* Quests List */
.quests-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.2rem 0.25rem 0.4rem;
  margin-bottom: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.45) transparent;
}

.quests-list::-webkit-scrollbar {
  width: 5px;
}

.quests-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

.quests-list::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.45);
  border-radius: 4px;
}

.quests-list::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.75);
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.quest-item:hover {
  transform: translateY(-2px);
  border-color: #10B981;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.16);
}

.quest-item.in-progress {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.04);
}

.quest-item.in-progress .quest-progress {
  width: 100% !important;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.22) 50%, rgba(59, 130, 246, 0.08) 100%);
  background-size: 200% 100%;
  animation: quest-shimmer 2s infinite linear;
}

@keyframes quest-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.verifying-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3B82F6;
  display: inline-block;
  animation: pulse-dot 1.2s infinite ease-in-out;
}

.quest-verifying-text {
  font-size: 0.72rem;
  margin-top: 3px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quest-verifying-text.verifying {
  color: #2563eb;
}

.quest-verifying-text.verified {
  color: #059669;
}

@keyframes pulse-verifying {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.55; }
}

.quest-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.24));
  transition: width 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.quest-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}

.quest-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quest-body {
  flex: 1;
  min-width: 0;
  text-align: left;
  position: relative;
  z-index: 2;
}

.quest-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.quest-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.quest-action {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.quest-btn-label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.quest-item:hover .quest-btn-label {
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
}

.quest-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: #3B82F6;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
}

.quest-spinner {
  width: 13px;
  height: 13px;
  animation: spin 1s linear infinite;
}

/* Dedicated Footer Row */
.step2-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 0.5rem;
}

/* Deluxe High-Urgency Countdown Timer (Matching Connor's Design) */
.event-timer {
  background: linear-gradient(135deg, #e52d27 0%, #b31217 100%);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  flex: 1;
  min-width: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-timer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.event-timer:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.event-timer-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.event-timer-alert-icon {
  stroke: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.event-timer-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.event-timer-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-timer-title {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-timer-live-dot {
  width: 5px;
  height: 5px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
  animation: timerDotPulse 1.8s ease-in-out infinite;
}

@keyframes timerDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.event-timer-countdown {
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.timer-segment {
  display: inline-flex;
  align-items: baseline;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 2px 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.timer-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.timer-unit {
  font-size: 0.52rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  margin-left: 1px;
}

.timer-divider {
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  user-select: none;
}

.timer-segment-pulse .timer-digits {
  color: #fef08a;
}

.step2-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-step-action {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: var(--text-dark, #1e293b);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-step-action.btn-back:hover {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.btn-step-action.btn-refresh {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.25);
}

.btn-step-action.btn-refresh:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.btn-step-action.spinning svg {
  animation: spin 0.65s linear infinite;
}

/* Quests Progress Tracker */
.quests-progress-card {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
}

.quests-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.quests-progress-label {
  color: var(--text-dark);
}

.quests-progress-counter {
  color: #10B981;
  font-weight: 700;
  font-size: 0.85rem;
}

.quests-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.quests-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #059669);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.quest-item.completed {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.05);
  pointer-events: none;
}

.quest-item.completed .quest-progress {
  width: 100% !important;
  background: rgba(16, 185, 129, 0.18);
}

.quest-completed-label {
  background: #10B981 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
  font-weight: 700;
}

/* ═══════ SITE PRELOADER SCREEN (Deluxe Rewards Hub) ═══════ */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #0f3022 0%, #06150f 60%, #030805 100%);
  opacity: 1;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

.site-loader.fade-out {
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.75rem 2.25rem;
  max-width: 620px;
  width: 92%;
  background: linear-gradient(180deg, rgba(14, 38, 28, 0.90) 0%, rgba(6, 18, 13, 0.98) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 28px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.85), 0 0 60px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(28px);
  animation: loader-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loader-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.loader-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6ee7b7;
  text-transform: uppercase;
  margin-bottom: 1.35rem;
}

.loader-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.loader-emblem {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.loader-hero-emblem {
  width: 100%;
  height: 100%;
  animation: emblem-float 3.5s ease-in-out infinite;
}

@keyframes emblem-float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    filter: drop-shadow(0 12px 28px rgba(234, 179, 8, 0.4));
  }
  50% {
    transform: translateY(-8px) rotate(1deg) scale(1.03);
    filter: drop-shadow(0 22px 48px rgba(234, 179, 8, 0.6));
  }
}

.loader-title {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 0.35rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}

.loader-subtitle {
  font-size: 0.92rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 1.6rem;
  letter-spacing: 0.01em;
}

/* 4 Milestones Checklist Card */
.loader-milestones-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.milestone-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  gap: 0.85rem;
  color: #cbd5e1;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

.milestone-item.scanning {
  background: rgba(245, 158, 11, 0.06);
}

.milestone-item.verified {
  background: rgba(16, 185, 129, 0.06);
}

.ms-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.ms-svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.milestone-item.scanning .ms-icon {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.milestone-item.verified .ms-icon {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.6);
  color: #34D399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.ms-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ms-val {
  margin-left: auto;
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
  transition: all 0.35s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.milestone-item.scanning .ms-val {
  color: #F59E0B;
  animation: pulse-txt 0.8s infinite alternate;
}

.milestone-item.verified .ms-val {
  color: #34D399;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
  font-weight: 800;
}

@keyframes pulse-txt {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* Big Progress Box */
.loader-progress-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 16px;
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.35rem;
}

.loader-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.loader-status-text {
  font-size: 0.88rem;
  color: #a7f3d0;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loader-pct {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: monospace;
  color: #10B981;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.loader-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.loader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10B981, #34D399, #6EE7B7, #10B981);
  background-size: 250% 100%;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.75);
  transition: width 0.1s linear;
  animation: shimmer 1.8s infinite linear;
}

.loader-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.15rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a7f3d0;
  letter-spacing: 0.01em;
}

.loader-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

@media (max-width: 640px) {
  .loader-content {
    padding: 1.75rem 1.25rem;
    max-width: 95%;
  }
  .loader-emblem {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
  }
  .loader-title {
    font-size: 1.45rem;
  }
  .loader-subtitle {
    font-size: 0.82rem;
    margin-bottom: 1.15rem;
  }
  .loader-milestones-card {
    padding: 1rem;
    gap: 0.65rem;
  }
  .milestone-item {
    font-size: 0.8rem;
  }
  .ms-name {
    font-size: 0.8rem;
  }
  .ms-val {
    font-size: 0.76rem;
    max-width: 150px;
  }
}

/* Modal for Completed Leads */
.code-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.code-modal-overlay.hidden {
  display: none !important;
}

.code-modal-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.code-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.code-modal-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.code-modal-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* ═══════ BOT MODAL & DISCORD MODAL ═══════ */
.bot-modal-card {
  border-top: 4px solid #F59E0B;
  max-width: 410px;
}

.bot-badge-icon {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-shield-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  animation: pulse-dot 1.8s infinite;
}

.bot-progress-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.bot-step-count {
  font-weight: 800;
  font-size: 0.85rem;
  color: #d97706;
}

.bot-step-urgent {
  font-size: 0.72rem;
  font-weight: 700;
  background: #d97706;
  color: white;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* Discord Modal */
.discord-modal-card {
  border-top: 4px solid #5865F2;
  max-width: 410px;
}

.discord-modal-icon-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.35);
}

.discord-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(88, 101, 242, 0.4);
  animation: spin 8s linear infinite;
}

.discord-server-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0 1rem;
  text-align: left;
}

.discord-server-icon img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.discord-server-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
}

.discord-server-status {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2px;
}

.discord-online-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10B981;
}

.btn-discord-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: #5865F2;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
  transition: all 0.2s ease;
}

.btn-discord-join:hover {
  background: #4752C4;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.45);
}

.discord-redirect-notice {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.85rem;
}

.discord-redirect-notice strong {
  color: #0f172a;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  border: 2px dashed #10B981;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.code-box span {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.05em;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: #10B981;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: #059669;
}

.btn-redeem-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.75rem;
  background: #0f172a;
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-redeem-direct:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* ═══════ SIDE: FAQ ═══════ */
.side-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.side-subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.faq-list {
  flex: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  padding: 0.5rem;
}

.faq-item {
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.faq-item:hover { background: rgba(0,0,0,0.03); }
.faq-item.open { background: rgba(0,0,0,0.02); }

.faq-q {
  padding: 0.6rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.faq-q span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
}

.faq-q .chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-q .chevron { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-a {
  max-height: 260px;
  padding: 0 0.65rem 0.6rem;
}

.faq-a p {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════ SIDE: LIVE CHAT ═══════ */
.chat-log {
  flex: 1;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  padding: 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  max-height: 560px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-msg {
  font-size: 0.7rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  padding: 2px 6px;
  border-radius: 6px;
  animation: msg-slide-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.5s ease;
}

.chat-msg:hover {
  background: rgba(0,0,0,0.03);
}

@keyframes msg-slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg .chat-user { font-weight: 700; cursor: pointer; }
.chat-msg .chat-user:hover { text-decoration: underline; }
.chat-msg .chat-text { color: var(--text-secondary); }
.chat-msg .chat-claim { color: #23a55a; font-weight: 600; }
.chat-claim-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-left: 3px;
  display: inline-block;
}

/* ── Typing indicator ── */
.chat-typing {
  padding: 1px 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 16px;
}

.chat-typing:empty {
  display: none;
}

.chat-typing .typing-dots {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  margin-left: 2px;
}

.chat-typing .typing-dots span {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  will-change: transform, opacity;
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.chat-typing .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.3; }
  35% { transform: translateY(-3px); opacity: 1; }
}

.chat-input-row {
  margin-top: 0.5rem;
}

.chat-input-row input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  outline: none;
  cursor: not-allowed;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* ═══════ LOADING SPINNER ═══════ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(0,0,0,0.1);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
  border-color: rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-blue);
}

/* ═══════ SCROLLBAR ═══════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 1100px) {
  .main-layout {
    flex-direction: column;
    align-items: center;
  }
  .panel-side { width: 100%; max-width: 440px; }
  .panel-main { width: 100%; max-width: 440px; }
  #app { padding: 6rem 1rem 2rem; align-items: flex-start; }
}

@media (max-width: 480px) {
  .panel-main { padding: 1.25rem 0.85rem; min-height: auto; }
  .panel-side { padding: 1rem; }
  .rewards-grid { gap: 0.5rem; }
  .reward-card { padding: 0.85rem 0.35rem 0.65rem; }
  .reward-card .reward-icon-wrapper { width: 40px; height: 40px; }
  .reward-amount { font-size: 1rem; }
  .reward-currency { font-size: 0.62rem; }
  .reward-tag { font-size: 0.52rem; padding: 0.14rem 0.45rem; top: -8px; }
}

/* ════════════════════════════════════════════════════════════════════════════════
   ── RIGHT-TO-LEFT (RTL) STYLING FOR ARABIC & HEBREW & URDU ───────────────────
   ════════════════════════════════════════════════════════════════════════════════ */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .card-title,
[dir="rtl"] .card-subtitle,
[dir="rtl"] .faq-title,
[dir="rtl"] .faq-subtitle,
[dir="rtl"] .chat-title,
[dir="rtl"] .chat-subtitle,
[dir="rtl"] .faq-q,
[dir="rtl"] .faq-a,
[dir="rtl"] .chat-msg,
[dir="rtl"] .quests-progress-top,
[dir="rtl"] .quest-text,
[dir="rtl"] .quest-name,
[dir="rtl"] .quest-conversion,
[dir="rtl"] .player-chip-info {
  text-align: right;
}

[dir="rtl"] .input-wrapper input {
  padding: 0.75rem 2.6rem 0.75rem 1rem;
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .input-wrapper .input-icon {
  left: auto;
  right: 0.85rem;
}

[dir="rtl"] .btn-next svg {
  transform: rotate(180deg);
}

[dir="rtl"] .btn-step-action.btn-back svg {
  transform: rotate(180deg);
}

[dir="rtl"] .event-timer {
  direction: rtl;
}

/* Digits & Numerical Badges stay in standard LTR reading order */
[dir="rtl"] .event-timer-countdown,
[dir="rtl"] .timer-segment,
[dir="rtl"] .reward-amount,
[dir="rtl"] .player-chip-amount {
  direction: ltr;
  display: inline-flex;
}

[dir="rtl"] .faq-q svg {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .lang-selector-wrapper {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .chat-typing {
  text-align: right;
}

[dir="rtl"] .quest-arrow {
  transform: rotate(180deg);
}


/* Refresh Quests Header Icon */
.btn-refresh-icon {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.btn-refresh-icon:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-dark);
  transform: rotate(90deg);
}

/* ── SITE FOOTER & LEGAL MODALS ── */
.site-footer {
  width: 100%;
  margin-top: 2.5rem;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
  position: relative;
  z-index: 10;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.footer-secure-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.68rem;
  color: #94A3B8;
}
.footer-disclaimer {
  color: #64748B;
  max-width: 760px;
  margin: 0 auto;
  font-size: 0.68rem;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.footer-link-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  transition: color 0.15s ease;
}
.footer-link-btn:hover {
  color: #FFFFFF;
}
.footer-bullet {
  color: #475569;
}
.footer-copyright {
  color: #475569;
  font-size: 0.64rem;
}
.legal-modal-card {
  max-width: 520px;
  width: 90%;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  color: #E2E8F0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}
.legal-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
}
.btn-close-legal {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.15s ease;
}
.btn-close-legal:hover {
  color: #FFFFFF;
}
.legal-modal-body {
  max-height: 380px;
  overflow-y: auto;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #CBD5E1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.legal-modal-body p {
  margin: 0;
}

