﻿/* =============================================================
   COMPONENTS.CSS — Buttons, Cards, Forms, Modals, Badges,
                    Streak Bar, Toasts, Overlays
   قدها وقدود — Arabic RTL Game Show Platform
   ============================================================= */

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  line-height: 1;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-spring),
              box-shadow var(--t-fast) var(--ease-smooth),
              background var(--t-normal) var(--ease-smooth),
              opacity var(--t-fast);
  user-select: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  border: none;
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn:active:not(:disabled) {
  transform: scale(0.97) !important;
}

/* Shimmer overlay on hover */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease-smooth);
}
.btn:hover:not(:disabled)::after {
  transform: translateX(100%);
}

/* ── Primary (Brand gradient: gold → teal) ── */
.btn-primary {
  background: var(--brand-gradient-btn);
  color: #2A2000;
  border: 1.5px solid var(--brand-gold-deep);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(31,168,140,0.35), 0 4px 14px rgba(230,169,43,0.35),
              inset 0 1px 0 rgba(255,255,255,0.45);
}

/* ── Gold (Credits/Purchase) — preserved historical gold look ── */
.btn-gold {
  background: var(--gold-gradient-btn);
  color: var(--text-primary);
  border: 1.5px solid var(--gold-400);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 28px rgba(200,164,40,0.45), 0 2px 8px rgba(200,164,40,0.25),
              inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ── Secondary (Teal outline) ── */
.btn-secondary {
  background: var(--surface-primary);
  color: var(--brand-teal-deep);
  border: 1.5px solid var(--brand-teal);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.7);
}
.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(46,230,197,0.10);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(46,230,197,0.20);
}

/* ── Ghost ── */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-medium);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255,200,87,0.10);
  border-color: var(--brand-gold);
  color: var(--brand-gold-deep);
}

/* ── Danger ── */
.btn-danger {
  background: linear-gradient(180deg, #FF6B6B 0%, #D93030 100%);
  color: #fff;
  border: 1.5px solid #C02020;
  box-shadow: 0 4px 16px rgba(200,40,40,0.30);
}
.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200,40,40,0.45);
}

/* ── Success ── */
.btn-success {
  background: linear-gradient(180deg, #5DD68A 0%, #2E9E5E 100%);
  color: #fff;
  border: 1.5px solid #258050;
  box-shadow: 0 4px 16px rgba(40,160,80,0.28);
}
.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(40,160,80,0.44);
}

/* ── Sizes ── */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}
.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-xl);
  letter-spacing: 0.02em;
}
.btn-xl {
  padding: var(--space-5) var(--space-12);
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: 0.03em;
}
.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  aspect-ratio: 1;
}

/* ── Loading state ── */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn.loading::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: var(--space-2);
}

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--t-normal) var(--ease-smooth),
              transform var(--t-normal) var(--ease-spring);
}
/* Subtle inner top sheen */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-gold {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(200,164,40,0.15);
}

/* ── Ivory card variant ── */
.card-ivory {
  background: var(--surface-ivory);
}

/* ══════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  padding-right: var(--space-1);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-light);
  background: var(--surface-primary);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  font-weight: var(--weight-medium);
  transition: border-color var(--t-fast) var(--ease-smooth),
              box-shadow var(--t-fast) var(--ease-smooth);
  direction: rtl;
}
.form-input::placeholder {
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}
.form-input:focus {
  border-color: var(--purple-300);
  box-shadow: 0 0 0 3px rgba(168,128,240,0.18);
  outline: none;
}
.form-input.error {
  border-color: #E04060;
  box-shadow: 0 0 0 3px rgba(220,40,80,0.14);
}
.form-input.success {
  border-color: #40C080;
  box-shadow: 0 0 0 3px rgba(40,192,100,0.14);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--text-error);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  animation: fade-up 200ms var(--ease-out) both;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Input with icon */
.input-wrapper {
  position: relative;
}
.input-wrapper .form-input {
  padding-right: var(--space-10);
}
.input-icon {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: var(--text-lg);
}
.input-wrapper .input-toggle {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  pointer-events: all;
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-base);
  transition: color var(--t-fast);
}
.input-wrapper .input-toggle:hover { color: var(--purple-400); }

/* ══════════════════════════════════════════════════════════════
   MODALS / OVERLAYS
   ══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: modal-overlay-in var(--t-normal) var(--ease-smooth) both;
}
.modal-backdrop.closing {
  animation: modal-overlay-out var(--t-normal) var(--ease-smooth) both;
}

.modal-card {
  background: var(--surface-primary);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: modal-card-in var(--t-slow) var(--ease-spring) both;
}
.modal-backdrop.closing .modal-card {
  animation: modal-card-out var(--t-normal) var(--ease-smooth) both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-50);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: var(--text-lg);
}
.modal-close:hover {
  background: var(--purple-100);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6) var(--space-6);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-start;
}

/* ── Question flip card ── */
.flip-card-scene {
  perspective: 1200px;
  width: 100%;
}
.flip-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  width: 100%;
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-card-front,
.flip-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  width: 100%;
}
.flip-card-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

