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

:root {
  --bg-primary: #0a0617;
  --bg-secondary: #120b1e;
  --bg-card: #1a1028;
  --bg-input: #0f0a1a;
  --border: #2a1a40;
  --text-primary: #e8edf5;
  --text-secondary: #8892a8;
  --accent: #8b5cf6;
  --accent-dim: rgba(139, 92, 246, 0.12);
  --accent-glow: rgba(139, 92, 246, 0.25);
  --accent-light: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #6d28d9);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --green-glow: rgba(34, 197, 94, 0.6);
  --red: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 40px rgba(0,0,0,0.5);
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  background: linear-gradient(160deg, #0f0022 0%, #0a0617 30%, #050510 70%, #020208 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 140%;
  height: 140%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* ---- Header ---- */
header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

header h1 {
  font-family: 'Russo One', sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

header h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.15rem;
  letter-spacing: 0.06em;
}

/* ---- Icons ---- */
.icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 5px;
  image-rendering: pixelated;
}

.icon-lg {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 6px;
  image-rendering: pixelated;
}

.coin-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: var(--accent-gradient);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  vertical-align: middle;
  margin-right: 5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.coin-lg {
  width: 28px;
  height: 28px;
  line-height: 28px;
  font-size: 16px;
}

/* ---- Tabs ---- */
.tab-bar {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.tab-btn {
  padding: 0.6rem 1.8rem;
  background: rgba(139, 92, 246, 0.06);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(109, 40, 217, 0.15));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.25), inset 0 1px 0 rgba(139, 92, 246, 0.2);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- Grid ---- */
.grid-layout {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.spawner-layout {
  grid-template-columns: 1fr 1fr;
}

.kelp-layout {
  grid-template-columns: 1fr 1fr;
}

.kelp-summary {
  grid-column: 1 / -1;
}

/* ---- Card ---- */
.card {
  background: linear-gradient(160deg, rgba(26, 16, 40, 0.95), rgba(20, 12, 35, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(139, 92, 246, 0.03);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.04), transparent 70%);
  pointer-events: none;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(139, 92, 246, 0.06), 0 0 30px rgba(139, 92, 246, 0.04);
}

.card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-light);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  padding-bottom: 0.65rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
  border-bottom: 2px solid rgba(139, 92, 246, 0.12);
  padding-bottom: 0.75rem;
  margin-bottom: 1.1rem;
  letter-spacing: 0.01em;
}

.card-header .icon-lg {
  margin-right: 0;
}

/* ---- Input Field ---- */
.input-field {
  margin-bottom: 0.85rem;
}

.input-field-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.input-field-top label {
  display: inline;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.field-badge {
  margin-left: auto;
  display: inline-block;
  padding: 0.08rem 0.5rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: none;
  letter-spacing: normal;
}

/* ---- Sell Grid ---- */
.sell-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.sell-grid .btn-option {
  flex: unset;
  padding: 0.65rem 0.3rem;
  font-size: 0.78rem;
  text-align: center;
}

/* ---- Sell Kelp Grid ---- */
.sell-kelp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ---- Results Scroll ---- */
.results-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

/* ---- Form Elements ---- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-lg {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg-input);
  border: 2px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-variant-numeric: tabular-nums;
}

.input-lg:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  opacity: 0.4;
}

select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg-input);
  border: 2px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

select option {
  background: var(--bg-secondary);
}

.form-row {
  display: flex;
  gap: 0.85rem;
}

.form-row .half {
  flex: 1;
}

.input-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  font-style: italic;
}

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

.tab-content.active .card {
  animation: fadeSlideUp 0.45s ease-out both;
}

.tab-content.active .card:nth-child(1) { animation-delay: 0s; }
.tab-content.active .card:nth-child(2) { animation-delay: 0.08s; }
.tab-content.active .card:nth-child(3) { animation-delay: 0.16s; }

.divider {
  border: none;
  border-top: 1px solid rgba(139, 92, 246, 0.12);
  margin: 1rem 0;
}

/* ---- Button Group ---- */
.btn-group {
  display: flex;
  gap: 0.5rem;
}

.btn-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.5rem;
  background: rgba(139, 92, 246, 0.04);
  border: 2px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-option:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.08);
}

.btn-option.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(109, 40, 217, 0.12));
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: inset 0 1px 0 rgba(139, 92, 246, 0.15);
}

/* ---- Small Button ---- */
.btn-small {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
  background: transparent;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-small:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-row .btn-small {
  flex: 1;
  margin-top: 0;
  justify-content: center;
}

/* ---- Conversion Box ---- */
.conversion-box {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-sm);
}

