/* ============================================
   CLIP RANKER - OnlyFlippers Style
   Light theme with diagonal stripes
   ============================================ */

/* === CSS VARIABLES === */
:root {
  /* Core palette - Light theme */
  --bg-primary: #f0f0f8;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);

  /* Brand colors */
  --purple: #5c4d9a;
  --purple-light: #7b6bb5;
  --purple-dark: #4a3d7a;
  --red: #e74c3c;
  --red-dark: #c0392b;
  --gold: #ffd700;

  /* Text */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-light: #ffffff;

  /* Borders & Shadows */
  --border-light: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-body: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Diagonal stripe background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 10px,
    rgba(180, 180, 210, 0.15) 10px,
    rgba(180, 180, 210, 0.15) 20px
  );
  pointer-events: none;
  z-index: -1;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

a {
  color: var(--purple);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--purple-light);
}

/* === NAVIGATION === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-md) var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: var(--purple);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--purple);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* === BUTTONS === */
.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--purple);
  color: var(--purple);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  color: var(--purple);
  border-color: var(--purple);
}

/* === CONTAINER === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* === HERO SECTION === */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-style: italic;
  color: var(--purple);
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

/* === SUBMIT SECTION === */
.submit-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.submit-section h2 {
  color: var(--purple);
  margin-bottom: var(--space-xs);
  text-align: center;
}

.submit-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.submit-form {
  display: flex;
  gap: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.submit-form input {
  flex: 1;
  padding: var(--space-md);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  font-size: 1rem;
}

.submit-form input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(92, 77, 154, 0.2);
}

.submit-error {
  color: var(--red);
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.9rem;
}

/* === RANKING SECTION === */
.ranking-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.ranking-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.ranking-header h2 {
  color: var(--purple);
  margin-bottom: var(--space-xs);
}

.ranking-progress {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ranking-instruction {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.ranking-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.ranking-clip {
  text-align: center;
}

.ranking-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ranking-clip .video-wrapper {
  margin-bottom: var(--space-md);
  border-radius: 8px;
  overflow: hidden;
}

.ranking-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  min-height: 2.4em;
}

.ranking-vs {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--purple);
  align-self: center;
  padding: var(--space-xl) 0;
}

.ranking-clip .btn-vote {
  width: 100%;
}

.ranking-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* === RANKING COMPLETE === */
.ranking-complete {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: var(--space-3xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.ranking-complete h2 {
  color: var(--purple);
  margin-bottom: var(--space-md);
}

.ranking-complete p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
}

.ranking-complete-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === PROGRESS BAR === */
.progress-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.progress-stats {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.progress-stat {
  text-align: center;
}

.progress-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  line-height: 1.2;
}

.progress-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === COMPARISON CONTAINER === */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: stretch;
  margin-bottom: var(--space-xl);
}

/* VS Divider */
.vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-md);
}

.vs-text {
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: var(--purple);
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
}

.vs-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--purple), transparent);
  margin: var(--space-md) 0;
  opacity: 0.5;
}

/* === VIDEO PANEL === */
.video-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.video-panel:hover {
  box-shadow: var(--shadow-md);
}

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  background: #f5f5f5;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.video-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clipped-by {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.clipped-at {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  opacity: 0.8;
}

/* Video title row with save button */
.video-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.video-title-row .video-title {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}

/* Save/Star button */
.btn-save {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-save:hover {
  color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  transform: scale(1.1);
}

.btn-save.saved {
  color: var(--gold);
}

.btn-save.saved:hover {
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.05);
}

.clip-link {
  font-size: 0.85rem;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--transition-fast);
}

.clip-link:hover {
  color: var(--purple-light);
}

.clip-link svg {
  width: 14px;
  height: 14px;
}

/* === ACTION BUTTONS === */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin: var(--space-lg) 0;
}

.btn-vote {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: var(--space-md) var(--space-xl);
  min-width: 140px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-vote--left {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--text-light);
}

.btn-vote--left:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-vote--right {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--text-light);
}

.btn-vote--right:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-vote--super {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--text-light);
}

