/* Streamer card */
.streamer-card {
  display: flex;
  flex-direction: column;
  gap: var(--space);
  padding: var(--space);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.streamer-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.streamer-card__top {
  display: flex;
  align-items: center;
  gap: var(--space);
}

.streamer-card__avatar {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-color, var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 1.0625rem;
  overflow: hidden;
}

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

.streamer-card__live {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--success);
  border: 2px solid var(--surface-2);
  border-radius: 50%;
}

.streamer-card__info {
  min-width: 0;
}

.streamer-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.streamer-card__platform {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.streamer-card__stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.streamer-card__live-label {
  color: var(--success);
  font-weight: 600;
}

.streamer-card__footer {
  margin-top: auto;
}

.skeleton-card--streamer {
  height: 140px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.btn--primary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}

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

.btn--accent {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: none;
}

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

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
  height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.btn--block {
  width: 100%;
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 99px;
  border: 1px solid transparent;
}

.badge--active {
  color: var(--success);
  background: var(--success-light);
  border-color: rgba(25, 135, 84, 0.28);
}

.badge--pending {
  color: var(--warning);
  background: var(--warning-light);
  border-color: rgba(180, 93, 18, 0.2);
}

.badge--duel {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(31, 111, 235, 0.2);
}

.badge--challenge {
  color: var(--text-secondary);
  background: var(--surface-3);
  border-color: var(--border-subtle);
}

/* Duel card */
.duel-card {
  display: flex;
  flex-direction: column;
  gap: var(--space);
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.duel-card:hover {
  box-shadow: var(--shadow-md);
}

.duel-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.duel-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1 1 100%;
  color: var(--text-primary);
}

.duel-card__meta {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.duel-card__stats {
  display: flex;
  gap: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.duel-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-sm);
}

.duel-card__time {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* Skeleton */
.skeleton-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

.skeleton-card {
  height: 180px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

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

/* Modal */
.modal {
  width: min(480px, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.modal__inner {
  padding: 24px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.modal__head h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal__close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 1.25rem;
  line-height: 1;
}

.modal__close:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

/* Form */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  transition: all var(--transition);
}

.form-field input:not(textarea),
.form-field select {
  height: 44px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.form-error {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--danger);
  margin-bottom: var(--space);
}

/* Toast */
.toast-root {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  font-weight: 500;
  animation: toast-in 0.3s ease;
}

.toast--success {
  border-color: rgba(25, 135, 84, 0.28);
  background: var(--success-light);
  color: var(--success);
}

.toast--error {
  border-color: rgba(194, 65, 12, 0.28);
  background: var(--danger-light);
  color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-state h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
