/* === SideGames Golf — Dark Golf-Green Theme === */

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Skip to content link for keyboard users */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--primary); color: var(--bg); padding: 8px 16px; z-index: 10000; font-weight: 700; }
.skip-link:focus { top: 0; }

:root {
  --bg: #0a0f0a;
  --bg-elevated: #141f14;
  --bg-card: #1c2e1c;
  --bg-input: #243624;
  --bg-hover: #2a402a;
  --primary: #4ade80;
  --primary-dim: #22c55e;
  --gold: #fbbf24;
  --red: #f87171;
  --team1: #60a5fa;
  --team2: #c084fc;
  --text: #e8f0e8;
  --text-muted: #8aaa8a;
  --border: #345034;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.2);
  --max-w: 480px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'SF Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body { padding-bottom: env(safe-area-inset-bottom, 0); }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#app.scorecard-active {
  max-width: 960px;
}

/* === Typography === */
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1rem; font-weight: 700; }

/* === Header === */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(52, 80, 52, .5);
  position: sticky;
  top: 0;
  background: rgba(10, 15, 10, .85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  width: 100vw;
  left: 0;
  margin-left: calc(-50vw + 50%);
  padding-left: max(12px, calc(50vw - var(--max-w) / 2));
  padding-right: max(12px, calc(50vw - var(--max-w) / 2));
}

.header-title { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.room-code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--gold);
  background: rgba(251, 191, 36, .1);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.1em;
  border: 1px solid rgba(251, 191, 36, .2);
}

.connection-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-left: 8px;
}
.connection-dot.offline { background: var(--red); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  min-width: 56px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  -webkit-user-select: none;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 4px 24px rgba(74,222,128,.25);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(74,222,128,.35); }
.btn-primary:active { background: var(--primary-dim); box-shadow: none; }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); background: var(--bg-hover); }
.btn-secondary:active { background: var(--bg-hover); }

.btn-gold {
  background: var(--gold);
  color: var(--bg);
}
.btn-gold:hover { box-shadow: 0 4px 24px rgba(251,191,36,.25); }

.btn-full { width: 100%; }

.btn-sm { padding: 10px 20px; font-size: .875rem; min-height: auto; }

.btn-icon {
  padding: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.5rem;
}

/* === Inputs === */
input, select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}

input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,222,128,.15); }
button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[role="button"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[role="option"]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
td[role="button"]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Accessibility: respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

input::placeholder { color: var(--text-muted); }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* === Cards === */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
}

/* === Page layout === */
.page {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* === Player Card === */
.player-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease;
}
.player-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.player-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
}

.player-name { font-weight: 600; flex: 1; }

.player-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
}
.player-amount.positive { color: var(--primary); }
.player-amount.negative { color: var(--red); }
.player-amount.zero { color: var(--text-muted); }

/* === Score Input (Stepper) === */
.score-stepper {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.score-stepper .btn-icon {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}
.score-stepper .btn-icon:active {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.score-display {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--mono);
  min-width: 72px;
  text-align: center;
}

/* === Hole Navigator === */
.hole-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hole-nav::-webkit-scrollbar { display: none; }

.hole-dot {
  min-width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
  background: transparent;
  color: var(--text-muted);
}
.hole-dot.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(74, 222, 128, .1);
}
.hole-dot.scored {
  border-color: var(--primary-dim);
  color: var(--text);
  background: rgba(74, 222, 128, .15);
}

/* === Settle-Up === */
.settle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.settle-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gold);
}

.settle-links { display: flex; gap: 8px; }

.pay-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.pay-btn:active { transform: scale(.96); }
.pay-btn:hover { border-color: var(--primary); background: var(--bg-hover); }

.pay-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.pay-btn-cash {
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-family: var(--font);
}

/* === Leaderboard table === */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  text-align: left;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.lb-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

/* === Tabs === */
.tabs {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 280px;
}
.tab {
  flex: 1;
  padding: 14px 32px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: none;
}

