/* =====================================================
   FC Draft Game stylesheet - cleaned and organised from v1.7
   ===================================================== */

/* =====================================================
   01 Reset / WordPress Fixes
   ===================================================== */

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

body.home > .wp-site-blocks > header {
  display: none !important;
}

body.home header, body.home .wp-block-template-part {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background: #07111f;
  color: white;
  overflow: auto;
}

body.home main, body.home .wp-block-group, body.home .wp-block-post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.home .wp-block-post-title {
  display: none !important;
}

body.page header.wp-block-template-part, body.page .wp-block-template-part:has(header), body.page > .wp-site-blocks > header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page main, body.page .wp-site-blocks, body.page .wp-block-post-content, body.page .wp-block-group {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.page h1.wp-block-post-title, body.page .entry-title {
  display: none !important;
}

.entry-title, .wp-block-post-title {
  display: none !important;
}

body.page .entry-content.alignfull, body.page .wp-block-post-content, body.page .has-global-padding, body.page .is-layout-constrained {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
}

body.page .entry-content > * {
  max-width: none !important;
}

.wp-block-group, .wp-block-group__inner-container, .alignfull {
  max-width: 100% !important;
  overflow-x: hidden;
}

/* =====================================================
   02 Main Layout
   ===================================================== */

#fc-draft-game {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: hidden;
}

#fc-draft-game * {
  box-sizing: border-box;
}

.app {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 16px;
  padding: 16px;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.right-panel {
  display: grid;
  grid-template-columns: minmax(700px, 1fr) 340px;
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.hero {
  text-align: left;
}

.hero h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.hero p {
  color: #94a3b8;
  font-size: 13px;
}

.squad-panel {
  background: #020617;
  min-width: 0;
}

#fc-draft-game, #fc-collection, #fc-pack-store {
  padding-top: 84px !important;
}

.walkout-rarity.hero {
  color: #22c55e;
}

.hero-walkout .pack-particles span {
  background: #22c55e;
}

.pack-animation-pack.hero {
  background: radial-gradient(circle at 50% 16%, #dcfce7, transparent 28%), linear-gradient(145deg, #dcfce7 0%, #22c55e 34%, #14532d 100%) !important;
}

.hero-pack-animation {
  background: radial-gradient(circle at center, rgba(34,197,94,.22), transparent 32%), linear-gradient(180deg, rgba(15,23,42,.98), rgba(2,6,23,.98)) !important;
}

/* =====================================================
   03 Header / Navigation
   ===================================================== */

.game-title {
  font-size: 24px;
  font-weight: 700;
}

.game-top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.coin-display {
  font-weight: 700;
  font-size: 18px;
}

.user-display {
  opacity: .8;
}

#fc-draft-game .game-top-right {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

#fc-draft-game .coin-display, #fc-draft-game .user-display {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: white !important;
  font-weight: 900 !important;
  font-size: 15px !important;
}

#fc-draft-game .coin-display img.emoji {
  width: 18px !important;
  height: 18px !important;
}

.game-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.game-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.game-nav a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.2s;
}

.game-nav a:hover {
  background: #1e293b;
}

.game-nav a.current-page {
  background: #2563eb;
}

.game-top-bar, #fc-draft-game .game-top-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999999 !important;
  width: 100% !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 12px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #020617 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  overflow: visible !important;
}

body.admin-bar .game-top-bar, body.admin-bar #fc-draft-game .game-top-bar {
  top: 32px !important;
}

.game-left, #fc-draft-game .game-left {
  display: flex !important;
  align-items: center !important;
  gap: 22px !important;
  min-width: 0 !important;
}

.game-title, #fc-draft-game .game-title {
  white-space: nowrap !important;
}

.game-nav, #fc-draft-game .game-nav {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.game-nav a, #fc-draft-game .game-nav a {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
}

.game-nav a:hover, #fc-draft-game .game-nav a:hover {
  background: #1e293b !important;
  color: #facc15 !important;
}

.game-top-right, #fc-draft-game .game-top-right {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 0 0 auto !important;
}

.coin-display, .user-display, #fc-draft-game .coin-display, #fc-draft-game .user-display {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  border-radius: 999px !important;
  padding: 8px 12px !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.mobile-menu-toggle {
  display: none !important;
}

.fc-auth-open, .logout-button {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 900;
  cursor: pointer;
  background: #1e293b;
  color: #facc15;
}

.fc-auth-open:hover, .logout-button:hover {
  background: #334155;
  color: #ffffff;
}

.fc-user-name {
  color: #ffffff;
  font-weight: 900;
}

/* =====================================================
   04 Spinner / Draft Controls
   ===================================================== */

.machine, .result-panel, .player-panel, .squad-panel, .ratings-panel, .chemistry-links-panel, .simulation-results, .match-feed-panel {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.formation-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
}

.formation-selector label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #facc15;
  margin-bottom: 6px;
}

.formation-selector select {
  background: #020617;
  color: white;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 800;
}

.machine {
  border-color: #eab308;
}

.machine-top {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.machine-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
}

.machine-top span:nth-child(2) {
  background: #eab308;
}

.machine-top span:nth-child(3) {
  background: #22c55e;
}

.screen {
  background: #020617;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.slot-window {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px;
}

.reel-container {
  height: 48px;
  overflow: hidden;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #020617;
}

.reel-track {
  transition: transform 3s cubic-bezier(.17,.67,.15,1);
}

.reel-item {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  padding: 0 5px;
}

.spin-button, .simulate-button, .skip-button {
  width: 100%;
  border: none;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
}

.spin-button, .simulate-button {
  font-size: 15px;
  padding: 12px;
}

.spin-button {
  background: #eab308;
  color: #111827;
}

.spin-button:disabled, .simulate-button:disabled, .skip-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.result-panel {
  background: #020617;
}

.result-panel p, #playerHint, #squadCount {
  color: #94a3b8;
  margin-bottom: 6px;
  font-size: 12px;
}

.result-panel h2 {
  color: #facc15;
  font-size: 16px;
}

.player-panel {
  overflow: auto;
}

.player-panel h2, .squad-panel h2, .ratings-panel h2, .chemistry-links-panel h2 {
  font-size: 16px;
  margin-bottom: 6px;
}

.player-options {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr !important;
}

.position-picker {
  display: none;
  margin-top: 10px;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.position-choice, .back-button {
  border: 1px solid #334155;
  background: #020617;
  color: white;
  border-radius: 10px;
  padding: 10px;
  font-weight: 800;
  cursor: pointer;
}

.position-choice:hover, .back-button:hover {
  background: #facc15;
  color: #111827;
}

.back-button {
  width: 100%;
  margin-bottom: 8px;
  background: #334155;
}

.squad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.squad-header h2 {
  margin: 0;
}

.restart-button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding: 0 !important;
  border: none;
  border-radius: 50%;
  background: #1e293b;
  color: #facc15;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  margin: 0 !important;
  transition: transform 0.25s ease, background 0.25s ease;
}

.restart-button i {
  transition: transform 0.4s ease;
}

.restart-button:hover {
  background: #334155;
}

.restart-button:hover i, .restart-button:hover {
  transform: rotate(180deg);
}

.screen-reader-text {
  max-width: 1px !important;
  overflow: hidden !important;
}

.retry-spin-button {
  width: 100%;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
  padding: 12px;
  background: #3b82f6;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 8px;
}

.retry-spin-button:hover:not(:disabled) {
  background: #2563eb;
}

.retry-spin-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* =====================================================
   05 Player Cards
   ===================================================== */

.player-card {
  position: relative;
  min-height: 110px;
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0;
  transform: translateY(18px) scale(.94);
  animation: cardSlotReveal .55s ease forwards;
  transition: transform .2s ease, box-shadow .2s ease;
}

.player-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0,0,0,.35);
}

.player-card:nth-child(1) {
  animation-delay: .2s;
}

.player-card:nth-child(2) {
  animation-delay: .45s;
}

.player-card:nth-child(3) {
  animation-delay: .7s;
}

.player-card:nth-child(4) {
  animation-delay: .95s;
}

