/* ============================================
   LOADING STATES
   ============================================ */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
  height: 1px;
  background: var(--divider);
  margin: 12px 0;
}

/* ============================================
   COMPONENTS — Buttons, Cards, Inputs, Badges
   ============================================ */

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* Secondary */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
}

/* Danger */
.btn-danger {
  background: var(--accent-red);
  color: #FFFFFF;
}

/* Green */
.btn-green {
  background: var(--accent-green);
  color: #FFFFFF;
}

/* Sizes */
.btn-sm {
  padding: 8px 14px;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-lg);
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.btn-lg {
  padding: 16px 28px;
  font-size: var(--font-size-md);
  border-radius: var(--radius-2xl);
}

.btn-xl {
  padding: 18px 32px;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-2xl);
  font-weight: 700;
}

/* Full width */
.btn-full {
  width: 100%;
}

/* Icon button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: 18px;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-size: 16px;
}

/* Create Button (new premium CTA) */
.btn-create {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-indigo));
  color: white;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 4px 24px rgba(6, 138, 250, 0.24), 0 0 0 0 rgba(6, 138, 250, 0.38);
  position: relative;
  overflow: hidden;
  animation: float 3s ease-in-out infinite;
  animation-delay: 1s;
}

.btn-create::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-create:hover::before {
  opacity: 1;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(6, 138, 250, 0.34), 0 0 0 4px rgba(6, 138, 250, 0.14);
}