/* ══════════════════════════════════════════════════════════════
   BADGES / CHIPS
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-gold {
  background: var(--gold-100);
  color: var(--text-gold);
  border: 1px solid var(--border-gold);
}
.badge-purple {
  background: var(--purple-100);
  color: var(--purple-600);
  border: 1px solid rgba(124,80,216,0.20);
}
.badge-success {
  background: #E8F8EE;
  color: #1A7840;
  border: 1px solid rgba(40,160,80,0.20);
}
.badge-error {
  background: #FDEAF0;
  color: #C01840;
  border: 1px solid rgba(192,24,64,0.18);
}

/* ══════════════════════════════════════════════════════════════
   SCORE MEDALLION
   ══════════════════════════════════════════════════════════════ */
.score-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--gold-gradient);
  border: 2px solid var(--gold-400);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.45);
  font-size: var(--text-base);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  position: relative;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-spring),
              box-shadow var(--t-fast) var(--ease-smooth);
}
.score-medal:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 24px rgba(200,164,40,0.50), inset 0 1px 0 rgba(255,255,255,0.5);
}
.score-medal.used {
  background: #E8E0E8;
  border-color: #C8C0D0;
  color: #A890B8;
  cursor: default;
  opacity: 0.55;
  box-shadow: var(--shadow-xs);
}
.score-medal.used:hover { transform: none; }
.score-medal.locked {
  background: linear-gradient(135deg, #D0C8D8, #B8B0C8);
  border-color: #A8A0B8;
  cursor: not-allowed;
  opacity: 0.70;
}
.score-medal.locked::after {
  content: '🔒';
  position: absolute;
  font-size: 0.8em;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
}

/* ══════════════════════════════════════════════════════════════
   STREAK BAR
   ══════════════════════════════════════════════════════════════ */
.streak-bar-wrapper {
  width: 100%;
}
.streak-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}
.streak-bar-track {
  display: flex;
  gap: 3px;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.streak-segment {
  flex: 1;
  border-radius: 2px;
  background: var(--streak-empty);
  transition: background 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}
.streak-segment.active {
  background: var(--segment-color, var(--streak-3));
}
.streak-segment.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.30) 50%, transparent 100%);
  animation: shimmer 1.5s var(--ease-smooth) infinite;
  background-size: 200% 100%;
}
/* Full streak pulse */
.streak-bar-track.streak-full .streak-segment {
  animation: streak-pulse-full 1.2s ease-in-out infinite;
}
.streak-icon {
  font-size: var(--text-xl);
  line-height: 1;
  transition: transform 0.3s var(--ease-spring);
}
.streak-bar-track.streak-full ~ * .streak-icon {
  animation: pulse-scale 0.8s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
  max-width: 360px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toast-in 0.35s var(--ease-spring) both;
  min-width: 240px;
}
.toast.removing { animation: toast-out 0.3s var(--ease-smooth) both; }
.toast-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.toast-content { flex: 1; }
.toast-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}
.toast-message {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.toast-success { border-right: 4px solid #40C080; }
.toast-error   { border-right: 4px solid #E04060; }
.toast-warning { border-right: 4px solid #E09020; }
.toast-info    { border-right: 4px solid var(--purple-300); }

/* ══════════════════════════════════════════════════════════════
   CREDITS DISPLAY
   ══════════════════════════════════════════════════════════════ */
.credits-display {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--gold-100);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-smooth);
  box-shadow: var(--shadow-gold);
}
.credits-display:hover {
  background: var(--gold-200);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,164,40,0.35);
}
.credits-count {
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  color: var(--text-gold);
}
.credits-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gold-400);
}

/* ══════════════════════════════════════════════════════════════
   CATEGORY CARD (Game Setup)
   ══════════════════════════════════════════════════════════════ */
.category-card {
  background: var(--surface-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t-normal) var(--ease-smooth),
              transform var(--t-normal) var(--ease-spring),
              box-shadow var(--t-normal) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  user-select: none;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-300);
}
.category-card.selected {
  border-color: var(--gold-400);
  box-shadow: var(--shadow-gold), 0 0 0 2px rgba(200,164,40,0.20);
  transform: translateY(-2px);
}
.category-card.selected .category-card-img-wrap {
  opacity: 1;
}
.category-card-img-wrap {
  /* Match in-game category image shape (square, object-fit:contain)
     so the image the user sees on the pick screen is exactly how it
     shows on the game board. */
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 180px;
  margin: var(--space-3) auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: opacity var(--t-normal);
  position: relative;
  overflow: hidden;
}
.category-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;   /* preserve aspect, no cropping */
  filter: drop-shadow(0 3px 6px rgba(100,70,20,0.22));
}
.category-card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.category-card-body {
  padding: var(--space-3) var(--space-4);
}
.category-card-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.category-card-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-snug);
}
.category-card-check {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--gold-gradient);
  border: 2px solid var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s var(--ease-smooth), transform 0.3s var(--ease-spring);
  z-index: 2;
}
.category-card.selected .category-card-check {
  opacity: 1;
  transform: scale(1);
}