/* === Offline Banner === */
.offline-banner {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* === Utility === */
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.mt-auto { margin-top: auto; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; align-items: center; }
.flex-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--border); }

/* === Scorecard Grid === */
.sc-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
}
.sc-wrapper::-webkit-scrollbar { height: 12px; }
.sc-wrapper::-webkit-scrollbar-track { background: var(--bg-input); border-radius: 6px; }
.sc-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 6px; min-width: 40px; }
.sc-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.sc-wrapper { scrollbar-width: auto; scrollbar-color: rgba(255,255,255,.2) var(--bg-input); }

.sc-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 1rem;
}

.sc-th {
  padding: 6px 2px;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  min-width: 28px;
  width: 28px;
}

.sc-td {
  padding: 6px 2px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid rgba(255,255,255,.05);
  cursor: pointer;
  min-width: 28px;
  width: 28px;
  transition: background .1s;
  position: relative;
  font-size: 1rem;
  color: var(--text);
}
.sc-td:hover { background: rgba(255,255,255,.05); }
.sc-td:last-child { border-right: none; }

.sc-sticky {
  position: sticky;
  left: 0;
  z-index: 10;
  background: var(--bg-elevated);
  border-right: 2px solid var(--border) !important;
  min-width: 64px;
  width: 64px;
  max-width: 64px;
  text-align: left;
  padding-left: 6px;
}

.sc-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: .85rem;
}

.sc-player-cell {
  cursor: default;
}
.sc-player-cell:hover { background: var(--bg-elevated); }

.sc-player-name {
  font-weight: 700;
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56px;
  color: var(--text);
}

.sc-par-row { background: rgba(74,222,128,.05); }
.sc-par-cell { color: var(--text-muted); font-weight: 600; font-size: .95rem; }
.sc-total { font-weight: 700; color: var(--text); min-width: 32px; }
.sc-total-cell { font-weight: 700; background: rgba(255,255,255,.03); border-right: 2px solid var(--border) !important; min-width: 32px; }
.sc-grand-total { color: var(--text); }

.sc-active {
  background: rgba(74, 222, 128, .2) !important;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.sc-empty { color: var(--text-muted); opacity: .6; }

.sc-stroke-dot {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: .75rem;
  color: #b8860b;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  text-shadow: none;
}

/* Score decorations (golf standard) */
.sc-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}
.sc-ace {
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--text);
  background: rgba(251, 191, 36, .25);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .4);
}
.sc-albatross {
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, .3);
}
.sc-eagle {
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, .3);
}
.sc-birdie {
  border-radius: 50%;
  border: 2px solid var(--primary);
  color: var(--text);
}
.sc-par { color: var(--text); }
.sc-bogey {
  border: 2px solid var(--red);
  border-radius: 3px;
  color: var(--text);
}
.sc-dbl {
  border: 2px solid var(--red);
  border-radius: 3px;
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, .3);
}
.sc-triple {
  border: 2px solid var(--red);
  border-radius: 3px;
  color: var(--text);
  background: rgba(248, 113, 113, .15);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, .3);
}

/* Score picker */
.sc-picker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.sc-pick-btn {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  width: 52px !important;
  height: 52px !important;
  font-size: 1.6rem !important;
}
.sc-pick-btn:active {
  background: var(--primary) !important;
  color: var(--bg) !important;
}