.btn-vote--super:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-vote--tie {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-vote--tie:hover {
  transform: translateY(-3px);
  border-color: var(--purple);
  color: var(--purple);
}

.btn-vote--skip {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  box-shadow: none;
}

.btn-vote--skip:hover {
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

/* === KEYBOARD SHORTCUTS === */
.shortcuts {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--space-lg);
}

.key {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 var(--space-xs);
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* === TABS === */
.tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.tab-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab-btn:hover {
  color: var(--purple);
  border-color: var(--purple);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-color: var(--purple);
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}

/* === TABLE === */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

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

tr:hover td {
  background: rgba(92, 77, 154, 0.03);
}

.rank {
  font-weight: 700;
  width: 60px;
}

.rank--1 { color: var(--gold); }
.rank--2 { color: #c0c0c0; }
.rank--3 { color: #cd7f32; }

.elo {
  font-weight: 600;
  color: var(--purple);
}

.clip-name {
  font-weight: 500;
}

.clip-name a {
  color: var(--text-primary);
}

.clip-name a:hover {
  color: var(--purple);
}

.clip-thumbnail {
  width: 160px;
  padding: 4px;
}

.clip-thumbnail iframe {
  width: 160px;
  height: 90px;
  border: none;
  border-radius: 3px;
}

/* Thumbnail images (replacement for iframes) */
.clip-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: all var(--transition-base);
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
}

.clip-thumbnail-img[src=""],
.clip-thumbnail-img:not([src]) {
  visibility: hidden;
}

.thumbnail-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.thumbnail-link:hover .clip-thumbnail-img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.clip-thumbnail .thumbnail-link {
  width: 160px;
  height: 90px;
}

.clip-thumbnail .clip-thumbnail-img {
  width: 160px;
  height: 90px;
}

/* Thumbnail placeholder for broken images */
.thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
}

.thumbnail-placeholder svg {
  width: 32px;
  height: 32px;
}

.clip-thumbnail .thumbnail-placeholder {
  width: 160px;
  height: 90px;
}

.saved-item-thumbnail .thumbnail-placeholder {
  width: 100%;
  height: 100%;
}

/* === LOADING === */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  gap: var(--space-md);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-base);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--success {
  border-left: 4px solid #22c55e;
}

.toast--error {
  border-left: 4px solid var(--red);
}

/* === AUTH REQUIRED === */
.auth-required {
  text-align: center;
  padding: var(--space-3xl);
}

.auth-required h2 {
  color: var(--purple);
  margin-bottom: var(--space-md);
}

.auth-required p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.empty-state a {
  color: var(--purple);
}

/* === PAGE HEADER === */
.page-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.page-header h1 {
  color: var(--purple);
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.reorder-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
  font-style: italic;
}

/* === SAVED CLIPS LIST === */
.saved-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.saved-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: grab;
}

.saved-item:hover {
  box-shadow: var(--shadow-md);
}

.saved-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.saved-item.drag-over {
  border-color: var(--purple);
  background: rgba(92, 77, 154, 0.05);
}

.saved-item-drag {
  color: var(--text-muted);
  cursor: grab;
  padding: var(--space-xs);
}

.saved-item-drag svg {
  width: 20px;
  height: 20px;
}

.saved-item-rank {
  flex-shrink: 0;
}

.rank-input {
  width: 48px;
  height: 36px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.rank-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(92, 77, 154, 0.2);
}

.rank-input::-webkit-inner-spin-button,
.rank-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.saved-item-thumbnail {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
}

.saved-item-thumbnail iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.saved-item-info {
  flex: 1;
  min-width: 0;
}

.saved-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-xs);
}