.player-card:nth-child(5) {
  animation-delay: 1.2s;
}

.rarity-gold {
  background: linear-gradient(180deg, #fff8dc 0%, #facc15 45%, #b7791f 100%);
  border-color: #fde68a;
  box-shadow: 0 4px 16px rgba(250,204,21,.35);
}

.rarity-hero {
  background: linear-gradient(180deg, #dcfce7 0%, #22c55e 45%, #166534 100%);
  border-color: #86efac;
  box-shadow: 0 4px 18px rgba(34,197,94,.45);
}

.rarity-legend {
  background: linear-gradient(180deg, #f5f3ff 0%, #a855f7 45%, #6d28d9 100%);
  border-color: #c084fc;
  box-shadow: 0 4px 18px rgba(168,85,247,.45);
}

.rarity-icon {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 35%, #f8fafc 65%, #e2e8f0 100%);
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255,255,255,.75), 0 4px 24px rgba(255,255,255,.45);
  color: #111827;
}

.rarity-icon::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -60%;
  width: 50%;
  height: 300%;
  background: rgba(255,255,255,.2);
  transform: rotate(25deg);
  animation: iconShine 4s linear infinite;
}

.card-rating {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: #111827;
}

.card-position {
  position: absolute;
  top: 44px;
  left: 16px;
  font-size: 11px;
  font-weight: 800;
  color: #111827;
}

.card-rarity {
  position: absolute;
  top: 8px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 900;
  background: rgba(0,0,0,.25);
  color: white;
}

.card-avatar {
  margin-top: 6px;
  font-size: 12px;
}

.card-name {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 900;
  color: #111827;
}

.card-bottom {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
}

.card-club, .card-meta {
  margin-top: 4px;
  font-size: 10px;
  color: #475569;
}

.mini-card-rating {
  font-size: clamp(14px, 1.6vw, 22px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-align: left !important;
}

.mini-card-avatar {
  font-size: 13px;
  margin: 2px 0;
  line-height: 1;
}

.mini-card-name {
  font-size: 8px;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-card-club {
  font-size: clamp(7px, 0.8vw, 10px) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  margin-top: 3px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: normal !important;
  text-align: center !important;
}

.mini-card-rarity {
  line-height: 1.05 !important;
  font-size: 6px;
  font-weight: 900;
  opacity: .85;
}

.duplicate-card {
  text-align: center;
  padding: 30px;
  margin-top: 20px;
  background: #111827;
  border: 2px solid #f59e0b;
  border-radius: 12px;
}

.duplicate-card h2 {
  color: #f59e0b;
  margin-bottom: 10px;
}

.sell-player-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  background: #dc2626;
  color: white;
}

.collection-grid .player-card {
  height: 310px;
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative !important;
  padding-bottom: 95px !important;
  border-width: 4px !important;
  border-style: solid !important;
}

.collection-grid .card-avatar {
  flex: 1;
  text-align: center;
  display: flex;
  margin: 12px 0 !important;
  justify-content: center;
  align-items: center;
  margin-top: 55px !important;
  font-size: 50px !important;
  line-height: 1;
  z-index: 2;
}

.collection-grid .player-card:nth-child(-n+5) {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

.collection-grid .player-card > *:not(.card-flag-bg) {
  position: relative;
  z-index: 1;
}

.collection-grid .card-rating, .collection-grid .card-position, .collection-grid .card-rarity, .collection-grid .card-avatar, .collection-grid .card-name, .collection-grid .card-bottom, .collection-grid .card-club {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 2;
}

.collection-grid .card-rating {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  z-index: 5 !important;
}

.collection-grid .card-position {
  position: absolute !important;
  top: 14px !important;
  right: 12px !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  z-index: 5 !important;
}

.collection-grid .card-rarity {
  position: absolute !important;
  top: 42px !important;
  right: 10px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  z-index: 5 !important;
}

.collection-grid .owned-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 5 !important;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #020617;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.collection-grid .card-bottom {
  margin-bottom: 16px !important;
}

.pack-rarity-burst {
  position: absolute;
  inset: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  animation: packBurst 0.9s ease-out forwards;
}

.pack-reveal .player-card {
  width: 100%;
  position: relative;
  z-index: 2;
}

.pack-reveal-gold .pack-rarity-burst {
  background: radial-gradient(circle, rgba(250,204,21,0.75), transparent 65%);
}

.pack-reveal-hero .pack-rarity-burst {
  background: radial-gradient(circle, rgba(34,197,94,0.75), transparent 65%);
}

.pack-reveal-legend .pack-rarity-burst {
  background: radial-gradient(circle, rgba(168,85,247,0.85), transparent 65%);
}

.pack-reveal-icon .pack-rarity-burst {
  background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(250,204,21,0.45), transparent 70%);
}

.pack-reveal-icon .player-card {
  animation: iconWalkout 1.1s ease-out forwards;
}

.pack-reveal-legend .player-card {
  animation: legendReveal 0.9s ease-out forwards;
}

.pack-reveal-hero .player-card {
  animation: heroReveal 0.75s ease-out forwards;
}

.pack-reveal-gold .player-card {
  animation: goldReveal 0.55s ease-out forwards;
}

.collection-grid .rarity-gold {
  border-color: #FFD700 !important;
  box-shadow: 0 0 10px rgba(255,215,0,.35), 0 0 22px rgba(255,215,0,.25), inset 0 0 8px rgba(255,215,0,.20);
}

.collection-grid .rarity-hero {
  border-color: #2ecc71 !important;
  box-shadow: 0 0 10px rgba(46,204,113,.35), 0 0 22px rgba(46,204,113,.25), inset 0 0 8px rgba(46,204,113,.20);
}

.collection-grid .rarity-legend {
  border-color: #9b59b6 !important;
  box-shadow: 0 0 10px rgba(155,89,182,.40), 0 0 24px rgba(155,89,182,.30), inset 0 0 8px rgba(155,89,182,.20);
}

.collection-grid .rarity-icon {
  border-color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255,255,255,.55), 0 0 28px rgba(255,255,255,.35), inset 0 0 10px rgba(255,255,255,.20);
}

.collection-grid .card-club {
  margin-top: 4px;
  margin-bottom: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,1);
  z-index: 2;
}

.collection-grid .rarity-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  background: rgba(2,6,23,.9);
  border: 2px solid #fff;
}

.collection-grid .rarity-badge.rarity-gold {
  border-color: #FFD700;
  color: #FFD700;
}

.collection-grid .rarity-badge.rarity-hero {
  border-color: #22c55e;
  color: #22c55e;
}

.collection-grid .rarity-badge.rarity-legend {
  border-color: #a855f7;
  color: #a855f7;
}

.collection-grid .rarity-badge.rarity-icon {
  border-color: #ffffff;
  color: #ffffff;
}