.conv-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.25rem 0;
}

.conv-row span {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.conv-arrow {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
}

/* ---- Info Box ---- */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 0.5rem;
}

.info-icon {
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.leftover-extra {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.25rem;
}

.leftover-input {
  width: 60px;
  padding: 0.15rem 0.3rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  outline: none;
  text-align: center;
  transition: border-color 0.2s;
}

.leftover-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.leftover-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.info-box .coin-icon {
  width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 10px;
  margin-right: 2px;
}

/* ---- Bone Stats Box (now matches Total Profit) ---- */
.bone-stats-box {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.03)) !important;
  border: 2px solid rgba(34, 197, 94, 0.35) !important;
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem !important;
  margin-top: 0.75rem;
  position: relative;
  overflow: visible;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.1), 0 0 50px rgba(34, 197, 94, 0.04), inset 0 1px 0 rgba(34, 197, 94, 0.06) !important;
}

.bone-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  margin-bottom: 0.65rem;
}

.bone-total-label {
  display: flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bone-total-value {
  font-family: 'Russo One', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #22c55e;
  text-shadow: 0 0 30px rgba(34, 197, 94, 0.5), 0 0 60px rgba(34, 197, 94, 0.2), 0 0 100px rgba(34, 197, 94, 0.1);
  font-variant-numeric: tabular-nums;
}

.bone-sub-row {
  display: flex;
  gap: 0.75rem;
}

.bone-sub-item {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.08);
}

.bone-sub-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bone-sub-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ---- Results ---- */
.result-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.kelp-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: rgba(11, 15, 23, 0.5);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.result-item:hover {
  border-left-color: var(--accent);
  background: rgba(11, 15, 23, 0.7);
}

.kelp-results .result-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.kelp-results .result-item:hover {
  border-left-color: var(--accent);
  background: rgba(11, 15, 23, 0.7);
  transform: translateX(2px);
}

.kelp-results .result-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.kelp-results .result-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.result-label {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.result-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  text-align: right;
  font-size: 1rem;
}

/* ---- Total Profit ---- */
.total-profit-item {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.04)) !important;
  border: 2px solid rgba(34, 197, 94, 0.4) !important;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.15), 0 0 60px rgba(34, 197, 94, 0.06), inset 0 1px 0 rgba(34, 197, 94, 0.08) !important;
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem !important;
  position: relative;
  overflow: visible;
}

.total-profit-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--green);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px var(--green);
}

.total-profit-item .result-label {
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.total-profit-item .result-value {
  font-size: 1.8rem;
  font-weight: 400;
  font-family: 'Russo One', sans-serif;
  color: #22c55e;
  text-shadow: 0 0 30px rgba(34, 197, 94, 0.6), 0 0 60px rgba(34, 197, 94, 0.3), 0 0 100px rgba(34, 197, 94, 0.15);
  position: relative;
  letter-spacing: 0.02em;
}

.total-profit-item.negative {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.15), rgba(248, 113, 113, 0.04)) !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
  box-shadow: 0 0 30px rgba(248, 113, 113, 0.15), 0 0 60px rgba(248, 113, 113, 0.06), inset 0 1px 0 rgba(248, 113, 113, 0.08) !important;
}

.total-profit-item.negative::before {
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.total-profit-item.negative .result-value {
  color: #f87171;
  text-shadow: 0 0 30px rgba(248, 113, 113, 0.6), 0 0 60px rgba(248, 113, 113, 0.3), 0 0 100px rgba(248, 113, 113, 0.15);
}

.kelp-results .total-profit-item {
  grid-column: 1 / -1;
}

/* ---- Overall Cost highlight ---- */
.total-cost-item {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.03)) !important;
  border: 2px solid rgba(251, 191, 36, 0.35) !important;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.12), inset 0 1px 0 rgba(251, 191, 36, 0.06) !important;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.2rem !important;
  position: relative;
}

.total-cost-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #fbbf24;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.total-cost-item .result-label {
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.total-cost-item .result-value {
  font-size: 1.5rem;
  font-weight: 400;
  font-family: 'Russo One', sans-serif;
  color: #fbbf24;
  text-shadow: 0 0 25px rgba(251, 191, 36, 0.5), 0 0 50px rgba(251, 191, 36, 0.2);
  letter-spacing: 0.02em;
}

.kelp-results .total-cost-item {
  grid-column: 1 / -1;
}

