/**
 * HeyTC Super Bowl Simulator v2.0
 * Dark Bento Grid "Wrapped" Style
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

.heytc-sim-wrapper {
  /* Dark Theme Colors */
  --heytc-bg-page: #0a0a0b;
  --heytc-bg-card: #141416;
  --heytc-bg-card-hover: #1a1a1e;
  --heytc-bg-card-alt: #1c1c20;

  /* Text Colors - WCAG AA compliant (5:1+ contrast on dark bg) */
  --heytc-text-primary: #ffffff;
  --heytc-text-secondary: #b4b4bc;
  --heytc-text-muted: #8a8a9e;

  /* Accent Colors */
  --heytc-gold: #fbbf24;
  --heytc-gold-bright: #fcd34d;
  --heytc-gold-dim: #d97706;

  --heytc-purple: #a855f7;
  --heytc-purple-bright: #c084fc;

  --heytc-blue: #3b82f6;
  --heytc-blue-bright: #60a5fa;

  --heytc-green: #22c55e;
  --heytc-red: #ef4444;

  /* Gradients */
  --heytc-gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 30%, #7c3aed 60%, #c026d3 80%, #f59e0b 100%);
  --heytc-gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
  --heytc-gradient-fire: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);

  /* Borders & Shadows */
  --heytc-border: rgba(255, 255, 255, 0.06);
  --heytc-border-light: rgba(255, 255, 255, 0.1);
  --heytc-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --heytc-shadow-glow: 0 0 60px rgba(251, 191, 36, 0.15);

  /* Typography */
  --heytc-font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --heytc-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --heytc-gap: 16px;
  --heytc-radius: 20px;
  --heytc-radius-sm: 12px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

.heytc-sim-wrapper {
  font-family: var(--heytc-font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--heytc-text-primary);
  background: var(--heytc-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  scroll-margin-top: 60px; /* Account for sticky header when scrolling */
}

.heytc-sim-wrapper *,
.heytc-sim-wrapper *::before,
.heytc-sim-wrapper *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   Page Container
   ========================================================================== */

.heytc-sim-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 24px;
}

/* ==========================================================================
   Header - Compact with Team Selection
   ========================================================================== */

.heytc-sim-header {
  text-align: center;
  margin-bottom: 40px;
}

.heytc-sim-header--compact {
  margin-bottom: 32px;
}

.heytc-sim-header-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  position: relative;
}

/* Share Button in Header */
.heytc-sim-share-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border: 1px solid var(--heytc-gold);
  border-radius: 20px;
  color: var(--heytc-gold);
  font-family: var(--heytc-font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  visibility: hidden;
}

.heytc-sim-share-btn.heytc-sim-visible {
  opacity: 1;
  visibility: visible;
}

/* Attention-grabbing pulse animation after simulation */
.heytc-sim-share-btn.heytc-sim-share-btn--attention {
  animation: heytc-share-pulse 2s ease-in-out 3;
}

@keyframes heytc-share-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    transform: translateY(-50%) scale(1);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(212, 175, 55, 0.5);
    transform: translateY(-50%) scale(1.05);
  }
}

.heytc-sim-share-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.15));
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  transform: translateY(-50%) scale(1.05);
}

.heytc-sim-share-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.heytc-sim-share-btn-text {
  white-space: nowrap;
}

/* Loading spinner */
.heytc-sim-btn-loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--heytc-text-muted);
  border-top-color: var(--heytc-gold);
  border-radius: 50%;
  animation: heytc-spin 0.8s linear infinite;
}

@keyframes heytc-spin {
  to { transform: rotate(360deg); }
}

.heytc-sim-share-btn--loading {
  pointer-events: none;
}

.heytc-sim-share-btn--success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.1));
  border-color: var(--heytc-green);
  color: var(--heytc-green);
  animation: none;
}

.heytc-sim-share-btn--success:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.15));
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.heytc-sim-share-btn--error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
  border-color: var(--heytc-red);
  color: var(--heytc-red);
  animation: none;
}