.mini-card-position {
  font-size: clamp(9px, 1vw, 13px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: block !important;
  text-align: right !important;
  color: inherit !important;
}

.pack-final-card .player-card {
  width: 245px;
  min-height: 330px;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  cursor: default;
}

.pack-final-card .card-avatar {
  font-size: 52px;
  margin-top: 78px;
}

.rarity-bronze {
  background: linear-gradient(180deg, #f3c38b 0%, #b87333 48%, #5c2e12 100%);
  border-color: #d08a45;
  box-shadow: 0 4px 16px rgba(184,115,51,.35);
  color: #111827;
}

.rarity-silver {
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 48%, #64748b 100%);
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(203,213,225,.4);
  color: #111827;
}

/* =====================================================
   06 Pitch / Formations
   ===================================================== */

.pitch {
  position: relative !important;
  width: 100%;
  height: auto;
  background: linear-gradient( 90deg, rgba(255,255,255,.05) 50%, transparent 50% ), #0f5132;
  background-size: 80px 100%;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 16px;
  margin-top: 8px;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(520px, 70vh, 760px) !important;
  padding: clamp(8px, 1vw, 14px) !important;
  gap: clamp(6px, 1vw, 14px) !important;
}

.position {
  width: 70px;
  min-height: 42px;
  padding: 5px;
  border-radius: 10px;
  position: relative !important;
  z-index: 2 !important;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255,255,255,.45);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.15;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  margin: 0 auto;
}

.mini-card-row {
  font-size: 7px;
  margin-top: 1px;
  gap: 4px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  display: none !important;
}

.row {
  flex-wrap: nowrap !important;
  gap: 8px;
  display: flex;
  justify-content: center;
}

.position.filled {
  background: linear-gradient(180deg, #fff7cc 0%, #facc15 60%, #b7791f 100%);
  color: #111827;
  border: 1px solid #fef3c7;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  transform: scale(1.03);
  justify-content: flex-start !important;
  align-items: stretch !important;
  cursor: pointer;
}

.mini-gold {
  background: linear-gradient(180deg, #fff7cc 0%, #facc15 60%, #b7791f 100%) !important;
  color: #111827;
}

.mini-hero {
  background: linear-gradient(180deg, #dcfce7 0%, #22c55e 60%, #166534 100%) !important;
  color: white;
}

.mini-legend {
  background: linear-gradient(180deg, #ede9fe 0%, #a855f7 60%, #6d28d9 100%) !important;
  color: white;
}

.mini-icon {
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 60%, #64748b 100%) !important;
  color: #111827;
  box-shadow: 0 0 10px rgba(255,255,255,.4);
}

.mini-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin-bottom: 3px !important;
}

.mini-bronze {
  background: linear-gradient(180deg, #f3c38b 0%, #b87333 60%, #5c2e12 100%) !important;
  color: #111827;
}

.mini-silver {
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 60%, #64748b 100%) !important;
  color: #111827;
}

.position.move-selected {
  outline: 3px solid #38bdf8 !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,.25), 0 0 22px rgba(56,189,248,.7) !important;
  transform: scale(1.08) !important;
}

.position.move-valid {
  outline: 3px solid #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,.22), 0 0 20px rgba(34,197,94,.65) !important;
  cursor: pointer;
}

.position.move-invalid {
  opacity: .45;
  filter: grayscale(.7);
}

/* =====================================================
   07 Ratings / Chemistry
   ===================================================== */

.chemistry-lines {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.ratings-grid, .sim-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.rating-box, .sim-box {
  background: #f8fafc;
  color: #111827;
  border-radius: 10px;
  padding: 9px 6px;
}

.rating-box span, .sim-box span {
  display: block;
  font-size: 9px;
  color: #64748b;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.rating-box strong, .sim-box strong {
  font-size: 21px;
}

.chemistry {
  background: #22c55e;
}

.chemistry-links-panel {
  margin-top: 10px;
}

.chemistry-links {
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.chem-link {
  background: #020617;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid transparent;
}

.chem-link.perfect {
  border-left-color: #22c55e;
}

.chem-link.good {
  border-left-color: #facc15;
}

.chem-link.weak {
  border-left-color: #ffffff;
}

.chem-link.none {
  border-left-color: #ef4444;
}

.chem-points {
  color: #facc15;
}

.chem-line {
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0.85;
}

.chem-line.perfect {
  stroke: #22c55e;
}

.chem-line.good {
  stroke: #facc15;
}

.chem-line.weak {
  stroke: #ffffff;
}

.chem-line.none {
  stroke: #ef4444;
  opacity: 0.75;
}

.chem-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.chem-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.perfect-dot {
  background: #22c55e;
}

.good-dot {
  background: #facc15;
}

.weak-dot {
  background: #ffffff;
}

.none-dot {
  background: #ef4444;
}

.chem-explainer {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
  font-size: 11px;
  color: #cbd5e1;
}

.chem-explainer h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #facc15;
}

.chem-explainer p {
  margin: 0 0 8px;
  line-height: 1.4;
}

.chem-explainer ul {
  margin: 0 0 8px;
  padding-left: 16px;
}

.chem-explainer li {
  margin-bottom: 4px;
}

.chem-dropdown-info {
  padding: 0 12px 12px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.5;
}

/* =====================================================
   08 Simulation / Match Feed
   ===================================================== */

.skip-button {
  background: #334155;
  color: #cbd5e1;
  font-size: 13px;
  padding: 10px;
  margin-bottom: 8px;
}

.simulation-results {
  background: #020617;
  border-radius: 10px;
  padding: 10px;
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 10px;
}

.sim-finish {
  margin-top: 8px;
  color: #facc15;
  font-weight: 900;
}

.match-feed-panel {
  background: #020617;
  border-radius: 14px;
  padding: 12px;
  position: sticky;
  top: 12px;
  height: calc(100vh - 32px);
  min-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.match-feed-panel h2 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #facc15;
  text-align: left;
}

.match-feed {
  flex: 1;
  margin-top: 10px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.match-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 9px;
  font-size: 12px;
  animation: matchReveal .35s ease forwards;
}

.match-score {
  color: #facc15;
  font-weight: 900;
  margin-bottom: 5px;
}

.match-scorers {
  color: #cbd5e1;
  line-height: 1.5;
}

.season-event {
  background: #111827;
  border-left: 4px solid #facc15;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

.season-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  display: none;
  padding-top: 90px !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000001 !important;
  padding: 84px 12px 24px !important;
  overflow-y: auto !important;
}

.season-modal.show {
  display: flex !important;
}

.season-modal-card {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 18px;
  color: white;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  height: auto !important;
  overflow: visible !important;
  margin-top: 0 !important;
  width: min(760px, 96vw) !important;
  max-height: calc(100vh - 120px) !important;
  overflow-y: auto !important;
  position: relative !important;
  margin: 0 auto !important;
}

.match-card.win {
  border: 2px solid #22c55e !important;
}

.match-card.loss {
  border: 2px solid #ef4444 !important;
}

.match-card.draw {
  border: 2px solid #ffffff !important;
}

.season-modal-close {
  position: sticky !important;
  top: 0 !important;
  margin-left: auto !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  z-index: 10 !important;
}

/* =====================================================
   09 Collection
   ===================================================== */

#fc-collection {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.collection-header {
  margin-bottom: 24px;
}

.collection-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.collection-filters {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.collection-filter {
  padding: 8px 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #020617;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.collection-filter.active, .collection-filter:hover {
  background: #2563eb;
}

.collection-search {
  padding: 8px 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #020617;
  color: white;
  font-weight: 700;
}

.collection-grid .card-flag-bg {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  inset: -18%;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  transform: rotate(-26deg) scale(1.15);
}

.collection-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
  font-size: 13px;
  font-weight: 800;
}


.collection-quick-sell-dropdown {
  max-width: 520px;
  margin: 0 auto 22px;
}

.collection-quick-sell-dropdown ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.collection-quick-sell-dropdown li {
  font-size: 13px;
}

.collection-grid .sell-confirm {
  width: 100% !important;
  max-width: none !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 0 0 10px 10px !important;
}

.collection-grid .sell-section {
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  padding: 10px 0 0 0 !important;
  box-sizing: border-box !important;
  right: 0 !important;
  max-width: 100% !important;
}

.collection-grid .sell-controls {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 8px 0 !important;
  padding: 0 10px !important;
}

.collection-grid .sell-section .sell-confirm {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.collection-grid .sell-section button.sell-confirm {
  inline-size: 100% !important;
}

.collection-login-required {
  grid-column: 1 / -1;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.collection-login-required h2 {
  color: #facc15;
  margin-bottom: 8px;
}

.collection-login-required p {
  color: #cbd5e1;
  margin-bottom: 14px;
}

/* =====================================================
   10 Pack Store / Pack Animation
   ===================================================== */

.pack-animation-pack {
  position: absolute;
  width: 250px;
  height: 370px;
  border-radius: 38px;
  padding: 24px;
  text-align: center;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 40px rgba(255,255,255,.16), 0 0 90px rgba(250,204,21,.45);
  animation: packEnter 1s ease forwards, packShake .7s ease 1.15s forwards, packBurst .75s ease 2.1s forwards;
}

.pack-animation-pack::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,.35);
  pointer-events: none;
  z-index: 2;
}

.pack-animation-pack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 12%, rgba(255,255,255,.45), transparent 22%), linear-gradient(135deg, transparent 45%, rgba(255,255,255,.18) 46%, transparent 52%);
  pointer-events: none;
  z-index: 1;
}

.pack-animation-pack.gold {
  background: linear-gradient(145deg, #fff2a8 0%, #facc15 35%, #8a5a08 100%);
}

.pack-animation-pack.legend {
  background: linear-gradient(145deg, #f5f3ff 0%, #a855f7 35%, #2e1065 100%);
}

.pack-animation-pack .pack-animation-inner-border {
  position: absolute;
  inset: 18px;
  border-radius: 32px;
  background: radial-gradient(circle at 35% 15%, rgba(255,255,255,.16), transparent 28%), linear-gradient(145deg, #161616, #050505);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), inset 0 0 35px rgba(0,0,0,.8);
  z-index: 0;
}

.pack-animation-inner-border::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 38px;
  width: 92px;
  height: 250px;
  border-radius: 80px 0 0 80px;
  border-left: 8px solid rgba(250,204,21,.9);
  box-shadow: 0 0 20px rgba(250,204,21,.45);
}

.pack-opening {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pack-loader {
  padding: 28px 40px;
  border-radius: 14px;
  background: #020617;
  border: 2px solid #f59e0b;
  color: #f59e0b;
  font-weight: 900;
  font-size: 22px;
  animation: packPulse 0.9s infinite alternate;
}

.pack-reveal {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  animation: cardReveal 0.45s ease-out;
  position: relative;
}

#fc-pack-store {
  width: 100% !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 110px 18px 40px !important;
  color: white !important;
}

#fc-pack-store .store-header {
  margin-bottom: 30px;
  text-align: center;
}

#fc-pack-store .pack-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 18px !important;
}

#fc-pack-store .pack-card {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  border-radius: 16px !important;
  padding: 20px !important;
  text-align: center !important;
}

#fc-pack-store .open-pack-btn, #claimRewardButton {
  border: 0 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  background: #eab308 !important;
  color: #111827 !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

#packResult {
  max-width: 280px !important;
  margin: 28px auto 0 !important;
}

#fc-pack-store .store-header h1 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 1000;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #facc15;
  text-shadow: 0 0 24px rgba(250, 204, 21, 0.35);
}

