:root {
  --bg-dark: #0a0a12;
  --bg-card: rgba(18, 18, 30, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --color-primary: #e5a00d; /* Plex Gold */
  --color-primary-glow: rgba(229, 160, 13, 0.35);
  --color-accent: #ff4b72;  /* Match Coral */
  --color-accent-glow: rgba(255, 75, 114, 0.4);
  --color-text: #ffffff;
  --color-text-muted: #9ba1b5;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--color-text);
  font-family: var(--font-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 60px;
}

/* Ambient Glow */
.ambient-glow {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, rgba(229, 160, 13, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Utility */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
}

/* App Header */
.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  border-radius: var(--radius-md);
  padding: 4px 6px;
  outline: none;
}

.logo-container:hover {
  transform: translateY(-1px) scale(1.02);
}

.logo-container:active {
  transform: translateY(1px) scale(0.98);
}

.logo-container:focus-visible {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-primary), #ff8400);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
  box-shadow: 0 4px 18px var(--color-primary-glow);
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text h1 span {
  color: var(--color-primary);
}

.logo-text .tagline {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Header Badges Group (Películas y Series separadas) */
.stats-badges-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 7px 15px;
  border-radius: 30px;
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.server-badge:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.badge-movies i {
  color: var(--color-primary);
  font-size: 13px;
}

.badge-series i {
  color: #38bdf8;
  font-size: 13px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 500px;
  margin: 10px auto 30px;
  position: relative;
  z-index: 10;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 40px;
  border: 1px solid var(--bg-card-border);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(229, 160, 13, 0.2), rgba(255, 75, 114, 0.2));
  color: #fff;
  border: 1px solid rgba(229, 160, 13, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.badge-couple {
  font-size: 11px;
  background: var(--color-accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

/* Content Views */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.tab-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Filters Card */
.filter-card {
  padding: 24px;
  margin-bottom: 24px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filter-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.form-select, .form-input {
  width: 100%;
  background: #121222;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #141424;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5a00d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 38px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.custom-select:hover {
  border-color: rgba(229, 160, 13, 0.4);
  background-color: #18182c;
}

.custom-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.custom-select option {
  background-color: #141424 !important;
  color: #ffffff !important;
  padding: 12px 14px;
  font-size: 14px;
}

/* Roulette Reel Display */
.roulette-box {
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slot-frame {
  width: 100%;
  max-width: 500px;
  height: 220px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(229, 160, 13, 0.35);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.slot-overlay-top, .slot-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50px;
  z-index: 5;
  pointer-events: none;
}

.slot-overlay-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 18, 0.95), transparent);
}

.slot-overlay-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(10, 10, 18, 0.95), transparent);
}

.slot-pointer {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 70px;
  transform: translateY(-50%);
  border-top: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  background: rgba(229, 160, 13, 0.08);
  box-shadow: 0 0 15px var(--color-primary-glow);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slot-frame.is-spinning .slot-pointer,
.slot-frame.has-items .slot-pointer {
  opacity: 1;
}

.reel-strip {
  display: flex;
  flex-direction: column;
  transition: transform 3.5s cubic-bezier(0.12, 0.8, 0.2, 1);
  will-change: transform;
}

.reel-item {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reel-item.default-reel {
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(229, 160, 13, 0.06) 0%, transparent 70%);
  border: none;
  z-index: 5;
  position: relative;
}

.reel-intro-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(229, 160, 13, 0.12);
  border: 1px solid rgba(229, 160, 13, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 26px;
  box-shadow: 0 0 25px var(--color-primary-glow);
}

.reel-intro-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.reel-intro-sub {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 360px;
  line-height: 1.5;
}

.reel-poster {
  width: 40px;
  height: 55px;
  border-radius: 4px;
  object-fit: cover;
}

.reel-info {
  text-align: left;
  flex: 1;
}

.reel-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Spin CTA Button */
.spin-cta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 42px;
  background: linear-gradient(135deg, var(--color-primary), #ff8400);
  border: none;
  border-radius: 50px;
  color: #000;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 30px var(--color-primary-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spin-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 40px rgba(229, 160, 13, 0.6);
}

.spin-cta:active {
  transform: translateY(1px);
}

.spin-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Winner Card Result */
.winner-card {
  margin-top: 20px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(229, 160, 13, 0.4);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.winner-content {
  display: flex;
  gap: 30px;
  position: relative;
  z-index: 2;
}

.winner-poster-wrapper {
  flex-shrink: 0;
  width: 220px;
  position: relative;
}

.winner-poster-wrapper img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.winner-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), #ff8400);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.winner-details {
  flex: 1;
}

.winner-details h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.winner-tagline {
  font-style: italic;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.winner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta-pill {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rating-pill {
  color: var(--color-primary);
  font-weight: 700;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.genre-tag {
  font-size: 11px;
  background: rgba(229, 160, 13, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(229, 160, 13, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.winner-summary {
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 24px;
  max-height: 120px;
  overflow-y: auto;
}

.winner-actions {
  display: flex;
  gap: 14px;
}

.btn-plex {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-primary), #ff8400);
  color: #000;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 15px var(--color-primary-glow);
  transition: transform 0.2s;
}

.btn-plex:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Match Tab: Lobby */
.match-lobby {
  padding: 36px 24px;
  text-align: center;
}

.match-lobby h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin-bottom: 8px;
}

.lobby-desc {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
  font-size: 14px;
}

.lobby-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.lobby-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bg-card-border);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lobby-card.highlight {
  border-color: rgba(255, 75, 114, 0.4);
  background: rgba(255, 75, 114, 0.05);
}

.card-icon {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.lobby-card.highlight .card-icon {
  color: var(--color-accent);
}

.lobby-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 8px;
}

.lobby-card p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.room-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-input {
  text-align: center;
  font-family: monospace;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--color-primary);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.lobby-card.highlight .btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 15px var(--color-accent-glow);
}

/* Match Waiting */
.match-waiting {
  padding: 50px 20px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.waiting-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 75, 114, 0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin: 0 auto 20px;
}

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

.room-code-display {
  font-size: 44px;
  font-family: monospace;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--color-accent);
  background: rgba(255, 75, 114, 0.1);
  border: 2px dashed var(--color-accent);
  padding: 14px;
  border-radius: var(--radius-md);
  margin: 15px auto;
  max-width: 250px;
}

.room-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 75, 114, 0.12);
  border: 1px solid rgba(255, 75, 114, 0.35);
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  margin: 12px auto;
  transition: all 0.3s ease;
}

.room-timer-badge #roomCountdown {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-accent);
}

.room-timer-badge.timer-urgent {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ff6b6b;
  animation: pulseUrgent 1s infinite alternate;
}

.room-timer-badge.timer-urgent #roomCountdown {
  color: #ff4757;
}