.heytc-sim-share-btn--error:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.15));
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.heytc-sim-title {
  font-family: var(--heytc-font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 25%, #ffffff 50%, #a855f7 75%, #7c3aed 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heytc-title-shimmer 15s ease-in-out infinite;
}

@keyframes heytc-title-shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.heytc-sim-subtitle {
  font-size: 1.1rem;
  color: var(--heytc-text-secondary);
  margin: 0 0 24px;
}

/* Hero Controls */
.heytc-sim-hero-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.heytc-sim-hero-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* Controls Row - Inside Bento Grid (3-column layout) */
.heytc-sim-controls-row {
  grid-column: span 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px 32px;
  background: var(--heytc-bg-card);
  border: 1px solid var(--heytc-border);
  border-radius: var(--heytc-radius);
}

.heytc-sim-controls-row .heytc-sim-select {
  justify-self: start;
}

.heytc-sim-controls-row .heytc-sim-btn {
  font-size: 1.2rem;
  padding: 18px 40px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #10b981;
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.heytc-sim-controls-row .heytc-sim-btn:hover {
  background: #34d399;
  box-shadow: 0 6px 28px rgba(16, 185, 129, 0.5);
}

.heytc-sim-controls-row .heytc-sim-geo-suggestion {
  justify-self: end;
  text-align: right;
}

.heytc-sim-controls-row .heytc-sim-hero-form {
  display: contents;
}

@media (max-width: 900px) {
  .heytc-sim-controls-row {
    grid-column: span 2;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    padding: 20px 24px;
  }

  .heytc-sim-controls-row .heytc-sim-select,
  .heytc-sim-controls-row .heytc-sim-geo-suggestion {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .heytc-sim-controls-row {
    grid-column: span 1;
  }

  .heytc-sim-controls-row .heytc-sim-select,
  .heytc-sim-controls-row .heytc-sim-btn {
    width: 100%;
  }
}

.heytc-sim-geo-suggestion {
  font-size: 1rem;
  color: var(--heytc-text-muted);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.heytc-sim-geo-main,
.heytc-sim-geo-team-link {
  /* Reset button styles */
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: inherit;
}

.heytc-sim-geo-main {
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--heytc-text-primary);
}

.heytc-sim-geo-main:hover,
.heytc-sim-geo-main:focus {
  color: var(--heytc-text-secondary);
}

.heytc-sim-geo-team-link {
  color: var(--heytc-gold);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s;
}

.heytc-sim-geo-team-link:hover,
.heytc-sim-geo-team-link:focus {
  color: var(--heytc-gold-bright);
}

/* Select Dropdown */
.heytc-sim-select {
  font-family: var(--heytc-font-body);
  font-size: 1rem;
  padding: 14px 48px 14px 20px;
  background: var(--heytc-bg-card);
  color: var(--heytc-text-primary);
  border: 1px solid var(--heytc-border-light);
  border-radius: var(--heytc-radius-sm);
  cursor: pointer;
  min-width: 240px;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.heytc-sim-select:hover {
  border-color: var(--heytc-gold);
}

.heytc-sim-select:focus {
  outline: none;
  border-color: var(--heytc-gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.heytc-sim-select option {
  background: var(--heytc-bg-card);
  color: var(--heytc-text-primary);
}

/* Primary Button */
.heytc-sim-btn {
  font-family: var(--heytc-font-display);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  background: var(--heytc-gold);
  color: #000;
  border: none;
  border-radius: var(--heytc-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.heytc-sim-btn:hover {
  background: var(--heytc-gold-bright);
  transform: translateY(-1px);
}

.heytc-sim-btn:active {
  transform: translateY(0);
}

.heytc-sim-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.heytc-sim-btn--secondary {
  background: var(--heytc-bg-card);
  color: var(--heytc-text-primary);
  border: 1px solid var(--heytc-border-light);
}

.heytc-sim-btn--secondary:hover {
  background: var(--heytc-bg-card-hover);
  border-color: var(--heytc-text-muted);
}

/* ==========================================================================
   Bento Grid Layout
   ========================================================================== */

.heytc-sim-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--heytc-gap);
}

/* Card Base */
.heytc-sim-card {
  background: var(--heytc-bg-card);
  border: 1px solid var(--heytc-border);
  border-radius: var(--heytc-radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Hero Card - Your Team Result
   ========================================================================== */

.heytc-sim-card--hero {
  grid-column: span 2;
  grid-row: span 2;
  padding: 0;
  border: none;
  background: var(--heytc-gradient-hero);
  background-size: 200% 200%;
  animation: heytc-gradient-shift 8s ease infinite;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

@keyframes heytc-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.heytc-sim-card--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(168, 85, 247, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245, 158, 11, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.heytc-sim-hero-content {
  position: relative;
  z-index: 1;
  padding: 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.heytc-sim-hero-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--heytc-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.heytc-sim-hero-team {
  font-family: var(--heytc-font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.heytc-sim-hero-year {
  font-family: var(--heytc-font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: #fff;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

/* Animated reveal for hero year */
.heytc-sim-hero-year--reveal {
  animation: heytc-year-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heytc-year-reveal {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(30px);
    filter: blur(10px);
  }
  50% {
    opacity: 1;
    filter: blur(0);
  }
  70% {
    transform: scale(1.08) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.heytc-sim-hero-commentary {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 400px;
}

/* No Win State */
.heytc-sim-card--hero.heytc-sim-card--no-win {
  background: linear-gradient(135deg, #1f1315 0%, #450a0a 50%, #7f1d1d 100%);
}

.heytc-sim-card--hero.heytc-sim-card--no-win .heytc-sim-hero-label {
  color: var(--heytc-red);
}

.heytc-sim-card--hero.heytc-sim-card--no-win .heytc-sim-hero-year {
  font-size: clamp(2rem, 6vw, 3rem);
}

/* ==========================================================================
   Stat Cards
   ========================================================================== */

.heytc-sim-card--stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

/* Champion card with team color styling */
.heytc-sim-card--champion {
  border-left: 4px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.heytc-sim-stat-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--heytc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.heytc-sim-stat-value {
  font-family: var(--heytc-font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--heytc-gold);
  line-height: 1;
  letter-spacing: -0.02em;
}

.heytc-sim-stat-sub {
  font-size: 1rem;
  color: var(--heytc-text-secondary);
  margin-top: 4px;
}

/* Stat with comparison badge */
.heytc-sim-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heytc-green);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
}

.heytc-sim-stat-badge--negative {
  color: var(--heytc-red);
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   First to Win Card - Gradient Accent
   ========================================================================== */

.heytc-sim-card--first {
  background: var(--heytc-gradient-gold);
  border: none;
  color: #000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.heytc-sim-card--first .heytc-sim-stat-label {
  color: rgba(0, 0, 0, 0.6);
}

.heytc-sim-card--first .heytc-sim-stat-value {
  color: #000;
}

.heytc-sim-card--first .heytc-sim-stat-sub {
  color: rgba(0, 0, 0, 0.7);
}

/* Champion card with team color background */
.heytc-sim-card--first.heytc-sim-card--champion {
  --champion-text: #ffffff;
  --champion-muted: rgba(255, 255, 255, 0.7);
}

.heytc-sim-card--first.heytc-sim-card--champion .heytc-sim-stat-label {
  color: var(--champion-muted);
}

.heytc-sim-card--first.heytc-sim-card--champion .heytc-sim-stat-value {
  color: var(--champion-text);
}

.heytc-sim-card--first.heytc-sim-card--champion .heytc-sim-stat-sub {
  color: var(--champion-muted);
}

/* ==========================================================================
   Dynasty Card with Progress Bars
   ========================================================================== */

.heytc-sim-card--dynasty {
  grid-column: span 2;
}

.heytc-sim-dynasty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.heytc-sim-dynasty-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heytc-blue-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Emoji moved to HTML with aria-hidden for accessibility */
.heytc-sim-dynasty-title span[aria-hidden] {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

.heytc-sim-dynasty-subtitle {
  font-size: 0.9rem;
  color: var(--heytc-text-muted);
  font-style: italic;
}

.heytc-sim-dynasty-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Button reset for native button element */
.heytc-sim-dynasty-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  margin: 0 -12px;
  border-radius: var(--heytc-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  /* Button reset */
  background: transparent;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  width: calc(100% + 24px);
}

.heytc-sim-dynasty-item:hover {
  background: var(--heytc-bg-card-hover);
}

.heytc-sim-dynasty-info {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.heytc-sim-dynasty-team {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heytc-text-primary);
}

.heytc-sim-dynasty-years {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heytc-text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.heytc-sim-dynasty-bar {
  flex: 1;
  height: 10px;
  background: var(--heytc-bg-card-alt);
  border-radius: 5px;
  overflow: hidden;
}

.heytc-sim-dynasty-bar-fill {
  height: 100%;
  background: var(--heytc-blue);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.heytc-sim-dynasty-item:first-child .heytc-sim-dynasty-bar-fill {
  background: linear-gradient(90deg, var(--heytc-gold) 0%, var(--heytc-gold-bright) 100%);
}

.heytc-sim-dynasty-item--selected {
  background: rgba(251, 191, 36, 0.1);
}

.heytc-sim-dynasty-item--selected:hover {
  background: rgba(251, 191, 36, 0.15);
}

.heytc-sim-dynasty-item--selected .heytc-sim-dynasty-team {
  color: var(--heytc-gold);
}

.heytc-sim-dynasty-item--selected .heytc-sim-dynasty-years {
  color: var(--heytc-gold-dim);
}

.heytc-sim-dynasty-item--selected .heytc-sim-dynasty-bar-fill {
  background: linear-gradient(90deg, var(--heytc-gold) 0%, var(--heytc-gold-bright) 100%);
}

.heytc-sim-dynasty-wins {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heytc-text-secondary);
  min-width: 40px;
  text-align: right;
}

/* ==========================================================================
   Timeline Card - All Teams
   ========================================================================== */

.heytc-sim-card--timeline {
  grid-column: span 2;
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

.heytc-sim-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--heytc-border);
}

.heytc-sim-timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heytc-text-primary);
}

.heytc-sim-timeline-scroll {
  flex: 1;
  overflow-y: auto;
  margin: 0 -24px;
  padding: 0 24px;
}

.heytc-sim-timeline-scroll::-webkit-scrollbar {
  width: 6px;
}

.heytc-sim-timeline-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.heytc-sim-timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--heytc-border-light);
  border-radius: 3px;
}

.heytc-sim-timeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heytc-sim-timeline-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--heytc-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.heytc-sim-timeline-row:hover {
  background: var(--heytc-bg-card-hover);
}

.heytc-sim-timeline-row--highlighted {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.heytc-sim-timeline-row--highlighted:hover {
  background: rgba(251, 191, 36, 0.15);
}

.heytc-sim-timeline-row--no-win {
  opacity: 0.4;
}

.heytc-sim-timeline-row--no-win:hover {
  opacity: 0.6;
}

.heytc-sim-timeline-year {
  font-family: var(--heytc-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heytc-gold);
}

.heytc-sim-timeline-year-count {
  font-weight: 500;
  color: var(--heytc-text-muted);
  margin-left: 4px;
}

.heytc-sim-timeline-row--no-win .heytc-sim-timeline-year {
  color: var(--heytc-red);
  font-size: 1rem;
}

.heytc-sim-timeline-team-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heytc-sim-timeline-team {
  font-size: 1rem;
  font-weight: 500;
  color: var(--heytc-text-primary);
}

.heytc-sim-timeline-record {
  font-size: 1rem;
  color: var(--heytc-text-muted);
}

.heytc-sim-timeline-burn {
  font-size: 0.875rem;
  color: var(--heytc-purple);
  font-style: italic;
  margin-top: 2px;
}

.heytc-sim-timeline-expand-btn {
  width: 100%;
  padding: 12px 16px;
  margin-top: 8px;
  background: var(--heytc-bg-card-hover);
  border: 1px solid var(--heytc-border-light);
  border-radius: var(--heytc-radius-sm);
  color: var(--heytc-text-secondary);
  font-family: var(--heytc-font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.heytc-sim-timeline-expand-btn:hover {
  background: var(--heytc-bg-card-alt);
  color: var(--heytc-text-primary);
}

/* ==========================================================================
   Longest Droughts - Cemetery with White Marble Headstones
   ========================================================================== */

.heytc-sim-card--graveyard {
  grid-column: span 4;
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(40, 50, 45, 0.6) 0%, transparent 70%),
    linear-gradient(180deg, #1a1d1c 0%, #121514 40%, #0d0f0e 100%);
  border: 1px solid rgba(100, 120, 110, 0.15);
  position: relative;
  padding: 32px;
  overflow: hidden;
}

/* Fog/mist overlay effect */
.heytc-sim-card--graveyard::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 20% 80%, rgba(60, 80, 70, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 80% 90%, rgba(50, 70, 60, 0.08) 0%, transparent 50%);
  pointer-events: none;
  animation: heytc-fog-drift 12s ease-in-out infinite alternate;
}

@keyframes heytc-fog-drift {
  0% { opacity: 0.5; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(10px); }
}

.heytc-sim-graveyard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.heytc-sim-graveyard-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heytc-font-body);
  font-size: 1.25rem;
  font-weight: 700;
  color: #a8b5ad;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Emoji moved to HTML with aria-hidden for accessibility */
.heytc-sim-graveyard-title span[aria-hidden] {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px rgba(168, 181, 173, 0.4));
}

.heytc-sim-graveyard-subtitle {
  font-family: var(--heytc-font-body);
  font-size: 1rem;
  color: #7a8b82;
  font-style: italic;
}

/* Tombstone Grid - 5 columns for 5 teams */
.heytc-sim-graveyard-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* Individual Tombstone - White Marble with Cracks (native button) */
.heytc-sim-tombstone {
  background:
    linear-gradient(180deg,
      #f5f5f4 0%,
      #e7e5e4 15%,
      #d6d3d1 50%,
      #c4c1bf 85%,
      #b8b5b3 100%);
  border: 2px solid #a8a29e;
  border-radius: 45px 45px 6px 6px;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -3px 6px rgba(0, 0, 0, 0.1);
  /* Button reset + explicit font */
  font: inherit;
  font-family: var(--heytc-font-body);
  color: inherit;
}

/* R.I.P. engraving - real element for html2canvas compatibility */
.heytc-sim-tombstone-rip {
  display: block;
  font-family: var(--heytc-font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: #78716c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

/* Crack overlay - SVG inline for crack effect */
.heytc-sim-tombstone::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 150'%3E%3Cpath d='M45 20 L42 35 L48 45 L40 60 L46 75 L38 95' stroke='%23a8a29e' stroke-width='0.8' fill='none' opacity='0.6'/%3E%3Cpath d='M60 25 L58 40 L64 55' stroke='%23a8a29e' stroke-width='0.6' fill='none' opacity='0.4'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  pointer-events: none;
  opacity: 0.5;
  border-radius: 45px 45px 6px 6px;
}

.heytc-sim-tombstone:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
  border-color: #78716c;
}

/* Rival tombstone - Pinkish tint */
.heytc-sim-tombstone--rival {
  background:
    linear-gradient(180deg,
      #fef2f2 0%,
      #fecaca 15%,
      #fca5a5 50%,
      #f87171 85%,
      #ef4444 100%);
  border-color: #dc2626;
}

/* Fire emoji moved to HTML span for accessibility */
.heytc-sim-tombstone-fire {
  position: absolute;
  top: -10px;
  right: -6px;
  font-size: 1.2rem;
  filter: drop-shadow(0 0 6px rgba(255, 100, 50, 0.8));
  animation: heytc-flame-flicker 0.8s ease-in-out infinite alternate;
}

@keyframes heytc-flame-flicker {
  0% { transform: scale(1) rotate(-5deg); }
  100% { transform: scale(1.1) rotate(5deg); }
}

/* Selected tombstone - Golden tint */
.heytc-sim-tombstone--selected {
  background:
    linear-gradient(180deg,
      #fefce8 0%,
      #fef3c7 15%,
      #fde68a 50%,
      #fcd34d 85%,
      #fbbf24 100%);
  border-color: #d97706;
}

.heytc-sim-tombstone-team {
  font-family: var(--heytc-font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #292524;
  margin-top: 2px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 1;
}

.heytc-sim-tombstone--rival .heytc-sim-tombstone-team {
  color: #7f1d1d;
}

.heytc-sim-tombstone--selected .heytc-sim-tombstone-team {
  color: #78350f;
}

.heytc-sim-tombstone-years {
  font-family: var(--heytc-font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #991b1b;
  line-height: 1;
  margin: 8px 0 4px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 1;
}

.heytc-sim-tombstone--selected .heytc-sim-tombstone-years {
  color: #92400e;
}

.heytc-sim-tombstone-label {
  font-family: var(--heytc-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.heytc-sim-tombstone-last {
  font-family: var(--heytc-font-body);
  font-size: 1rem;
  font-style: italic;
  color: #78716c;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .heytc-sim-card--graveyard {
    grid-column: span 2;
  }

  .heytc-sim-graveyard-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .heytc-sim-card--graveyard {
    grid-column: span 1;
    padding: 20px 16px;
  }

  .heytc-sim-graveyard-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .heytc-sim-graveyard-title {
    font-size: 1.1rem;
  }

  .heytc-sim-tombstone {
    padding: 16px 8px 12px;
    border-radius: 30px 30px 5px 5px;
  }

  .heytc-sim-tombstone-team {
    font-size: 1rem;
  }

  .heytc-sim-tombstone-years {
    font-size: 1.5rem;
  }

  .heytc-sim-tombstone-label {
    font-size: 0.8rem;
  }

  .heytc-sim-tombstone-last {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .heytc-sim-graveyard-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* ==========================================================================
   Current Odds Card - Vegas Aesthetic
   ========================================================================== */

.heytc-sim-card--odds {
  grid-column: span 2;
  background: linear-gradient(135deg, #0c1220 0%, #1a1f35 50%, #0f1525 100%);
  border: 1px solid rgba(251, 191, 36, 0.2);
  position: relative;
  overflow: hidden;
}

/* Subtle gold shimmer overlay */
.heytc-sim-card--odds::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(251, 191, 36, 0.03) 25%,
    transparent 50%,
    rgba(251, 191, 36, 0.03) 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: heytc-shimmer 8s linear infinite;
  pointer-events: none;
}

@keyframes heytc-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.heytc-sim-odds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.heytc-sim-odds-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heytc-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.heytc-sim-odds-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.heytc-sim-odds-date {
  font-size: 0.9rem;
  color: var(--heytc-text-muted);
  font-style: italic;
}

.heytc-sim-odds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

/* Native button for odds team */
.heytc-sim-odds-team {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  /* Button reset */
  font: inherit;
  color: inherit;
  text-align: center;
}

.heytc-sim-odds-team:hover {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
  border-color: rgba(251, 191, 36, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.heytc-sim-odds-team--favorite {
  border-color: var(--heytc-gold);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%);
}

/* Star emoji moved to HTML span for accessibility */
.heytc-sim-odds-star {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.2rem;
  color: var(--heytc-gold);
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8));
}

.heytc-sim-odds-team-abbr {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--heytc-text-primary);
  letter-spacing: 0.05em;
}

.heytc-sim-odds-team-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heytc-gold);
  font-variant-numeric: tabular-nums;
}

.heytc-sim-odds-team-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.heytc-sim-odds-team-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--heytc-gold) 0%, var(--heytc-gold-bright) 100%);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Super Bowl Matchup (2 teams) - special VS layout */
.heytc-sim-odds-grid[data-team-count="2"] {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.heytc-sim-odds-vs {
  font-family: var(--heytc-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--heytc-gold);
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
  padding: 0 8px;
}

.heytc-sim-odds-team--matchup {
  flex: 1;
  max-width: 180px;
  padding: 20px;
}

.heytc-sim-odds-team--matchup .heytc-sim-odds-team-abbr {
  font-size: 1.6rem;
}

.heytc-sim-odds-team--matchup .heytc-sim-odds-team-pct {
  font-size: 1.3rem;
}

/* Conference Championships (4 teams) */
.heytc-sim-odds-grid[data-team-count="4"] {
  grid-template-columns: repeat(2, 1fr);
  max-width: 500px;
  margin: 0 auto;
}

.heytc-sim-odds-grid[data-team-count="4"] .heytc-sim-odds-team {
  padding: 18px;
}

.heytc-sim-odds-grid[data-team-count="4"] .heytc-sim-odds-team-abbr {
  font-size: 1.4rem;
}

/* Divisional (8 teams) */
.heytc-sim-odds-grid[data-team-count="8"] {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 900px) {
  .heytc-sim-odds-grid[data-team-count="8"] {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .heytc-sim-card--odds {
    grid-column: span 1;
    padding: 20px 16px;
  }

  .heytc-sim-odds-title {
    font-size: 1.1rem;
  }

  .heytc-sim-odds-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .heytc-sim-odds-grid[data-team-count="2"] {
    flex-direction: row;
    gap: 12px;
  }

  .heytc-sim-odds-team--matchup {
    max-width: 140px;
    padding: 16px 12px;
  }

  .heytc-sim-odds-vs {
    font-size: 1.2rem;
  }

  .heytc-sim-odds-grid[data-team-count="4"],
  .heytc-sim-odds-grid[data-team-count="8"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .heytc-sim-odds-team {
    padding: 12px 10px;
  }

  .heytc-sim-odds-team-abbr {
    font-size: 1.1rem;
  }

  .heytc-sim-odds-team-pct {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .heytc-sim-odds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .heytc-sim-odds-grid[data-team-count="2"] {
    flex-direction: column;
    gap: 10px;
  }

  .heytc-sim-odds-team--matchup {
    max-width: 100%;
    width: 100%;
  }
}


/* ==========================================================================
   Year Ticker Overlay
   ========================================================================== */

.heytc-sim-ticker-overlay {
  position: fixed;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 15% !important;
  background: rgba(10, 10, 11, 0.98);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
  backdrop-filter: blur(20px);
}

.heytc-sim-ticker-overlay.heytc-sim-visible {
  opacity: 1;
  visibility: visible;
}

.heytc-sim-ticker-year {
  font-family: var(--heytc-font-display);
  font-size: clamp(6rem, 25vw, 12rem);
  font-weight: 800;
  color: var(--heytc-gold);
  line-height: 1;
  text-shadow: 0 0 80px rgba(251, 191, 36, 0.5);
  animation: heytc-pulse 0.5s ease-in-out infinite alternate;
}

.heytc-sim-ticker-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--heytc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 24px;
}

@keyframes heytc-pulse {
  from { text-shadow: 0 0 60px rgba(251, 191, 36, 0.4); }
  to { text-shadow: 0 0 100px rgba(251, 191, 36, 0.6); }
}

/* Ticker Win Flash */
.heytc-sim-ticker-year.heytc-sim-ticker-year--win {
  animation: heytc-win-flash 0.3s ease-out;
}

@keyframes heytc-win-flash {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.15);
    filter: brightness(1.5);
    text-shadow: 0 0 120px rgba(251, 191, 36, 0.9), 0 0 200px rgba(255, 255, 255, 0.5);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Trophy Counter */
.heytc-sim-ticker-counter {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%);
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.heytc-sim-ticker-counter-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
}

.heytc-sim-ticker-counter-num {
  font-family: var(--heytc-font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--heytc-gold);
  min-width: 50px;
  text-align: center;
}

.heytc-sim-ticker-counter.heytc-sim-ticker-counter--bump {
  animation: heytc-counter-bump 0.3s ease-out;
}

@keyframes heytc-counter-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Fireworks Container */
.heytc-sim-ticker-fireworks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Individual Firework Particle */
.heytc-sim-firework {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
}

.heytc-sim-firework--gold {
  background: radial-gradient(circle, #fcd34d 0%, #f59e0b 50%, transparent 70%);
  box-shadow: 0 0 6px 2px rgba(251, 191, 36, 0.8);
}

.heytc-sim-firework--white {
  background: radial-gradient(circle, #ffffff 0%, #fef3c7 50%, transparent 70%);
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.6);
}

.heytc-sim-firework--orange {
  background: radial-gradient(circle, #fb923c 0%, #ea580c 50%, transparent 70%);
  box-shadow: 0 0 6px 2px rgba(249, 115, 22, 0.8);
}

/* Firework Animation */
@keyframes heytc-firework-burst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--fw-x), var(--fw-y)) scale(0.3);
  }
}

.heytc-sim-firework.heytc-sim-firework--active {
  animation: heytc-firework-burst 0.6s ease-out forwards;
}

/* Reduced motion - disable decorative animations */
@media (prefers-reduced-motion: reduce) {
  .heytc-sim-title,
  .heytc-sim-card--hero,
  .heytc-sim-graveyard-header,
  .heytc-sim-tombstone-fire,
  .heytc-sim-odds-team-bar-fill,
  .heytc-sim-btn-loading,
  .heytc-sim-ticker-year.heytc-sim-ticker-year--win,
  .heytc-sim-ticker-counter.heytc-sim-ticker-counter--bump,
  .heytc-sim-firework.heytc-sim-firework--active {
    animation: none !important;
  }

  /* Reduce transition durations */
  .heytc-sim-dynasty-item,
  .heytc-sim-tombstone,
  .heytc-sim-odds-team,
  .heytc-sim-timeline-row {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet - 2 columns with full-width key cards */
@media (max-width: 900px) {
  .heytc-sim-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .heytc-sim-card--hero {
    grid-column: span 2;
  }

  .heytc-sim-card--dynasty,
  .heytc-sim-card--timeline,
  .heytc-sim-card--cursed {
    grid-column: span 2;
  }
}

/* Mobile - single column stack */
@media (max-width: 768px) {
  .heytc-sim-page {
    padding: 16px 12px 32px;
  }

  .heytc-sim-bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* All cards single column */
  .heytc-sim-card,
  .heytc-sim-card--hero,
  .heytc-sim-card--stat,
  .heytc-sim-card--dynasty,
  .heytc-sim-card--timeline,
  .heytc-sim-card--cursed,
  .heytc-sim-card--graveyard,
  .heytc-sim-card--odds,
  .heytc-sim-controls-row {
    grid-column: span 1 !important;
  }

  /* Mobile card reordering - Controls first */
  .heytc-sim-controls-row { order: 1; }
  .heytc-sim-card--hero { order: 2; }
  #heytcStatYears { order: 3; }
  #heytcStatTitles { order: 4; }
  .heytc-sim-card--first { order: 5; }
  #heytcStatRank { order: 6; }
  .heytc-sim-card--dynasty { order: 7; }
  .heytc-sim-card--odds { order: 8; }
  .heytc-sim-card--graveyard { order: 9; }

  /* Hero card adjustments */
  .heytc-sim-card--hero {
    min-height: 240px;
  }

  .heytc-sim-hero-content {
    padding: 24px 20px;
  }

  .heytc-sim-hero-year {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  /* Controls row - compact */
  .heytc-sim-controls-row {
    padding: 16px;
    gap: 12px;
  }

  .heytc-sim-controls-row .heytc-sim-btn {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .heytc-sim-geo-suggestion {
    align-items: center;
    text-align: center;
  }

  /* Dynasty card - prevent text truncation */
  .heytc-sim-card--dynasty {
    padding: 20px 16px;
  }

  .heytc-sim-dynasty-header {
    margin-bottom: 16px;
  }

  .heytc-sim-dynasty-title {
    font-size: 1.1rem;
  }

  .heytc-sim-dynasty-info {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .heytc-sim-dynasty-team {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .heytc-sim-dynasty-years {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .heytc-sim-dynasty-item {
    gap: 12px;
    padding: 6px 8px;
    margin: 0 -8px;
  }

  .heytc-sim-dynasty-bar {
    min-width: 60px;
    flex: 0 0 60px;
  }

  .heytc-sim-dynasty-wins {
    min-width: 32px;
    font-size: 1rem;
  }

  /* Stat cards - compact */
  .heytc-sim-card--stat {
    min-height: 100px;
    padding: 16px;
  }

  .heytc-sim-stat-value {
    font-size: 2.5rem;
  }

  /* Header adjustments */
  .heytc-sim-header {
    margin-bottom: 20px;
  }

  .heytc-sim-title {
    font-size: 1.3rem;
  }

  .heytc-sim-share-btn {
    padding: 0 12px;
    height: 36px;
    font-size: 0.8rem;
  }

  .heytc-sim-share-btn svg {
    width: 16px;
    height: 16px;
  }

  .heytc-sim-share-btn-text {
    display: none;
  }

  /* Form elements */
  .heytc-sim-hero-form {
    flex-direction: column;
    width: 100%;
  }

  .heytc-sim-select,
  .heytc-sim-btn {
    width: 100%;
  }

  .heytc-sim-footer {
    flex-direction: column;
    text-align: center;
  }

  .heytc-sim-footer-actions {
    width: 100%;
    flex-direction: column;
  }

  .heytc-sim-footer-actions .heytc-sim-btn {
    width: 100%;
  }
}

/* Small mobile - extra compact */
@media (max-width: 400px) {
  .heytc-sim-page {
    padding: 12px 8px 24px;
  }

  .heytc-sim-dynasty-bar {
    display: none;
  }

  .heytc-sim-dynasty-info {
    flex: 1;
  }

  .heytc-sim-tombstone {
    padding: 14px 8px 12px;
  }

  .heytc-sim-tombstone-team {
    font-size: 1rem;
  }

  .heytc-sim-tombstone-years {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.heytc-sim-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .heytc-sim-wrapper *,
  .heytc-sim-wrapper *::before,
  .heytc-sim-wrapper *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.heytc-sim-wrapper *:focus-visible {
  outline: 2px solid var(--heytc-gold);
  outline-offset: 2px;
}

/* ==========================================================================
   Initial/Empty States
   ========================================================================== */

.heytc-sim-empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--heytc-text-muted);
}

.heytc-sim-empty-state p {
  font-size: 1.1rem;
  margin: 0;
}

/* Bento grid always visible, but result cards hidden until simulation */
.heytc-sim-bento {
  display: grid;
}

/* Hide result cards initially */
.heytc-sim-card--hero,
.heytc-sim-card--stat,
.heytc-sim-card--dynasty,
.heytc-sim-card--odds,
.heytc-sim-card--graveyard {
  display: none;
}

/* Show result cards after simulation */
.heytc-sim-bento.heytc-sim-visible .heytc-sim-card--hero {
  display: flex;
}

.heytc-sim-bento.heytc-sim-visible .heytc-sim-card--stat {
  display: flex;
}

.heytc-sim-bento.heytc-sim-visible .heytc-sim-card--dynasty,
.heytc-sim-bento.heytc-sim-visible .heytc-sim-card--odds,
.heytc-sim-bento.heytc-sim-visible .heytc-sim-card--graveyard {
  display: block;
}


/* ==========================================================================
   Clipboard Modal
   ========================================================================== */

.heytc-sim-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.heytc-sim-modal-overlay.heytc-sim-visible {
  opacity: 1;
  visibility: visible;
}

.heytc-sim-modal {
  background: var(--heytc-bg-card);
  border: 1px solid var(--heytc-border-light);
  border-radius: var(--heytc-radius);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.heytc-sim-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heytc-text-primary);
  margin-bottom: 16px;
}

.heytc-sim-modal-text {
  width: 100%;
  padding: 16px;
  background: var(--heytc-bg-page);
  border: 1px solid var(--heytc-border-light);
  border-radius: var(--heytc-radius-sm);
  font-family: var(--heytc-font-body);
  font-size: 1rem;
  color: var(--heytc-text-primary);
  resize: none;
  margin-bottom: 16px;
}

.heytc-sim-modal-close {
  padding: 12px 24px;
}

/* ==========================================================================
   Widget Mode - Abridged Version for Homepage
   ========================================================================== */

/* Hide Dynasty, Odds, and Graveyard cards in widget mode */
/* Higher specificity to override .heytc-sim-bento.heytc-sim-visible rules */
/* Widget mode: Hide graveyard, show dynasty and odds with blur overlay */
.heytc-sim-widget .heytc-sim-bento .heytc-sim-card--graveyard,
.heytc-sim-widget .heytc-sim-bento.heytc-sim-visible .heytc-sim-card--graveyard {
  display: none !important;
}

/* Widget mode: Clip dynasty and odds cards */
.heytc-sim-widget .heytc-sim-card--dynasty,
.heytc-sim-widget .heytc-sim-card--odds {
  max-height: 185px;
  overflow: hidden;
  position: relative;
}

/* Blur overlay - hidden by default */
.heytc-sim-blur-overlay {
  display: none;
}

/* Widget mode: Show blur overlay - positioned absolutely */
.heytc-sim-widget .heytc-sim-bento {
  position: relative;
  overflow: visible;
}

.heytc-sim-widget .heytc-sim-blur-overlay {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 80px;
  padding-bottom: 8px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(10, 10, 11, 0.85) 40%,
    var(--heytc-bg-page) 100%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-decoration: none;
  z-index: 10;
}

.heytc-sim-blur-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 28px;
  background: #2a2a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.heytc-sim-blur-overlay:hover .heytc-sim-blur-text {
  background: #3a3a3e;
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}


/* ==========================================================================
   Widget Mode
   ========================================================================== */

/* Widget page - minimal padding */
/* Widget - tight bottom spacing, just room for blur overlay button */
.heytc-sim-widget {
  min-height: auto !important;
  height: auto !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.heytc-sim-widget .heytc-sim-page {
  padding-bottom: 35px !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
}

.heytc-sim-widget .heytc-sim-bento {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Force graveyard to collapse completely */
.heytc-sim-widget .heytc-sim-card--graveyard {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Widget mode: Ticker overlay - smaller and contained */
.heytc-sim-widget .heytc-sim-ticker-overlay {
  position: absolute !important;
  height: auto !important;
  min-height: 300px;
  padding-top: 60px !important;
}

.heytc-sim-widget .heytc-sim-ticker-overlay:not(.heytc-sim-visible) {
  display: none !important;
}

.heytc-sim-widget .heytc-sim-ticker-year {
  font-size: clamp(4rem, 15vw, 7rem);
}

.heytc-sim-widget .heytc-sim-ticker-label {
  font-size: 0.9rem;
}

/* Widget header - compact */
.heytc-sim-header--widget {
  margin-bottom: 20px;
  text-align: center;
}

.heytc-sim-header--widget .heytc-sim-title {
  margin-bottom: 4px;
}

/* Widget bento - tight grid */
.heytc-sim-widget .heytc-sim-bento {
  gap: 12px;
  grid-auto-rows: min-content;
}