.pack-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 34px !important;
  align-items: stretch !important;
}

.fc-pack-card {
  position: relative;
  background: linear-gradient(180deg, #0f172a, #020617);
  border: 1px solid #334155;
  border-radius: 24px;
  padding: 22px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.fc-pack-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 55%);
  opacity: .75;
  pointer-events: none;
}

.pack-art {
  position: relative;
  width: 210px;
  height: 310px;
  clip-path: polygon( 12% 0, 88% 0, 100% 18%, 100% 84%, 82% 100%, 18% 100%, 0 84%, 0 18% );
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  overflow: hidden;
  z-index: 2;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 16px 40px rgba(0,0,0,.45);
}

.pack-art::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255,255,255,.35);
  clip-path: polygon( 12% 0, 88% 0, 100% 18%, 100% 84%, 82% 100%, 18% 100%, 0 84%, 0 18% );
  pointer-events: none;
}

.fc-pack-gold .pack-art {
  background: radial-gradient(circle at 50% 22%, #fff7cc, transparent 28%), linear-gradient(145deg, #fff4b8 0%, #facc15 36%, #b7791f 70%, #78350f 100%);
}

.fc-pack-legend .pack-art {
  background: radial-gradient(circle at 50% 22%, #faf5ff, transparent 28%), linear-gradient(145deg, #ede9fe 0%, #a855f7 35%, #6d28d9 70%, #2e1065 100%);
}

.pack-top, .pack-rating, .pack-title, .pack-bottom, .pack-lines {
  position: relative;
  z-index: 2;
}

.pack-top {
  position: absolute;
  top: 22px;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1.5px;
}

.pack-rating {
  font-size: 46px;
  font-weight: 1000;
  line-height: 1;
  margin-bottom: 8px;
}

.pack-title {
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.pack-bottom {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1px;
}

.pack-lines {
  width: 120px;
  height: 70px;
  margin: 16px 0;
  background: linear-gradient(90deg, transparent 0 10%, rgba(255,255,255,.55) 10% 14%, transparent 14% 26%, rgba(255,255,255,.45) 26% 30%, transparent 30% 42%, rgba(255,255,255,.6) 42% 46%, transparent 46% 58%, rgba(255,255,255,.45) 58% 62%, transparent 62% 74%, rgba(255,255,255,.55) 74% 78%, transparent 78%);
  opacity: .8;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.pack-info {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.pack-info h2 {
  font-size: 24px;
  font-weight: 1000;
  margin-bottom: 8px;
}

.pack-info p {
  color: #cbd5e1;
  font-size: 13px;
  min-height: 38px;
  margin-bottom: 14px;
}

.pack-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 1000;
  margin-bottom: 14px;
  color: #facc15;
}

.open-pack-btn {
  width: 100% !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  font-size: 15px !important;
  font-weight: 1000 !important;
  cursor: pointer !important;
  background: linear-gradient(180deg, #facc15, #ca8a04) !important;
  color: #111827 !important;
  box-shadow: 0 10px 25px rgba(250,204,21,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}

.open-pack-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(250,204,21,.38);
}

.fc-pack-card:hover .pack-art {
  transform: translateY(-8px) scale(1.03);
  transition: .25s ease;
}

.pack-animation-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: radial-gradient(circle at center, rgba(250,204,21,.20), transparent 32%), linear-gradient(180deg, rgba(15,23,42,.98), rgba(2,6,23,.98)) !important;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}

.pack-animation-overlay.show {
  display: flex !important;
}

.pack-animation-stage {
  position: relative;
  width: min(560px, 100%);
  min-height: 660px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pack-animation-top, .pack-animation-rating, .pack-animation-title, .pack-animation-lines, .pack-animation-bottom {
  position: relative;
  z-index: 2;
}

.pack-animation-top {
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.pack-animation-rating {
  margin-top: 55px;
  font-size: 56px;
  font-weight: 1000;
  line-height: 1;
}

.pack-animation-title {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.pack-animation-lines {
  width: 145px;
  height: 46px;
  margin: 8px auto;
  background: linear-gradient(90deg, transparent 0 10%, rgba(255,255,255,.65) 10% 14%, transparent 14% 26%, rgba(255,255,255,.5) 26% 30%, transparent 30% 42%, rgba(255,255,255,.7) 42% 46%, transparent 46% 58%, rgba(255,255,255,.5) 58% 62%, transparent 62% 74%, rgba(255,255,255,.65) 74% 78%, transparent 78%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.pack-animation-bottom {
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1px;
}

.pack-light {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  box-shadow: 0 0 70px white, 0 0 180px #facc15, 0 0 320px #facc15;
  animation: packFlash 1s ease 2.1s forwards;
}

.pack-walkout-text {
  position: absolute;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  font-size: 30px;
  font-weight: 1000;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(24px);
  animation: walkoutTextReveal .9s ease 2.75s forwards;
}

.pack-final-card {
  position: absolute;
  bottom: 96px;
  opacity: 0;
  transform: translateY(70px) scale(.78);
  animation: finalCardReveal .9s cubic-bezier(.2,.9,.2,1.2) 3.55s forwards;
}

.pack-animation-close {
  position: absolute;
  bottom: 22px;
  width: min(280px, 90%);
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(180deg, #facc15, #ca8a04);
  color: #111827;
  font-weight: 1000;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: closeButtonReveal .5s ease 4.25s forwards;
}

.pack-animation-overlay:not(.show) {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.pack-animation-inner-border {
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 20px;
  clip-path: polygon( 10% 0, 90% 0, 100% 10%, 100% 90%, 88% 100%, 12% 100%, 0 90%, 0 10% );
  pointer-events: none;
}

.pack-animation-top, .pack-animation-rating, .pack-animation-title, .pack-animation-lines, .pack-animation-bottom, .pack-animation-badge {
  position: relative;
  z-index: 2;
}

.pack-animation-badge {
  width: 74px;
  height: 74px;
  margin: 14px auto 4px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.5);
  display: grid;
  place-items: center;
  background: rgba(2,6,23,.22);
  box-shadow: inset 0 0 18px rgba(255,255,255,.18);
}

.pack-animation-badge span {
  font-size: 34px;
  font-weight: 1000;
}

.legend-walkout .pack-light {
  box-shadow: 0 0 70px white, 0 0 190px #a855f7, 0 0 340px #6d28d9;
}

.icon-walkout .pack-light {
  box-shadow: 0 0 90px white, 0 0 220px white, 0 0 390px #facc15;
}

.pack-light-beam {
  position: absolute;
  bottom: 80px;
  width: 70px;
  height: 430px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.28), transparent);
  opacity: 0;
  filter: blur(6px);
  animation: beamReveal 1.6s ease 2.25s forwards;
}

.pack-light-left {
  transform: rotate(-22deg);
  left: 70px;
}

.pack-light-right {
  transform: rotate(22deg);
  right: 70px;
}

.pack-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pack-particles span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #facc15;
  opacity: 0;
  animation: particlePop 1.2s ease 2.35s forwards;
}

.legend-walkout .pack-particles span {
  background: #a855f7;
}

.icon-walkout .pack-particles span {
  background: #ffffff;
}

.pack-particles span:nth-child(1) {
  left: 12%;
  top: 38%;
}

.pack-particles span:nth-child(2) {
  left: 22%;
  top: 20%;
}

.pack-particles span:nth-child(3) {
  left: 34%;
  top: 62%;
}

.pack-particles span:nth-child(4) {
  left: 48%;
  top: 14%;
}

.pack-particles span:nth-child(5) {
  left: 58%;
  top: 70%;
}

.pack-particles span:nth-child(6) {
  left: 68%;
  top: 28%;
}

.pack-particles span:nth-child(7) {
  left: 82%;
  top: 42%;
}

.pack-particles span:nth-child(8) {
  left: 75%;
  top: 76%;
}

.pack-particles span:nth-child(9) {
  left: 16%;
  top: 74%;
}

.pack-particles span:nth-child(10) {
  left: 88%;
  top: 18%;
}

#fc-pack-store .pack-art {
  position: relative;
  width: 230px;
  height: 340px;
  border-radius: 38px;
  clip-path: none !important;
  padding: 24px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 40px rgba(255,255,255,.14), 0 18px 45px rgba(0,0,0,.55);
}

#fc-pack-store .pack-art::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 30px;
  background: radial-gradient(circle at 35% 15%, rgba(255,255,255,.16), transparent 28%), linear-gradient(145deg, #161616, #050505);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), inset 0 0 35px rgba(0,0,0,.85);
  z-index: 0;
}

#fc-pack-store .fc-pack-gold .pack-art {
  background: linear-gradient(145deg, #fff2a8 0%, #facc15 34%, #8a5a08 100%);
}

#fc-pack-store .fc-pack-legend .pack-art {
  background: linear-gradient(145deg, #f5f3ff 0%, #a855f7 34%, #2e1065 100%);
}

#fc-pack-store .pack-top, #fc-pack-store .pack-rating, #fc-pack-store .pack-title, #fc-pack-store .pack-lines, #fc-pack-store .pack-bottom {
  position: relative;
  z-index: 3;
}

#fc-pack-store .pack-top {
  top: 16px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(0,0,0,.6);
}

#fc-pack-store .pack-rating {
  margin-top: 72px;
  font-size: 52px;
  font-weight: 1000;
  color: #facc15;
  text-shadow: 0 0 16px rgba(250,204,21,.35);
}

#fc-pack-store .fc-pack-legend .pack-rating {
  color: #d8b4fe;
  text-shadow: 0 0 18px rgba(168,85,247,.55);
}

#fc-pack-store .pack-title {
  font-size: 30px;
  font-weight: 1000;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(0,0,0,.65);
}

#fc-pack-store .pack-lines {
  width: 110px;
  height: 54px;
  margin: 18px auto 0;
  opacity: .8;
}

