/* Spend Fortune Editorial Styles */
.spend-page {
  padding-top: 54px;
  padding-bottom: 80px;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.billionaire-hero {
  text-align: center;
  padding: 36px 20px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.billionaire-avatar-wrap {
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-light);
  box-shadow: var(--shadow-subtle);
}

.billionaire-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.billionaire-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.billionaire-name {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 50px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.billionaire-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 22px;
}

/* Character switcher tabs */
.character-select-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.char-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.char-tab:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.char-tab.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #FFFFFF;
}

/* Sticky Money Counter Bar */
.sticky-counter-container {
  position: sticky;
  top: 54px;
  z-index: 100;
  background: #059669;
  color: #FFFFFF;
  padding: 16px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.remaining-balance-num {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}

.remaining-balance-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-top: 4px;
}

.spend-progress-track {
  width: min(520px, 86%);
  height: 6px;
  margin: 12px auto 0;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  overflow: hidden;
}

.spend-progress-fill {
  height: 100%;
  width: 0%;
  background: #FFFFFF;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.spend-percent {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.92;
  margin-top: 6px;
}

/* Items Grid */
.spend-grid-container {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 0 20px;
}

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

.item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s, box-shadow 0.2s;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.item-img {
  width: 140px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 12px;
}

.item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.item-cost {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: #059669;
  margin-bottom: 16px;
}

.item-controls {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.btn-sell {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-sell:hover:not(:disabled) {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #DC2626;
}
.btn-sell:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-buy {
  background: #059669;
  color: #FFFFFF;
  border: 1px solid #059669;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-buy:hover:not(:disabled) {
  background: #047857;
}
.btn-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.item-qty-input {
  width: 100%;
  text-align: center;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 7px 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

/* Receipt Section */
.receipt-section {
  max-width: 600px;
  margin: 60px auto 0;
  padding: 0 20px;
}

.receipt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.receipt-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.receipt-table td {
  padding: 8px 4px;
  border-bottom: 1px dashed var(--border-light);
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}