.saved-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.saved-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.btn-arrow,
.btn-unsave,
.btn-open {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-arrow svg,
.btn-unsave svg,
.btn-open svg {
  width: 18px;
  height: 18px;
}

.btn-arrow:hover:not(:disabled) {
  background: rgba(92, 77, 154, 0.1);
  color: var(--purple);
}

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

.btn-unsave {
  color: var(--gold);
}

.btn-unsave:hover {
  background: rgba(255, 215, 0, 0.1);
  color: var(--text-muted);
}

.btn-open:hover {
  background: rgba(92, 77, 154, 0.1);
  color: var(--purple);
}

/* === RESPONSIVE LABELS === */
.label-mobile {
  display: none;
}

/* === ADD BUTTON (Leaderboard) === */
.action-column {
  width: auto;
  text-align: center;
  white-space: nowrap;
}

.btn-add {
  background: var(--purple);
  color: white;
  border: none;
  border-radius: 6px;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-add:hover:not(:disabled) {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.btn-add:disabled {
  background: var(--text-muted);
  cursor: default;
  opacity: 0.7;
}

/* === RANKING PROGRESS === */
.ranking-progress {
  text-align: center;
  padding: var(--space-md);
  background: var(--purple);
  color: white;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .label-desktop {
    display: none;
  }

  .label-mobile {
    display: inline;
  }

  .comparison-container {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .vs-divider {
    flex-direction: row;
    padding: var(--space-sm) 0;
  }

  .vs-text {
    writing-mode: horizontal-tb;
  }

  .vs-line {
    height: 2px;
    width: auto;
    flex: 1;
    margin: 0 var(--space-md);
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-vote {
    width: 100%;
  }

  .nav-links {
    gap: var(--space-md);
  }

  .progress-stats {
    gap: var(--space-lg);
  }
}

@media (max-width: 600px) {
  .container {
    padding: var(--space-md);
  }

  .navbar {
    padding: var(--space-sm) var(--space-md);
  }

  .nav-brand {
    font-size: 1.25rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  h1 { font-size: 1.75rem; }

  .hero {
    padding: var(--space-xl) var(--space-md);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  th, td {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }

  /* Saved list mobile */
  .saved-item {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .saved-item-drag {
    display: none;
  }

  .saved-item-thumbnail {
    width: 80px;
    height: 45px;
  }

  .saved-item-info {
    flex: 1 1 calc(100% - 160px);
    min-width: 150px;
  }

  .saved-item-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: var(--space-xs);
    border-top: 1px solid var(--border-light);
  }
}

/* === FLOATING CHARACTERS === */
.floating-character {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  opacity: 0.8;
}

.floating-character img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.float-1 {
  top: 10%;
  left: 5%;
  animation: float1 20s ease-in-out infinite;
}

.float-2 {
  top: 60%;
  right: 5%;
  animation: float2 25s ease-in-out infinite;
}

.float-3 {
  bottom: 20%;
  left: 10%;
  animation: float3 18s ease-in-out infinite;
}

.float-4 {
  top: 30%;
  right: 15%;
  animation: float4 22s ease-in-out infinite;
}

.float-5 {
  bottom: 40%;
  right: 8%;
  animation: float5 30s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(50px, -30px) rotate(15deg) scale(1.1); }
  50% { transform: translate(-30px, 20px) rotate(-10deg) scale(0.9); }
  75% { transform: translate(20px, -50px) rotate(20deg) scale(1.05); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-40px, 30px) rotate(-20deg); }
  66% { transform: translate(30px, -40px) rotate(25deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(60px, -60px) scale(1.2) rotate(180deg); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-30px, -30px) rotate(-15deg); }
  40% { transform: translate(40px, 10px) rotate(10deg); }
  60% { transform: translate(-20px, 40px) rotate(-20deg); }
  80% { transform: translate(30px, -20px) rotate(15deg); }
}

@keyframes float5 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(-50px, -20px) rotate(-30deg) scale(0.8); }
  50% { transform: translate(30px, 30px) rotate(45deg) scale(1.1); }
  75% { transform: translate(-40px, 10px) rotate(-15deg) scale(0.95); }
}

.floating-character:hover {
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
}

.floating-character:hover img {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* Hide floating characters on mobile */
@media (max-width: 768px) {
  .floating-character img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 600px) {
  .floating-character {
    display: none;
  }
}

/* === UTILITY CLASSES === */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