#fc-pack-store .pack-bottom {
  bottom: 20px;
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(0,0,0,.75);
}

#fc-pack-store .pack-art .pack-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin: 14px auto 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  background: radial-gradient(circle, rgba(250,204,21,.45), transparent 60%), rgba(2,6,23,.55);
  box-shadow: inset 0 0 12px rgba(255,255,255,.2), 0 0 16px rgba(250,204,21,.25);
}

#fc-pack-store .fc-pack-legend .pack-art .pack-title::after {
  background: radial-gradient(circle, rgba(168,85,247,.5), transparent 60%), rgba(2,6,23,.55);
  box-shadow: inset 0 0 12px rgba(255,255,255,.2), 0 0 18px rgba(168,85,247,.45);
}

#fc-pack-store .fc-pack-hero .pack-art {
  background: linear-gradient(145deg, #dcfce7 0%, #22c55e 34%, #14532d 100%) !important;
}

#fc-pack-store .fc-pack-hero .pack-rating {
  color: #bbf7d0 !important;
  text-shadow: 0 0 18px rgba(34,197,94,.55) !important;
}

#fc-pack-store .fc-pack-hero .pack-title::after {
  background: radial-gradient(circle, rgba(34,197,94,.55), transparent 60%), rgba(2,6,23,.55) !important;
  box-shadow: inset 0 0 12px rgba(255,255,255,.2), 0 0 18px rgba(34,197,94,.45) !important;
}

#fc-pack-store .fc-pack-icon .pack-art {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 35%, #cbd5e1 70%, #64748b 100%) !important;
}

#fc-pack-store .fc-pack-icon .pack-rating {
  color: #111827 !important;
  text-shadow: 0 0 18px rgba(255,255,255,.75) !important;
}

#fc-pack-store .fc-pack-icon .pack-title {
  color: #111827 !important;
}

#fc-pack-store .fc-pack-icon .pack-top, #fc-pack-store .fc-pack-icon .pack-bottom {
  color: #111827 !important;
}

#fc-pack-store .fc-pack-icon .pack-title::after {
  background: radial-gradient(circle, rgba(255,255,255,.8), transparent 60%), rgba(15,23,42,.25) !important;
  box-shadow: inset 0 0 12px rgba(255,255,255,.6), 0 0 22px rgba(255,255,255,.75) !important;
}

.pack-animation-pack.icon {
  background: radial-gradient(circle at 50% 16%, #ffffff, transparent 28%), linear-gradient(145deg, #ffffff 0%, #f8fafc 35%, #cbd5e1 70%, #64748b 100%) !important;
  color: #111827 !important;
}

.icon-pack-animation {
  background: radial-gradient(circle at center, rgba(255,255,255,.24), transparent 32%), linear-gradient(180deg, rgba(15,23,42,.98), rgba(2,6,23,.98)) !important;
}

.fc-pack-bronze .pack-art {
  background: linear-gradient( 145deg, #f3c38b 0%, #b87333 40%, #5c2e12 100% ) !important;
}

.fc-pack-silver .pack-art {
  background: linear-gradient( 145deg, #ffffff 0%, #cbd5e1 45%, #64748b 100% ) !important;
}

/* =====================================================
   11 Auth Modals
   ===================================================== */

.fc-auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.86);
  z-index: 1000000;
  padding: 16px;
}

.fc-auth-modal.show {
  display: flex;
}

.fc-auth-card {
  width: min(420px, 100%);
  background: #020617;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 18px;
  position: relative;
  color: #ffffff;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

.fc-auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.fc-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding-right: 42px;
}

.fc-auth-tab {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px;
  background: #111827;
  color: #cbd5e1;
  font-weight: 900;
  cursor: pointer;
}

.fc-auth-tab.active {
  background: #facc15;
  color: #111827;
}

.fc-auth-form {
  display: none;
}

.fc-auth-form.active {
  display: grid;
  gap: 10px;
}

.fc-auth-form h2 {
  margin: 0 0 4px;
  color: #facc15;
  font-size: 20px;
}

.fc-auth-form input {
  width: 100%;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
}

.fc-auth-form input::placeholder {
  color: #94a3b8;
}

.fc-auth-form button[type="submit"] {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: #22c55e;
  color: #052e16;
  font-weight: 1000;
  cursor: pointer;
}

/* =====================================================
   12 Profile / Achievements / Daily Challenge
   ===================================================== */

.daily-challenge {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.daily-challenge h3 {
  margin: 0 0 10px;
}

#claimRewardButton {
  width: 100%;
  margin-top: 12px;
}

#claimRewardButton:disabled, #claimRewardButton[disabled] {
  background: #334155 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
}