@keyframes pulseUrgent {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.waiting-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* Match Swiper Arena */
.match-arena {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

.match-arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.btn-mini-leave {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 13px;
}

.card-deck-container {
  width: 100%;
  height: 520px;
  position: relative;
}

.swipe-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #141422;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--bg-card-border);
  user-select: none;
  touch-action: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.card-poster {
  width: 100%;
  height: 70%;
  object-fit: cover;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, #141422 70%, transparent);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  gap: 10px;
}

.swipe-controls {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.btn-swipe {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-swipe:active {
  transform: scale(0.9);
}

.swipe-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Overlay de espera de compañero */
.partner-wait-overlay {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  bottom: 85px;
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.partner-wait-card {
  text-align: center;
  padding: 28px 22px;
  max-width: 320px;
  width: 100%;
  border-color: rgba(229, 160, 13, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.partner-wait-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.partner-wait-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(229, 160, 13, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin: 0 auto 14px;
}

.partner-wait-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 6px;
  color: #fff;
}

.partner-wait-card p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.btn-dislike {
  background: rgba(255, 255, 255, 0.08);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-like {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 20px var(--color-accent-glow);
}

/* Match Celebration Modal */
.match-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.match-modal-card {
  max-width: 480px;
  width: 100%;
  padding: 30px;
  text-align: center;
  border-color: rgba(255, 75, 114, 0.5);
  box-shadow: 0 20px 60px rgba(255, 75, 114, 0.3);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.match-header-spark i {
  font-size: 48px;
  color: var(--color-accent);
  animation: heartBeat 1.2s infinite;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

.match-header-spark h2 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 10px 0 4px;
  color: #fff;
}

.match-movie-preview {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: rgba(0, 0, 0, 0.4);
  padding: 14px;
  border-radius: var(--radius-md);
}

.match-movie-preview img {
  width: 70px;
  height: 105px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.match-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  border: 1px solid var(--color-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.hidden {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  body {
    padding-bottom: 40px;
  }

  .ambient-glow {
    width: 320px;
    height: 250px;
    top: -50px;
  }

  /* Header */
  .app-header {
    flex-direction: column;
    gap: 14px;
    align-items: center;
    padding: 16px 14px 10px;
    text-align: center;
  }

  .logo-container {
    justify-content: center;
    gap: 12px;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .logo-text h1 {
    font-size: 21px;
  }

  .logo-text .tagline {
    font-size: 12px;
  }

  .stats-badges-group {
    justify-content: center;
    width: 100%;
    gap: 8px;
  }

  .server-badge {
    font-size: 12px;
    padding: 6px 12px;
  }

  /* Nav Tabs */
  .nav-tabs {
    width: 100%;
    max-width: 100%;
    margin: 8px auto 20px;
    padding: 4px;
    gap: 6px;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 14px;
    gap: 6px;
  }

  /* Main Container */
  .main-content {
    padding: 0 12px;
  }

  /* Filters */
  .filter-card {
    padding: 18px 14px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
  }

  .filter-header h3 {
    font-size: 15px;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-select, .form-input {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 11px 14px;
  }

  /* Roulette Box */
  .roulette-box {
    padding: 20px 12px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
  }

  .slot-frame {
    max-width: 100%;
    height: 220px;
    border-radius: var(--radius-md);
  }

  .reel-item {
    padding: 10px 14px;
  }

  .reel-title {
    font-size: 14px;
  }

  .reel-intro-title {
    font-size: 20px;
  }

  .reel-intro-sub {
    font-size: 13px;
    padding: 0 10px;
  }

  .spin-cta {
    width: 100%;
    max-width: 320px;
    padding: 15px 24px;
    font-size: 16px;
    justify-content: center;
    margin-top: 20px;
  }

  /* Winner Card */
  .winner-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .winner-content {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .winner-poster-wrapper {
    width: 180px;
    max-width: 65%;
  }

  .winner-poster-wrapper img {
    height: 260px;
  }

  .winner-details {
    text-align: center;
    width: 100%;
  }

  .winner-details h2 {
    font-size: 22px;
  }

  .winner-tagline {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .winner-meta, .genre-tags {
    justify-content: center;
    gap: 6px;
  }

  .winner-summary {
    font-size: 13px;
    text-align: left;
    max-height: 100px;
    margin-bottom: 18px;
  }

  .winner-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .btn-plex, .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 13px;
    font-size: 15px;
  }

  /* Match Arena */
  .match-lobby {
    padding: 24px 14px;
    border-radius: var(--radius-md);
  }

  .match-lobby h2 {
    font-size: 22px;
  }

  .lobby-options {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-deck-container {
    height: 460px;
    max-height: 60vh;
  }

  .card-title {
    font-size: 20px;
  }

  .swipe-controls {
    gap: 24px;
    margin-top: 16px;
  }

  .btn-swipe {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }

  /* Match Modal */
  .match-modal-card {
    padding: 22px 16px;
  }

  .match-header-spark h2 {
    font-size: 24px;
  }

  .match-actions {
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .logo-text h1 {
    font-size: 19px;
  }

  .stats-badges-group {
    flex-direction: column;
    gap: 6px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 8px 10px;
  }
}