.sc-quick-row {
  display: flex;
  gap: 5px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.sc-quick-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .1s;
}
.sc-quick-btn:active,
.sc-quick-active {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

/* === Animations === */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
.pulse { animation: pulse 2s infinite; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.slide-up { animation: slideUp .3s ease; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn .35s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { opacity: 0; transform: translateY(20px); animation: fadeInUp .5s ease forwards; }

/* === Leaderboard row hover === */
.lb-table tbody tr { transition: background .15s; }
.lb-table tbody tr:hover { background: rgba(74,222,128,.04); }

/* === Pay button pill refinement === */
.pay-btn {
  border-radius: 20px;
  transition: all .2s ease;
}
.pay-btn:hover { transform: translateY(-1px); border-color: var(--primary); background: var(--bg-hover); }

/* === Resume Flag Animation === */
.resume-flag {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
  animation: flagSway 3s ease-in-out infinite;
  transform-origin: bottom center;
  transition: filter .15s;
}
.resume-flag:hover { filter: brightness(1.2); }
.resume-flag:active { transform: scale(.9); }

@keyframes flagSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.flag-tap {
  animation: flagWiggle .5s ease;
}
@keyframes flagWiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-15deg) scale(1.1); }
  40% { transform: rotate(12deg) scale(1.1); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

/* === Staggered Animations === */
.stagger-list > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp .5s ease forwards;
}
.stagger-list > *:nth-child(1) { animation-delay: .05s; }
.stagger-list > *:nth-child(2) { animation-delay: .1s; }
.stagger-list > *:nth-child(3) { animation-delay: .15s; }
.stagger-list > *:nth-child(4) { animation-delay: .2s; }
.stagger-list > *:nth-child(5) { animation-delay: .25s; }
.stagger-list > *:nth-child(6) { animation-delay: .3s; }
.stagger-list > *:nth-child(7) { animation-delay: .35s; }
.stagger-list > *:nth-child(8) { animation-delay: .4s; }
.stagger-list > *:nth-child(n+9) { animation-delay: .45s; }

/* Hide elements on mobile */
.sc-hide-mobile { display: inline-flex; }

/* === Mobile: scale up scorecard, scale down status panels === */
@media (max-width: 600px) {
  .sc-hide-mobile { display: none !important; }

  .sc-table { font-size: 1rem; }
  .sc-th { padding: 6px 3px; font-size: .75rem; min-width: 30px; width: 30px; }
  .sc-td { padding: 8px 3px; font-size: 1rem; min-width: 30px; width: 30px; }
  .sc-score { width: 26px; height: 26px; font-size: 1rem; }
  .sc-par-cell { font-size: .95rem; }
  .sc-sticky { min-width: 60px; width: 60px; max-width: 60px; padding-left: 4px; background: var(--bg-elevated); }
  .sc-player-name { font-size: .75rem; max-width: 52px; }
  .sc-label { font-size: .8rem; }
  .sc-total { min-width: 32px; }
  .sc-total-cell { min-width: 32px; }
  .sc-stroke-dot { font-size: .7rem; }

  .match-status-card { padding: 6px 8px !important; font-size: .85rem; }

  .kp-card { padding: 4px 6px !important; }
  .kp-card select { min-height: 28px !important; padding: 2px 4px !important; font-size: .65rem !important; min-width: 80px !important; }

  /* Toolbar wrapping */
  .flex-row.gap-sm { flex-wrap: wrap; gap: 4px !important; }
}

/* === Chat Drawer === */
.chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  animation: fadeIn .2s ease;
}

.chat-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55vh;
  background: rgba(10, 15, 10, .95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  animation: chatSlideUp .25s ease;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.chat-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
  cursor: pointer;
}

.chat-handle-bar {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--text-muted);
  opacity: .5;
}

@keyframes chatSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* === Trophy System === */

.trophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
}

.trophy-glow {
  width: 67px;
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--tier-glow, transparent));
  animation: tierShimmer 3s ease-in-out infinite;
}
.trophy-glow img {
  border-radius: 8px;
}

.trophy-progress {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.trophy-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

.level-up-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--tier-color, var(--gold));
  border-radius: var(--radius);
  box-shadow: 0 0 32px var(--tier-glow, rgba(255,215,0,.3)), var(--shadow);
  z-index: 300;
  color: var(--text);
  opacity: 1;
  transition: opacity .4s ease, transform .4s ease;
  animation: toastSlideUp .35s ease-out;
}

@keyframes tierShimmer {
  0%, 100% { filter: drop-shadow(0 0 6px var(--tier-glow, transparent)); }
  50% { filter: drop-shadow(0 0 14px var(--tier-glow, transparent)); }
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