.challenge-progress-bar {
  width: 100%;
  height: 8px;
  margin: 8px 0 4px;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 999px;
  overflow: hidden;
}

.challenge-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #facc15);
  border-radius: 999px;
  transition: width .35s ease;
}

.info-dropdown {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  text-align: left;
}

.info-dropdown summary {
  padding: 12px;
  cursor: pointer;
  font-weight: 900;
  color: #facc15;
  list-style: none;
}

.info-dropdown summary::-webkit-details-marker {
  display: none;
}

.info-dropdown summary::after {
  content: "+";
  float: right;
  transition: .2s;
}

.info-dropdown[open] summary::after {
  content: "−";
}

.info-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
}

.info-dropdown li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
  color: #e5e7eb;
}

.info-dropdown li:last-child {
  border-bottom: none;
}

.info-dropdown strong {
  color: #22c55e;
  white-space: nowrap;
}

#fc-profile-page {
  width: 100%;
  min-height: calc(100vh - 70px);
  padding: 90px 24px 24px;
  background: #07111f;
}

.profile-card {
  max-width: 1100px;
  margin: 0 auto;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 24px;
  color: #ffffff;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-header h1, .profile-card h1 {
  color: #facc15;
  font-size: 28px;
  margin-bottom: 4px;
}

.profile-muted {
  color: #94a3b8;
  margin-bottom: 18px;
}

.profile-coin-pill {
  background: #111827;
  border: 1px solid #facc15;
  color: #facc15;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.profile-stat {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 16px;
}

.profile-stat span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.profile-stat strong {
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.profile-actions a, #fc-profile-page .register-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #facc15;
  color: #111827;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.profile-level-card {
  background: #101a2b;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}

.profile-level-head {
  font-size: 24px;
  font-weight: 700;
}

.profile-xp-text,.profile-xp-next {
  margin-top: 8px;
}

.profile-xp-bar {
  height: 16px;
  background: #222;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.profile-xp-bar span {
  display: block;
  height: 100%;
  background: #22c55e;
}

#fc-achievements-page {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 15px;
}

.achievement-card {
  background: #111827;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 20px;
}

.achievement-card h3 {
  margin: 0 0 10px;
}

.achievement-card p {
  margin: 0;
}

.achievement-reward {
  margin-top: 10px;
  font-weight: 700;
  color: #facc15;
}

.claim-achievement-btn {
  width: 100%;
  margin-top: 12px;
}

.achievement-claimed {
  margin-top: 12px;
  color: #22c55e;
  font-weight: 700;
}

/* =====================================================
   13 Buttons / Utilities
   ===================================================== */

.simulate-button {
  background: #22c55e;
  color: #052e16;
  margin: 8px 0;
}

.move-hint {
  color: #94a3b8;
  font-size: 12px;
  margin: 4px 0 8px;
}

.register-button {
  background: #2563eb;
  color: #ffffff;
}

/* =====================================================
   14 Animations
   ===================================================== */

@keyframes cardSlotReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(.94);
    filter: blur(3px);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes iconShine {
  0% { left: -60%; }
  100% { left: 140%; }
}

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

@keyframes packPulse {
  from {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
  }

  to {
    transform: scale(1.04);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.6);
  }
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: scale(0.8) rotateY(90deg);
  }

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

@keyframes packBurst {
  to {
    transform: scale(1.55);
    opacity: 0;
    filter: blur(10px);
  }
}

@keyframes goldReveal {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

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

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: scale(0.85) rotate(-2deg);
  }

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

@keyframes legendReveal {
  from {
    opacity: 0;
    transform: scale(0.8) rotateY(80deg);
  }

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

@keyframes iconWalkout {
  0% {
    opacity: 0;
    transform: scale(0.65) translateY(30px);
    filter: brightness(2);
  }

  55% {
    opacity: 1;
    transform: scale(1.08) translateY(-8px);
    filter: brightness(1.4);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

@keyframes packShine {
  0% {
    transform: translateX(-120%) rotate(18deg);
  }

  55% {
    transform: translateX(120%) rotate(18deg);
  }

  100% {
    transform: translateX(120%) rotate(18deg);
  }
}

@keyframes packCardShine {
  0% {
    left: -80%;
  }

  45% {
    left: 140%;
  }

  100% {
    left: 140%;
  }
}

@keyframes packEnter {
  from {
    transform: translateY(90px) scale(.62) rotateY(-35deg);
    opacity: 0;
  }

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

@keyframes packShake {
  0%, 100% { transform: translateX(0) scale(1); }
  18% { transform: translateX(-12px) rotate(-2deg) scale(1.03); }
  36% { transform: translateX(12px) rotate(2deg) scale(1.05); }
  54% { transform: translateX(-9px) rotate(-1deg) scale(1.07); }
  72% { transform: translateX(9px) rotate(1deg) scale(1.08); }
}

@keyframes packOpenShine {
  from { left: -80%; }
  to { left: 150%; }
}

@keyframes packFlash {
  0% {
    opacity: 0;
    transform: scale(.2);
  }

  35% {
    opacity: 1;
    transform: scale(20);
  }

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

@keyframes walkoutTextReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes closeButtonReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes beamReveal {
  0% { opacity: 0; transform: translateY(50px) scaleY(.7); }
  100% { opacity: .8; }
}

@keyframes particlePop {
  0% {
    opacity: 0;
    transform: translateY(0) scale(.4);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-130px) scale(1.5);
  }
}

@keyframes retryPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37,99,235,.45);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(37,99,235,0);
  }
}

/* =====================================================
   15 Mobile / Responsive
   ===================================================== */

@media (max-width: 1300px) {

  

  .app {
    grid-template-columns: 380px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .right-panel {
    grid-template-columns: minmax(620px, 1fr) 300px;
  }

}

@media (max-width: 1099px) {

  

  body {
    overflow: auto;
  }

  

  #fc-draft-game {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  

  .app {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    padding: 10px;
    gap: 10px;
  }

  .left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  

  .match-feed-panel {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .match-feed {
    max-height: none;
    overflow: visible;
  }

  

  .pitch {
    height: auto;
    min-height: 360px;
  }

  

  #fc-draft-game .right-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  

  #fc-draft-game .match-feed-panel {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

}

@media (max-width: 768px) {

  

  html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  

  .hero {
    text-align: center;
  }

  .hero h1 {
    font-size: 20px;
  }

  .hero p {
    font-size: 12px;
  }

  .machine, .result-panel, .player-panel, .squad-panel, .ratings-panel, .chemistry-links-panel, .simulation-results, .match-feed-panel {
    width: 100%;
    padding: 10px;
  }

  .screen {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .player-panel {
    overflow: visible;
    max-height: none;
  }

  

  .player-options {
    grid-template-columns: 1fr !important;
  }

  

  .player-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 95px;
    padding: 8px;
  }

  .card-avatar {
    display: none;
  }

  

  .pitch {
    padding: 8px;
    min-height: 520px !important;
    gap: 6px !important;
  }

  .position {
    font-size: 9px;
    width: clamp(58px, 18vw, 78px) !important;
    min-height: clamp(58px, 20vw, 82px) !important;
    padding: 4px !important;
  }

  .row {
    gap: 4px !important;
  }

  

  .ratings-grid, .sim-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  

  .position-picker {
    grid-template-columns: repeat(2, 1fr);
  }

  .mini-card-rating {
    font-size: 13px !important;
    text-align: left !important;
  }

  .mini-card-avatar {
    font-size: 16px !important;
    margin: 2px 0 !important;
  }

  .mini-card-name {
    font-size: 7px !important;
    line-height: 1 !important;
  }

  .mini-card-club, .mini-card-rarity {
    font-size: 6px !important;
    line-height: 1 !important;
  }

  

  .position.filled {
    justify-content: flex-start !important;
    align-items: stretch !important;
  }

  

  .mini-card-header {
    margin-bottom: 2px !important;
  }

  .mini-card-position {
    display: block !important;
    font-size: 9px !important;
    text-align: right !important;
  }

  

  .game-top-bar, #fc-draft-game .game-top-bar {
    min-height: 58px !important;
    padding: 10px 12px !important;
  }

  

  body.admin-bar .game-top-bar, body.admin-bar #fc-draft-game .game-top-bar {
    top: 46px !important;
  }

  

  #fc-draft-game, #fc-collection, #fc-pack-store {
    padding-top: 74px !important;
  }

  

  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    background: #020617 !important;
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
  }

  .game-left, #fc-draft-game .game-left {
    position: fixed !important;
    top: 58px !important;
    left: 0 !important;
    width: 260px !important;
    max-width: 82vw !important;
    padding: 18px !important;
    display: none !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    background: #020617 !important;
    border-right: 1px solid #1e293b !important;
    border-bottom: 1px solid #1e293b !important;
    box-shadow: 0 18px 35px rgba(0,0,0,.35) !important;
  }

  

  body.admin-bar .game-left, body.admin-bar #fc-draft-game .game-left {
    top: 104px !important;
  }

  

  .game-top-bar.menu-open .game-left, #fc-draft-game .game-top-bar.menu-open .game-left {
    display: flex !important;
  }

  .game-nav, #fc-draft-game .game-nav {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .game-nav a, #fc-draft-game .game-nav a {
    width: 100% !important;
    padding: 12px !important;
    background: #0f172a !important;
  }

  .game-title, #fc-draft-game .game-title {
    font-size: 20px !important;
  }

  .game-top-right, #fc-draft-game .game-top-right {
    gap: 8px !important;
  }

  .coin-display, .user-display, #fc-draft-game .coin-display, #fc-draft-game .user-display {
    font-size: 12px !important;
    padding: 7px 9px !important;
  }

  

  .move-hint {
    font-size: 11px;
    line-height: 1.35;
  }

  .position.move-selected, .position.move-valid {
    outline-width: 2px !important;
  }

  

  .pack-final-card {
    width: 230px !important;
    max-width: 230px !important;
    bottom: 82px !important;
  }

  

  .pack-final-card .player-card {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
    height: 320px !important;
    min-height: 320px !important;
    display: block !important;
    padding: 18px !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .pack-final-card .card-rating {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    font-size: 34px !important;
    line-height: 1 !important;
  }

  .pack-final-card .card-position {
    position: absolute !important;
    top: 54px !important;
    left: 20px !important;
    font-size: 13px !important;
  }

  .pack-final-card .card-rarity {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    font-size: 10px !important;
    padding: 5px 9px !important;
  }

  .pack-final-card .card-avatar {
    display: block !important;
    margin-top: 100px !important;
    font-size: 48px !important;
    line-height: 1 !important;
  }

  .pack-final-card .card-name {
    margin-top: 20px !important;
    font-size: 18px !important;
    line-height: 1.05 !important;
    word-break: normal !important;
  }

  .pack-final-card .card-bottom {
    margin-top: 8px !important;
    font-size: 13px !important;
  }

  .pack-final-card .card-club {
    margin-top: 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  

  .collection-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  

  .collection-grid .player-card {
    width: 100% !important;
    height: 280px !important;
    min-height: 280px !important;
    padding-bottom: 95px !important;
  }

  .collection-grid .card-avatar {
    font-size: 34px !important;
  }

  .collection-grid .card-name {
    font-size: 11px !important;
  }

  .collection-grid .card-club {
    font-size: 10px !important;
  }

  

  .user-display {
    gap: 6px !important;
  }

  .fc-auth-open, .logout-button {
    padding: 6px 8px;
    font-size: 11px;
  }

  

  #fc-profile-page {
    padding-top: 80px;
  }

  

  .game-top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    margin: 0 !important;
  }

  

  body {
    padding-top: 64px !important;
  }

}