/* ---- Warnings ---- */
.warning {
  margin-top: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#kBottleneck, #sBottleneck {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent-light);
}

.hidden {
  display: none !important;
}

.warning.hidden {
  display: none;
}

/* ---- Spawner kelp mode extras ---- */
#sCostRow.hidden {
  display: none;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---- AFK Predictor ---- */
.predictor-card {
  grid-column: 1 / -1;
}

.predictor-body {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
}

.predictor-inputs {
  display: flex;
  gap: 0.85rem;
  flex: 1;
}

.predictor-field {
  flex: 1;
}

.predictor-field .input-lg {
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}

.predictor-result {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 1.1rem;
  min-width: 200px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.03));
  border: 2px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.08);
}

.predictor-result-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.predictor-result-value {
  font-family: 'Russo One', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #22c55e;
  text-shadow: 0 0 30px rgba(34, 197, 94, 0.5), 0 0 60px rgba(34, 197, 94, 0.2);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---- Predictor Sub Row ---- */
.predictor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.predictor-sub-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.predictor-sub-value {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ---- Predictor Footnote ---- */
/* ---- Predictor Calc Button ---- */
.predictor-btn-row {
  display: flex;
  align-items: flex-end;
}

.btn-calc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.1));
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.btn-calc:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(109, 40, 217, 0.18));
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
  transform: translateY(-1px);
}

.btn-calc:active {
  transform: translateY(0);
}

.predictor-footnote {
  margin-top: 0.65rem;
  padding: 0.4rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

/* ---- Progress Bar ---- */
.predictor-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.predictor-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 4px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  padding-right: 4px;
  line-height: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  position: relative;
}

.predictor-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 16px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15));
  border-radius: 0 4px 4px 0;
}

/* ---- Profit Goal Predictor ---- */
.profit-goal-card {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

.profit-goal-card form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pg-row {
  display: flex;
  gap: 0.85rem;
}

.pg-field {
  flex: 1;
}

.pg-target-row .pg-field {
  max-width: 320px;
}

.pg-price-row {
  display: flex;
  gap: 0.85rem;
}

.pg-calc-section {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-sm);
}

.pg-calc-row {
  display: flex;
  gap: 1rem;
}

.pg-calc-left,
.pg-calc-right {
  flex: 1;
}

.pg-calc-label {
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.pg-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-sm {
  width: 80px;
  padding: 0.45rem 0.6rem;
  background: var(--bg-input);
  border: 2px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-variant-numeric: tabular-nums;
}

.input-sm:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.pg-unit {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.pg-btn {
  margin-top: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.pg-drop-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.pg-drop-hint strong {
  color: var(--accent-light);
}

.pg-result-box {
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-sm);
}

.pg-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pg-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.65rem;
  background: rgba(11, 15, 23, 0.5);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.pg-result-primary {
  grid-column: 1 / -1;
  border-left-color: var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.02));
}

.pg-result-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pg-result-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.pg-result-primary .pg-result-value {
  font-family: 'Russo One', sans-serif;
  font-size: 1.6rem;
  color: var(--accent-light);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.pg-storage-note {
  margin-top: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.4;
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}

/* ---- Small text inside result values ---- */
.bone-total-value small,
.predictor-result-value small,
.pg-result-value small {
  font-family: 'Outfit', sans-serif;
  font-size: 0.55em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-shadow: none;
  letter-spacing: 0.03em;
  vertical-align: baseline;
  margin-left: 0.15em;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .spawner-layout,
  .kelp-layout {
    grid-template-columns: 1fr;
  }
  .kelp-summary { grid-column: 1; }
  .predictor-card { grid-column: 1; }
  .profit-goal-card { grid-column: 1; }
  .predictor-body { flex-direction: column; align-items: stretch; }
  .predictor-inputs { flex-direction: column; }
  .predictor-result { align-items: stretch; }
  header h1 { font-size: 1.6rem; }
  .container { padding: 0.65rem; }
  .card { padding: 1rem; }
  .form-row { flex-direction: column; gap: 0; }
  .kelp-results { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
  .tab-btn { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
  .predictor-result { align-items: stretch; }
  .predictor-result-value { text-align: right; }
  .pg-calc-row { flex-direction: column; gap: 0.75rem; }
  .pg-result-grid { grid-template-columns: 1fr; }
  .pg-price-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0.4rem; }
  .card { padding: 0.85rem; }
  .card h2 { font-size: 0.95rem; }
  .total-profit-item .result-value,
  .bone-total-value { font-size: 1.3rem; }
}