.btn-create:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 16px rgba(6, 138, 250, 0.28);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--spacing-4);
  transition: all var(--transition-base);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.card-interactive {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-interactive:hover {
  background: var(--bg-card-hover);
}

.card-interactive:active {
  transform: scale(0.98);
}

.card-flat {
  border-radius: var(--radius-lg);
  padding: var(--spacing-3);
}

.card-outline {
  background: transparent;
  border: 1px solid var(--border);
}

/* Card with header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4);
  border-bottom: 0.5px solid var(--border);
}

.card-body {
  padding: var(--spacing-4);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-4);
  border-top: 0.5px solid var(--border);
}

/* Live Card (new) */
.live-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

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

.live-card:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 113, 113, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Live Badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* Match display */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.team-emblem {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
}

.team-a .team-emblem {
  background: linear-gradient(135deg, rgba(6, 138, 250, 0.2), rgba(92, 124, 255, 0.1));
  border: 1px solid rgba(6, 138, 250, 0.22);
}

.team-b .team-emblem {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(248, 113, 113, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.match-center {
  flex: 0 0 80px;
  text-align: center;
}

.match-score {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.match-score .vs {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.match-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-item {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  opacity: 0.6;
}

/* Tournament Card (new) */
.tournament-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  margin-bottom: 12px;
}

.tournament-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 138, 250, 0.22);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tournament-card:active {
  transform: scale(0.98);
}

.tournament-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tournament-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tournament-teams-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.teams-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.teams-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.tournament-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tournament-info {
  display: flex;
  gap: 12px;
}

.info-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.info-pill svg {
  opacity: 0.5;
}

.prize-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(248, 113, 113, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.prize-badge span {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-orange);
}

/* ============================================
   STAT CARDS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 20px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
}

.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
}

.stat-card:hover {
  border-color: rgba(6, 138, 250, 0.22);
  transform: translateY(-1px);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, rgba(6, 138, 250, 0.15), rgba(6, 138, 250, 0.06));
}

.stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(74, 222, 128, 0.05));
}

.stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card:nth-child(1) .stat-value {
  color: var(--accent);
}

.stat-card:nth-child(2) .stat-value {
  color: var(--accent-green);
}

.stat-card:nth-child(3) .stat-value {
  color: var(--accent-orange);
}

.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ============================================
   BADGES & TAGS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1;
}

.badge-live {
  background: var(--accent-red-bg);
  color: var(--accent-red);
  animation: livePulse 2s ease-in-out infinite;
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-red);
  animation: liveDot 1.5s ease-in-out infinite;
}

.badge-green {
  background: var(--accent-green-bg);
  color: var(--accent-green);
}

.badge-blue {
  background: rgba(6, 138, 250, 0.12);
  color: var(--accent);
}

.badge-orange {
  background: rgba(255, 159, 10, 0.12);
  color: var(--accent-orange);
}

.badge-gray {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.badge-interactive {
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.badge-interactive:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.badge-interactive:active {
  transform: translateY(0) scale(0.95);
}

.badge-purple {
  background: rgba(191, 90, 242, 0.12);
  color: var(--accent-purple);
}

/* Live dot (new) */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px var(--accent-red);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.2);
    box-shadow: 0 0 16px var(--accent-red);
  }
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes liveDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Tournament tags */
.tournament-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag-open {
  background: rgba(74, 222, 128, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.tag-closed {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ============================================
   AVATAR
   ============================================ */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

.avatar-xl {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.avatar-2xl {
  width: 96px;
  height: 96px;
  font-size: 32px;
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -10px;
  border: 2px solid var(--bg-primary);
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* Team avatars row (new) */
.team-avatars {
  display: flex;
}

.team-avatars .avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 2px solid var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-left: -8px;
}

.team-avatars .avatar:first-child {
  margin-left: 0;
}

/* ============================================
   TOAST
   ============================================ */

.toast-container {
  position: fixed;
  top: calc(var(--safe-area-top) + var(--header-height) + var(--spacing-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: 6000;
  width: calc(100% - 32px);
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-3) var(--spacing-4);
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  box-shadow: 0 8px 32px var(--shadow-lg);
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toast.hiding {
  animation: toastOut 0.3s ease-out forwards;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.toast-message {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* Standalone toast (new) */
.toast-standalone {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.2, 0, 0, 1);
  white-space: nowrap;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast-standalone.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-standalone .toast-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.toast-standalone .toast-text {
  font-size: 14px;
  font-weight: 500;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.modal-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border-radius: 32px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}

.modal-title {
  font-size: var(--font-size-md);
  font-weight: 700;
}

.modal-body {
  padding: var(--spacing-4);
}

.modal-footer {
  display: flex;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
  border-top: 0.5px solid var(--border);
}

.modal-handle {
  width: 36px;
  height: 5px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: var(--spacing-3) auto var(--spacing-2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* ============================================
   PROGRESS STEPS
   ============================================ */

.steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--spacing-4) 0;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2);
  position: relative;
}

.step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% - 14px);
  height: 2px;
  background: var(--border);
  transition: background var(--transition-base);
}

.step:last-child::before {
  display: none;
}

.step.active::before,
.step.completed::before {
  background: var(--accent);
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-tertiary);
  transition: all var(--transition-base);
  z-index: 1;
}

.step.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.step.completed .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.step-label {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  text-align: center;
  transition: color var(--transition-base);
}

.step.active .step-label,
.step.completed .step-label {
  color: var(--accent);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.toggle {
  width: 51px;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.toggle.active {
  background: var(--accent-green);
}

.toggle-thumb {
  width: 26px;
  height: 26px;
  background: #FFFFFF;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-spring);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle.active .toggle-thumb {
  transform: translateX(19px);
}

/* ============================================
   RESULT BADGE (Match Score)
   ============================================ */

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.score-win {
  background: var(--accent-green-bg);
  color: var(--accent-green);
}

.score-loss {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

.score-draw {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* ============================================
   FORM INPUTS
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-6);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: var(--spacing-1);
}

.input {
  width: 100%;
  padding: 12px var(--spacing-4);
  background: var(--bg-tertiary);
  border: 1px solid rgba(142, 142, 147, 0.15);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input:hover {
  background: var(--bg-secondary);
}

.input:focus {
  border-color: var(--accent);
  background: var(--bg-secondary);
  outline: none;
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input-lg {
  padding: 16px var(--spacing-4);
  font-size: var(--font-size-md);
  border-radius: var(--radius-lg);
}

.input-error {
  border-color: var(--accent-red);
  background: var(--accent-red-bg);
}

.input-error-text {
  font-size: var(--font-size-xs);
  color: var(--accent-red);
  margin-top: var(--spacing-1);
}

/* Textarea */
.textarea {
  resize: vertical;
  min-height: 80px;
}

/* Select */
.select {
  width: 100%;
  padding: 12px var(--spacing-4);
  background: var(--bg-tertiary);
  border: 1px solid rgba(142, 142, 147, 0.15);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E93' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: all var(--transition-fast);
}

.select:focus {
  border-color: var(--accent);
  outline: none;
}

.select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  cursor: pointer;
  user-select: none;
}

.checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox.checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-check {
  font-size: 12px;
  color: #FFFFFF;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.checkbox.checked .checkbox-check {
  opacity: 1;
  transform: scale(1);
}

.checkbox-label {
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

.checkbox-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Radio */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-3) var(--spacing-4);
  background: var(--bg-tertiary);
  border: 1px solid rgba(142, 142, 147, 0.15);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-option:hover {
  background: var(--bg-card-hover);
}

.radio-option.selected {
  border-color: var(--accent);
  background: rgba(6, 138, 250, 0.08);
}

.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.radio-option.selected .radio-dot {
  border-color: var(--accent);
}

.radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition-fast);
}

.radio-option.selected .radio-dot::after {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.loading-state p {
  margin-top: 12px;
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  animation: spin 0.75s linear infinite;
}

/* ============================================
   TABLES & RANKINGS
   ============================================ */

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.standings-table th {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 0.5px solid var(--border);
}

.standings-table td {
  padding: 14px;
  border-bottom: 0.5px solid var(--border);
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.group-card-header {
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border-bottom: 0.5px solid var(--border);
}

.rank {
  font-weight: 800;
  color: var(--text-tertiary);
}

.rank-1 { color: #FFD700; } /* Gold */
.rank-2 { color: #C0C0C0; } /* Silver */
.rank-3 { color: #CD7F32; } /* Bronze */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border);
}