@media (max-width: 420px) {

  

  .app {
    padding: 8px;
  }

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

  

  .position {
    width: 58px;
    min-height: 36px;
  }

  .pitch {
    min-height: 310px;
  }

}

@media (max-width: 900px) {

  

  .player-options {
    grid-template-columns: 1fr !important;
  }

}

@media (max-width: 700px) {

  

  #fc-pack-store {
    padding: 95px 12px 30px !important;
  }

  .fc-pack-card {
    min-height: 480px;
    padding: 18px;
  }

  .pack-art {
    width: 185px;
    height: 280px;
  }

  .pack-rating {
    font-size: 40px;
  }

  .pack-title {
    font-size: 24px;
  }

  

  #fc-profile-page {
    padding: 12px;
  }

  .profile-card {
    padding: 16px;
  }

  .profile-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 600px) {

  

  .pack-animation-stage {
    min-height: 580px;
  }

  .pack-animation-rating {
    margin-top: 46px;
    font-size: 44px;
  }

  .pack-animation-title {
    font-size: 27px;
  }

  .pack-walkout-text {
    top: 88px;
    font-size: 23px;
  }

  .pack-final-card {
    bottom: 88px;
  }

  

  .pack-final-card .player-card {
    width: 198px;
    min-height: 280px;
  }

  

  .pack-animation-badge {
    width: 60px;
    height: 60px;
  }

  .pack-animation-badge span {
    font-size: 28px;
  }

}

@media (min-width: 1100px) {

  

  #fc-draft-game .right-panel, .right-panel {
    display: grid !important;
    grid-template-columns: minmax(700px, 1fr) 340px !important;
    gap: 14px !important;
    align-items: stretch !important;
  }

  

  #fc-draft-game .squad-panel, .squad-panel {
    grid-column: 1 !important;
  }

  

  #fc-draft-game .match-feed-panel, .match-feed-panel {
    grid-column: 2 !important;
    position: sticky !important;
    top: 84px !important;
    height: calc(100vh - 100px) !important;
    min-height: 520px !important;
    overflow: hidden !important;
  }

  

  #fc-draft-game .right-panel {
    align-items: start !important;
    display: grid !important;
    grid-template-columns: minmax(700px, 1fr) 340px !important;
    gap: 14px !important;
  }

  

  #fc-draft-game .match-feed-panel {
    align-self: start !important;
    margin-top: 0 !important;
    position: sticky !important;
    top: 84px !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    height: calc(100vh - 100px) !important;
  }

  

  #fc-draft-game .squad-panel {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }

}

/* =====================================================
   16 Other
   ===================================================== */