/* ══════════════════════════════════════════════════════════════
   GAME BOARD — CATEGORY COLUMN
   ══════════════════════════════════════════════════════════════ */
.board-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.board-column-header {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  text-align: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.board-column-emoji {
  font-size: 1.8rem;
  line-height: 1;
  display: block;
  margin-bottom: var(--space-1);
}
.board-column-name {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Question cell */
.question-cell {
  background: var(--surface-primary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-spring);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.question-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.3));
  pointer-events: none;
}
.question-cell:hover:not(.used):not(.locked) {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
  z-index: 2;
}
.question-cell:active:not(.used):not(.locked) {
  transform: scale(0.97);
}
.question-cell-value {
  font-size: var(--text-base);
  font-weight: var(--weight-black);
  color: var(--text-gold);
  letter-spacing: 0.02em;
}
/* Easy cells */
.question-cell[data-difficulty="easy"] { background: linear-gradient(135deg, #fff 0%, #FFF8F0 100%); }
.question-cell[data-difficulty="easy"] .question-cell-value { color: #7A5010; }
/* Medium cells */
.question-cell[data-difficulty="medium"] { background: linear-gradient(135deg, #fff 0%, #F8F0FF 100%); }
.question-cell[data-difficulty="medium"] .question-cell-value { color: #5830A8; }
/* Hard cells */
.question-cell[data-difficulty="hard"] { background: linear-gradient(135deg, #fff 0%, #FFF0F0 100%); }
.question-cell[data-difficulty="hard"] .question-cell-value { color: #A02030; }

.question-cell.used {
  background: linear-gradient(135deg, #F0ECF8 0%, #E8E4F0 100%);
  cursor: default;
  opacity: 0.50;
  border-color: transparent;
}
.question-cell.used .question-cell-value {
  text-decoration: line-through;
  color: var(--text-disabled);
}
.question-cell.locked {
  background: linear-gradient(135deg, #E8E4F0, #DDD8E8);
  cursor: not-allowed;
  border-style: dashed;
}
.question-cell.locked .question-cell-value { display: none; }
.question-cell.locked::after {
  content: '🔒';
  font-size: var(--text-sm);
}

/* ══════════════════════════════════════════════════════════════
   TEAM PANEL (Gameplay)
   ══════════════════════════════════════════════════════════════ */
.team-panel {
  background: var(--surface-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-md);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
  min-width: 200px;
}
.team-panel.active-turn {
  border-color: var(--gold-400);
  box-shadow: var(--shadow-gold), var(--shadow-md);
  animation: glow-gold 2.5s ease-in-out infinite;
}
.team-panel-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.team-panel-score {
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  color: var(--text-gold);
  line-height: 1;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}
.team-active-badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-gold);
  background: var(--gold-100);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  padding: 2px var(--space-3);
  display: inline-block;
  margin-bottom: var(--space-3);
  animation: pulse-soft 1.5s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   PURCHASE PACKAGE CARD
   ══════════════════════════════════════════════════════════════ */
.package-card {
  background: var(--surface-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  cursor: pointer;
  transition: all var(--t-normal) var(--ease-spring);
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.package-card:hover {
  border-color: var(--purple-300);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.package-card.selected {
  border-color: var(--gold-400);
  background: var(--gold-100);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.package-card-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-gradient);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  padding: 4px var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gold-400);
  white-space: nowrap;
}
.package-games {
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  color: var(--text-gold);
  line-height: 1;
}
.package-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin: var(--space-2) 0;
}
.package-price {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--purple-500);
}
.package-currency {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   IMAGE VIEWER FULLSCREEN
   ══════════════════════════════════════════════════════════════ */
.image-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,5,25,0.92);
  backdrop-filter: blur(16px);
  z-index: var(--z-top);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in var(--t-normal) both;
}
.image-viewer-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.image-viewer-content img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  object-fit: contain;
  transition: transform 0.3s var(--ease-smooth);
}
.image-viewer-close {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 40px; height: 40px;
  background: var(--surface-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--text-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: all var(--t-fast);
  color: var(--text-secondary);
}
.image-viewer-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--purple-50);
}
.image-viewer-zoom-controls {
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
}

/* ══════════════════════════════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
  margin: var(--space-4) 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin: var(--space-4) 0;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ══════════════════════════════════════════════════════════════
   DROPDOWN PANEL
   ══════════════════════════════════════════════════════════════ */
.dropdown-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  min-width: 320px;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
  overflow: hidden;
  animation: fade-down var(--t-normal) var(--ease-spring) both;
}
.dropdown-panel.hidden { display: none; }

/* ══════════════════════════════════════════════════════════════
   TURN SWITCH BUTTON
   ══════════════════════════════════════════════════════════════ */
.turn-switch-btn {
  background: var(--surface-primary);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-gold);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-smooth);
  box-shadow: var(--shadow-gold);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.turn-switch-btn:hover {
  background: var(--gold-100);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,164,40,0.35);
}