.label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.trophy-row {
  margin: 14px 0;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

.trophy {
  background: #111827;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid #334155;
}

.trophy strong {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.trophy.won {
  border-color: #facc15;
  box-shadow: 0 0 14px rgba(250,204,21,.35);
}

.modal-title {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal-subtitle {
  text-align: center;
  color: #facc15;
  font-weight: 900;
  margin-bottom: 12px;
}

.sell-value {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.sell-minus, .sell-plus {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.sell-amount {
  min-width: 24px;
  text-align: center;
  font-weight: 900;
}

.sell-confirm {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  background: #201e1e;
  color: white;
}

html, body, #fc-blank-page, .fc-blank-content {
  max-width: 100%;
  overflow-x: hidden;
}

.legend-gold {
  color: #facc15;
}

.legend-hero {
  color: #a855f7;
}

.legend-legend {
  color: #38bdf8;
}

.legend-icon {
  color: #f97316;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
}

.walkout-rarity.gold {
  color: #facc15;
}

.walkout-rarity.legend {
  color: #a855f7;
}

.walkout-rarity.icon {
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255,255,255,.9);
}

.walkout-nation, .walkout-position {
  color: white;
  text-shadow: 0 0 18px rgba(255,255,255,.35);
}

.league-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.league-table-wrap h3 {
  color: #facc15;
  margin-bottom: 8px;
  font-size: 16px;
}

.league-table {
  width: 100%;
  border-collapse: collapse;
  background: #020617;
  border-radius: 10px;
  overflow: hidden;
  font-size: 11px;
}

.league-table th, .league-table td {
  padding: 7px 6px;
  border-bottom: 1px solid #1e293b;
  text-align: center;
}

.league-table th:nth-child(2), .league-table td:nth-child(2) {
  text-align: left;
}

.league-table th {
  color: #facc15;
  background: #111827;
}

.draft-team-row {
  background: rgba(250, 204, 21, .16);
  color: #facc15;
  font-weight: 900;
}

.season-rewards {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  text-align: left;
}

.season-rewards h3 {
  color: #facc15;
  margin-bottom: 8px;
  font-size: 15px;
}

.season-rewards p {
  margin: 5px 0;
  color: #e5e7eb;
  font-size: 12px;
}

.season-rewards strong {
  display: block;
  margin-top: 10px;
  color: #22c55e;
}

.season-reward-info {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  text-align: left;
}

.season-reward-info h2 {
  color: #facc15;
  font-size: 15px;
  margin-bottom: 8px;
  text-align: center;
}

.season-reward-info ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.season-reward-info li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
  color: #e5e7eb;
}

.season-reward-info li:last-child {
  border-bottom: none !important;
}

.season-reward-info strong {
  color: #22c55e;
  white-space: nowrap;
}

.season-reward-info, .season-rewards {
  background: #020617 !important;
  border: 1px solid #334155 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  margin-top: 12px !important;
  text-align: left !important;
}

.season-reward-info h2, .season-rewards h3 {
  color: #facc15 !important;
  font-size: 15px !important;
  margin-bottom: 8px !important;
  text-align: center !important;
}

.season-reward-info li, .season-rewards p {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 6px 0 !important;
  border-bottom: 1px solid #1e293b !important;
  font-size: 12px !important;
  color: #e5e7eb !important;
}

.season-reward-info strong, .season-rewards strong {
  color: #22c55e !important;
  white-space: nowrap !important;
}

.fc-auth-message {
  min-height: 18px;
  font-size: 12px;
  color: #facc15;
  font-weight: 800;
}

.fc-auth-notice {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 900;
  text-align: center;
}

.fc-auth-notice.success {
  background: #052e16;
  border: 1px solid #22c55e;
  color: #bbf7d0;
}

.fc-auth-notice.error {
  background: #450a0a;
  border: 1px solid #ef4444;
  color: #fecaca;
}

.fc-auth-server-note {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  margin: -4px 0 2px;
}

.fc-forgot-password-link, .fc-back-to-login {
  border: 0;
  background: transparent;
  color: #facc15;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  padding: 4px;
}

.fc-forgot-password-link:hover, .fc-back-to-login:hover {
  color: #ffffff;
}

/* =====================================================
   15 Mobile Polish
   ===================================================== */

@media (max-width: 768px) {
  body {
    padding-top: 0 !important;
  }

  #fc-draft-game,
  #fc-collection,
  #fc-pack-store,
  #fc-profile-page,
  #fc-achievements-page {
    padding-top: 82px !important;
  }

  #fc-collection,
  #fc-pack-store,
  #fc-profile-page,
  #fc-achievements-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .game-top-right,
  #fc-draft-game .game-top-right {
    min-width: 0 !important;
  }

  .coin-display,
  .user-display,
  #fc-draft-game .coin-display,
  #fc-draft-game .user-display {
    white-space: nowrap !important;
  }

  .fc-user-name {
    max-width: 92px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }

  .collection-header h1,
  #fc-pack-store .store-header h1,
  #fc-achievements-page h1,
  .profile-header h1,
  .profile-card h1 {
    font-size: clamp(24px, 8vw, 34px) !important;
    line-height: 1.1 !important;
  }

  .collection-filters {
    gap: 8px !important;
  }

  .collection-filter,
  .collection-search {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: 0 !important;
  }

  .collection-search {
    width: 100% !important;
  }

  .pack-grid,
  #fc-pack-store .pack-grid,
  .achievement-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .fc-pack-card {
    min-height: auto !important;
  }

  .pack-info,
  .profile-card,
  .achievement-card {
    width: 100% !important;
  }

  .profile-actions a,
  #fc-profile-page .register-button,
  .claim-achievement-btn,
  .open-pack-btn {
    width: 100% !important;
  }

  .match-feed-panel {
    max-height: none !important;
  }
}

@media (max-width: 430px) {
  .game-top-bar,
  #fc-draft-game .game-top-bar {
    padding: 9px 10px !important;
  }

  .coin-display,
  .user-display,
  #fc-draft-game .coin-display,
  #fc-draft-game .user-display {
    font-size: 11px !important;
    padding: 6px 7px !important;
  }

  .fc-user-name {
    max-width: 68px !important;
  }

  .collection-grid {
    grid-template-columns: 1fr !important;
  }

  .collection-grid .player-card {
    max-width: 260px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ratings-grid,
  .sim-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}


/* =====================================================
   Pack Store V2 / Collection Tools
   ===================================================== */
.pack-stats-panel {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
  text-align: center;
}

.pack-stats-panel h2 {
  color: #facc15;
  margin-bottom: 12px;
  font-size: 20px;
}

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

.pack-stats-grid div {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px;
}

.pack-stats-grid span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 5px;
}

.pack-stats-grid strong {
  color: #ffffff;
  font-size: 18px;
}

.pack-history-dropdown ul {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
}

.pack-history-dropdown li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #020617;
  border-radius: 8px;
  padding: 8px 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.pack-odds {
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, .75);
  border: 1px solid rgba(255,255,255,.12);
  color: #facc15;
  font-size: 12px;
  font-weight: 900;
}

.collection-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0 18px;
}

.collection-tools label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.collection-sort,
.duplicates-only-toggle,
.bulk-sell-btn {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
  background: #020617;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.duplicates-only-toggle.active {
  background: #facc15;
  color: #111827;
  border-color: #facc15;
}

.bulk-sell-btn {
  background: #7f1d1d;
  border-color: #dc2626;
}

.bulk-sell-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.walkout-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 1px;
}

.walkout-status.new {
  background: #22c55e;
  color: #052e16;
}

.walkout-status.duplicate {
  background: #f97316;
  color: #111827;
}

.bronze-walkout .pack-animation-stage,
.silver-walkout .pack-animation-stage,
.gold-walkout .pack-animation-stage,
.hero-walkout .pack-animation-stage,
.legend-walkout .pack-animation-stage,
.icon-walkout .pack-animation-stage {
  animation-duration: 3.4s;
}

.bronze-walkout .pack-light,
.bronze-walkout .pack-light-beam {
  opacity: .25;
}

.silver-walkout .pack-light {
  box-shadow: 0 0 80px rgba(226,232,240,.75);
}

.gold-walkout .pack-light {
  box-shadow: 0 0 110px rgba(250,204,21,.8);
}

.hero-walkout .pack-light {
  box-shadow: 0 0 130px rgba(34,197,94,.85);
}

.legend-walkout .pack-light {
  box-shadow: 0 0 150px rgba(168,85,247,.9);
}

.icon-walkout .pack-light {
  box-shadow: 0 0 190px rgba(255,255,255,.95);
}

.hero-walkout .pack-animation-overlay,
.legend-walkout .pack-animation-overlay,
.icon-walkout .pack-animation-overlay {
  animation: packScreenShake .9s ease 2s both;
}

@keyframes packScreenShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 768px) {
  .pack-stats-grid {
    grid-template-columns: 1fr;
  }

  .collection-tools {
    align-items: stretch;
  }

  .collection-sort,
  .duplicates-only-toggle,
  .bulk-sell-btn {
    width: 100%;
  }
}


/* Pack Store: remove moving swoosh/half-circle shine */
#fc-pack-store .pack-art::after,
#fc-pack-store .fc-pack-card::after,
#fc-pack-store .fc-pack-gold .pack-art::after,
#fc-pack-store .fc-pack-hero .pack-art::after,
#fc-pack-store .fc-pack-legend .pack-art::after,
#fc-pack-store .fc-pack-icon .pack-art::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
