/* ============================================================
   JELLY MINER CLASSIC — Stylesheet
   ============================================================ */

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

:root {
  --bg:       #080818;
  --bg2:      #101025;
  --bg3:      #181835;
  --card:     #12122a;
  --border:   #252548;
  --cyan:     #00e5cc;
  --cyan-dim: #00b8a0;
  --gold:     #ffd700;
  --red:      #ff5555;
  --green:    #44ee88;
  --purple:   #cc88ff;
  --orange:   #ff9944;
  --blue:     #4488ff;
  --text:     #dde0f0;
  --muted:    #6677aa;

  --common:    #88bb88;
  --uncommon:  #5599ff;
  --rare:      #bb55ff;
  --epic:      #ff9900;
  --legendary: #ff4040;

  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, #0c0c22 0%, #180a2e 100%);
  border-bottom: 2px solid var(--cyan);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 24px rgba(0, 229, 204, 0.18);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-emoji {
  font-size: 44px;
  display: inline-block;
  animation: jelly-bounce 2.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(0, 229, 204, 0.5));
}

@keyframes jelly-bounce {
  0%, 100% { transform: scaleY(1)   scaleX(1); }
  40%       { transform: scaleY(1.2) scaleX(0.88); }
  60%       { transform: scaleY(0.92) scaleX(1.06); }
}

.logo-text h1 {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(0, 229, 204, 0.55);
}

.classic-tag {
  background: var(--gold);
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 1px;
  vertical-align: middle;
}

.tagline {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(0, 229, 204, 0.07);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
}

.stat-label {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cyan);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 8px 18px;
  transition: all 0.18s;
  white-space: nowrap;
  font-family: var(--font);
}

.tab-btn:hover { color: var(--text); background: var(--bg3); }

.tab-btn.active {
  background: rgba(0, 229, 204, 0.13);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   SHARED: STATS LIST
   ============================================================ */
.stats-list { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg2);
  border-radius: 6px;
  font-size: 0.83rem;
}

.stat-row span  { color: var(--muted); }
.stat-row strong { color: var(--text); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 860px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* Mining indicator */
.mining-indicator { margin: 10px 0 4px; }

.hash-viz {
  height: 8px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.hash-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  border-radius: 4px;
  transition: width 0.6s;
  animation: hash-pulse 1.8s ease-in-out infinite;
}

@keyframes hash-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.mining-text {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* Rare catch badge */
.rare-catch { margin-top: 14px; text-align: center; }

/* Event log */
.event-log-card { grid-column: span 2; }
@media (max-width: 860px) { .event-log-card { grid-column: span 1; } }

.event-log {
  max-height: 170px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  font-size: 0.79rem;
  padding: 5px 10px;
  border-radius: 4px;
  border-left: 3px solid var(--border);
}
.log-entry.info      { border-left-color: var(--blue);   background: rgba(68,136,255,0.07); }
.log-entry.success   { border-left-color: var(--green);  background: rgba(68,238,136,0.07); }
.log-entry.warning   { border-left-color: var(--gold);   background: rgba(255,215,0,0.07); }
.log-entry.block     { border-left-color: var(--cyan);   background: rgba(0,229,204,0.07); }
.log-entry.fish      { border-left-color: var(--purple); background: rgba(204,136,255,0.07); }
.log-entry.legendary { border-left-color: var(--legendary); background: rgba(255,64,64,0.1); }

/* Block ticker */
.block-ticker {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: ticker-pulse 1.1s ease-in-out infinite;
}

@keyframes ticker-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(68,238,136,.45); }
  50%       { opacity: .7; box-shadow: 0 0 0 6px rgba(68,238,136,0); }
}

/* ============================================================
   MINE TAB
   ============================================================ */
.mine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 1050px) { .mine-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px)  { .mine-grid { grid-template-columns: 1fr; } }

.section-note {
  font-size: 0.79rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.shop-items { display: flex; flex-direction: column; gap: 10px; }

.shop-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s;
}
.shop-item:hover { border-color: var(--cyan-dim); }

.shop-item-icon { font-size: 2rem; flex-shrink: 0; }
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { font-weight: 700; font-size: 0.88rem; }
.shop-item-desc { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.shop-item-stats { font-size: 0.74rem; color: var(--cyan); margin-top: 4px; }

.shop-item-buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.shop-item-price { font-weight: 700; color: var(--gold); font-size: 0.9rem; }

/* Owned rigs */
.owned-hardware {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  max-height: 280px;
  overflow-y: auto;
}

.owned-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}
.owned-item-icon  { font-size: 1.4rem; }
.owned-item-name  { flex: 1; font-weight: 600; }
.owned-item-stats { color: var(--muted); font-size: 0.74rem; }
.owned-item-count {
  background: var(--cyan);
  color: #000;
  border-radius: 14px;
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 700;
}

/* Power meter */
.power-meter { margin-top: 10px; }
.power-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.79rem;
  margin-bottom: 5px;
  color: var(--muted);
}
.power-bar-bg {
  height: 10px;
  background: var(--bg2);
  border-radius: 5px;
  overflow: hidden;
}
.power-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #aaee44);
  border-radius: 5px;
  transition: width 0.5s, background-color 0.5s;
}
.power-bar-fill.over { background: var(--red) !important; }

.empty-msg {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
  padding: 24px 10px;
  font-style: italic;
}

/* ============================================================
   FISHING POND
   ============================================================ */
.fish-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pond-card { grid-column: span 2; }
.rarity-card { grid-column: span 2; }

@media (max-width: 800px) {
  .fish-layout { grid-template-columns: 1fr; }
  .pond-card, .rarity-card { grid-column: span 1; }
}

/* Pond */
.pond-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pond {
  width: 100%;
  max-width: 640px;
  height: 200px;
  background: linear-gradient(180deg, #08223e 0%, #0a3a6a 40%, #084e80 100%);
  border-radius: 50% / 22px;
  border: 2px solid #1a6aaa;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,100,220,0.4), inset 0 -8px 24px rgba(0,40,100,0.5);
}

.pond-surface {
  position: absolute;
  top: 0; left: -10%; right: -10%;
  height: 35px;
  background: linear-gradient(180deg, rgba(100,200,255,0.25), transparent);
  animation: wave 3.5s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: translateX(0) scaleY(1); }
  50%       { transform: translateX(-4%) scaleY(1.4); }
}

.pond-depth { position: absolute; inset: 0; }

.swim-fish {
  position: absolute;
  font-size: 1.3rem;
  opacity: 0.65;
}

.swim-fish.f1 { top: 38%; animation: swim-lr 8s  linear infinite; }
.swim-fish.f2 { top: 60%; animation: swim-rl 12s linear infinite; }
.swim-fish.f3 { top: 28%; animation: swim-lr 10s linear infinite; animation-delay: -3s; }
.swim-fish.f4 { top: 72%; animation: swim-rl 7s  linear infinite; animation-delay: -5s; }
.swim-fish.f5 { top: 50%; animation: swim-lr 15s linear infinite; animation-delay: -7s; }

@keyframes swim-lr {
  0%    { left: -6%; transform: scaleX(1); }
  49.9% { left: 106%; transform: scaleX(1); }
  50%   { left: 106%; transform: scaleX(-1); }
  100%  { left: -6%; transform: scaleX(-1); }
}

@keyframes swim-rl {
  0%    { left: 106%; transform: scaleX(-1); }
  49.9% { left: -6%; transform: scaleX(-1); }
  50%   { left: -6%; transform: scaleX(1); }
  100%  { left: 106%; transform: scaleX(1); }
}

/* Fishing line + hook */
.fishing-line {
  position: absolute;
  top: 0;
  left: calc(50% - 1px);
  width: 2px;
  height: 58%;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  transform-origin: top center;
  animation: line-sway 2s ease-in-out infinite;
  display: none;
}

@keyframes line-sway {
  0%, 100% { transform: rotate(-2deg); }
  50%       { transform: rotate(2deg); }
}

.fishing-hook {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  animation: hook-bob 1.4s ease-in-out infinite;
  display: none;
}

@keyframes hook-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-5px); }
}

/* Controls */
.pond-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.fish-status {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.4em;
}

.fish-status.biting {
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  animation: blink-urgent 0.45s ease-in-out infinite;
}

@keyframes blink-urgent {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.fish-progress-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
  display: none;
}

.fish-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 4px;
  transition: width 0.1s linear;
}

.pond-btns { display: flex; gap: 12px; }

#reel-btn {
  display: none;
  animation: reel-pulse 0.5s ease-in-out infinite;
}

@keyframes reel-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(68,238,136,0.5); }
  50%       { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(68,238,136,0); }
}

/* Inventory */
.inventory-card { display: flex; flex-direction: column; }

.inventory-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.fish-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fish-in 0.3s ease;
}

@keyframes fish-in {
  from { transform: translateX(-14px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.fish-item-icon   { font-size: 1.4rem; flex-shrink: 0; }
.fish-item-name   { flex: 1; font-size: 0.84rem; font-weight: 600; }
.fish-item-rarity { flex-shrink: 0; }
.fish-item-value  { color: var(--gold); font-size: 0.84rem; font-weight: 700; margin-right: 6px; }

.inventory-footer { margin-top: auto; }

#sell-all-btn { display: none; width: 100%; }

/* Rarity tags */
.rarity-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}
.rarity-tag.common    { background: rgba(136,187,136,.18); color: var(--common);    border: 1px solid var(--common); }
.rarity-tag.uncommon  { background: rgba(85,153,255,.18);  color: var(--uncommon);  border: 1px solid var(--uncommon); }
.rarity-tag.rare      { background: rgba(187,85,255,.18);  color: var(--rare);      border: 1px solid var(--rare); }
.rarity-tag.epic      { background: rgba(255,153,0,.18);   color: var(--epic);      border: 1px solid var(--epic); }
.rarity-tag.legendary {
  background: rgba(255,64,64,.18);
  color: var(--legendary);
  border: 1px solid var(--legendary);
  animation: legendary-glow 1.8s ease-in-out infinite;
}

@keyframes legendary-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,64,64,.3); }
  50%       { box-shadow: 0 0 14px rgba(255,64,64,.75); }
}

/* Rarity guide */
.rarity-guide { display: flex; flex-direction: column; gap: 8px; }

.rarity-guide-item {
  background: var(--bg2);
  border-radius: 7px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.rarity-fish-list { flex: 1; color: var(--muted); font-size: 0.74rem; }

/* ============================================================
   EXCHANGE TAB
   ============================================================ */
.exchange-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) { .exchange-layout { grid-template-columns: 1fr; } }

.exchange-rate-display {
  font-size: 0.84rem;
  color: var(--cyan);
  background: rgba(0,229,204,.07);
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  margin-bottom: 14px;
}

.exchange-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exchange-form label {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exchange-form input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 1rem;
  padding: 10px 14px;
  outline: none;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.exchange-form input:focus { border-color: var(--cyan); }

.exchange-preview {
  font-size: 0.84rem;
  color: var(--muted);
  background: var(--bg2);
  border-radius: 6px;
  padding: 8px 12px;
}
.exchange-preview strong { color: var(--gold); }

/* Market card */
.big-price {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
  padding: 14px 0 4px;
  text-shadow: 0 0 30px rgba(0,229,204,.45);
}

.price-change {
  text-align: center;
  font-size: 0.88rem;
  color: var(--green);
  margin-bottom: 10px;
}
.price-change.negative { color: var(--red); }

#price-chart {
  width: 100%;
  height: auto;
  border-radius: 7px;
  display: block;
}

/* ============================================================
   ABOUT / WHITEPAPER
   ============================================================ */
.about-layout { max-width: 820px; margin: 0 auto; }

.about-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.about-logo { font-size: 3rem; }

.about-header h2 { font-size: 1.5rem; color: var(--cyan); }
.about-header p  { color: var(--muted); font-size: 0.83rem; margin-top: 4px; }

.about-content h3 {
  color: var(--cyan);
  font-size: 1.05rem;
  margin: 22px 0 10px;
  padding: 0;
  border: none;
}

.about-content p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 10px;
}

.about-content code {
  background: var(--bg2);
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.84rem;
}

blockquote {
  border-left: 3px solid var(--cyan);
  padding: 10px 16px;
  margin: 14px 0;
  background: rgba(0,229,204,.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 10px 0 4px;
}
.tech-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tech-table tr td:first-child { color: var(--muted); width: 45%; }
.tech-table tr td:last-child  { color: var(--text); font-weight: 600; }

.roadmap { display: flex; flex-direction: column; gap: 7px; margin: 10px 0; }

.roadmap-item {
  padding: 8px 14px;
  background: var(--bg2);
  border-radius: 7px;
  font-size: 0.84rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
.roadmap-item.done   { border-left-color: var(--green);  color: var(--text); }
.roadmap-item.active { border-left-color: var(--cyan);   color: var(--cyan); }

.disclaimer {
  font-size: 0.78rem !important;
  color: var(--muted) !important;
  padding: 12px 14px !important;
  background: var(--bg2) !important;
  border-radius: 7px;
  border-left: 3px solid var(--red) !important;
  line-height: 1.7 !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 10px 18px;
  transition: all 0.18s;
  letter-spacing: 0.3px;
  font-family: var(--font);
}
.btn:disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--cyan); color: #000; }
.btn-primary:hover { background: #22ffee; box-shadow: 0 0 18px rgba(0,229,204,.45); transform: translateY(-1px); }

.btn-success { background: var(--green); color: #000; }
.btn-success:hover { background: #77ff99; box-shadow: 0 0 18px rgba(68,238,136,.45); transform: translateY(-1px); }

.btn-warning { background: var(--gold); color: #000; }
.btn-warning:hover { background: #ffee44; box-shadow: 0 0 18px rgba(255,215,0,.45); transform: translateY(-1px); }

.btn-sm { padding: 5px 13px; font-size: 0.76rem; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 16px;
  max-width: 300px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.6);
  animation: toast-in 0.28s ease;
}

@keyframes toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast.toast-out { animation: toast-out 0.28s ease forwards; }

@keyframes toast-out {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

.toast.success    { border-left: 4px solid var(--green); }
.toast.warning    { border-left: 4px solid var(--gold); }
.toast.info       { border-left: 4px solid var(--blue); }
.toast.block      { border-left: 4px solid var(--cyan); }
.toast.legendary  { border-left: 4px solid var(--legendary); }

.toast-icon  { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.toast-title { font-weight: 700; color: var(--text); font-size: 0.86rem; }
.toast-msg   { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 40px;
}
.footer-disclaimer { color: var(--red); }


/* ============================================================
   MULTIPLAYER — Login Modal
   ============================================================ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,8,24,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(4px);
}
.login-modal {
  background: var(--card);
  border: 1px solid var(--cyan);
  border-radius: 18px;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 0 60px rgba(0,229,204,0.25);
  animation: modal-in 0.35s cubic-bezier(.4,0,.2,1);
}
@keyframes modal-in {
  from { transform: translateY(30px) scale(.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}
.login-header { text-align: center; margin-bottom: 24px; }
.login-header .logo-emoji { font-size: 3.5rem; display: block; margin-bottom: 8px;
  animation: jelly-bounce 2.2s ease-in-out infinite; }
.login-header h2 { font-size: 1.5rem; color: var(--cyan); letter-spacing: 2px; }
.login-header p  { color: var(--muted); font-size: .8rem; margin-top: 6px; }

.login-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}
.login-tab {
  flex: 1; background: transparent; border: none; border-radius: 7px;
  color: var(--muted); cursor: pointer; font-size: .88rem; font-weight: 600;
  padding: 9px; transition: all .18s; font-family: var(--font);
}
.login-tab.active { background: var(--cyan); color: #000; }

.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-size: .96rem; padding: 12px 16px; outline: none;
  font-family: var(--font); transition: border-color .2s;
}
.login-form input:focus { border-color: var(--cyan); }
.login-error {
  color: var(--red); font-size: .8rem; min-height: 1.2em; padding: 0 2px;
  animation: shake .4s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}
.login-footer {
  text-align: center; margin-top: 20px; font-size: .72rem; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 14px;
}

/* User badge in header */
.user-badge {
  background: rgba(0,229,204,.09);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--text);
}
.user-badge strong { color: var(--cyan); }
.user-badge button {
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); cursor: pointer; font-size: .72rem; padding: 3px 9px;
  font-family: var(--font); transition: all .15s;
}
.user-badge button:hover { border-color: var(--red); color: var(--red); }

/* ============================================================
   MULTIPLAYER — Mining Paused Banner
   ============================================================ */
.mining-paused-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(255,85,85,.15), rgba(255,153,68,.12));
  border: 1px solid var(--red);
  border-radius: 9px;
  color: var(--red);
  font-size: .85rem;
  font-weight: 600;
  padding: 10px 20px;
  margin: 12px 20px 0;
  animation: pulse-border 2s ease-in-out infinite;
}
@keyframes pulse-border {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,85,85,0); }
  50%      { box-shadow: 0 0 0 4px rgba(255,85,85,.12); }
}

/* ============================================================
   MULTIPLAYER — Network / Online Players Card
   ============================================================ */
.online-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
}
.online-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg2);
  border-radius: 7px;
  font-size: .8rem;
}
.online-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(68,238,136,.6);
  animation: ticker-pulse 1.4s ease-in-out infinite;
}
.online-player-name { flex: 1; font-weight: 600; }
.online-player-hash { color: var(--cyan); font-size: .74rem; }
.online-player-badge {
  font-size: .68rem; padding: 1px 7px; border-radius: 10px; font-weight: 700;
}
.mining-badge  { background: rgba(0,229,204,.15); color: var(--cyan); border: 1px solid var(--cyan); }
.idle-badge    { background: rgba(102,119,170,.12); color: var(--muted); border: 1px solid var(--border); }
.npc-badge     { background: rgba(68,136,255,.12); color: var(--blue); border: 1px solid var(--blue); }

.network-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.network-stat-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .78rem;
  display: flex;
  gap: 6px;
  align-items: center;
}
.network-stat-pill .nsp-label { color: var(--muted); }
.network-stat-pill .nsp-val   { color: var(--cyan); font-weight: 700; }

/* ============================================================
   ADMIN — Gate
   ============================================================ */
.admin-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #0e0e28 0%, #080818 70%);
}
.admin-login-box {
  background: var(--card);
  border: 1px solid var(--cyan);
  border-radius: 18px;
  padding: 40px 44px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(0,229,204,.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-login-logo { font-size: 3.5rem; }
.admin-login-box h2 { color: var(--cyan); font-size: 1.4rem; }
.admin-login-sub { color: var(--muted); font-size: .82rem; margin-top: -6px; }
.admin-pw-field {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-size: 1rem; padding: 12px 16px; outline: none;
  font-family: var(--font); width: 100%; text-align: center; transition: border-color .2s;
}
.admin-pw-field:focus { border-color: var(--cyan); }
.admin-pw-error { color: var(--red); font-size: .78rem; min-height: 1.1em; }
.pw-shake { animation: shake .4s ease; }
.admin-back-link { color: var(--muted); font-size: .78rem; text-decoration: none; }
.admin-back-link:hover { color: var(--text); }

/* ============================================================
   ADMIN — Dashboard layout
   ============================================================ */
.admin-header { padding: 12px 24px; }
.admin-header-actions { display: flex; gap: 12px; align-items: center; }
.admin-live-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--green); font-weight: 600;
}
.admin-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Overview cards */
.admin-overview {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .admin-overview { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .admin-overview { grid-template-columns: repeat(2, 1fr); } }

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px 14px;
  text-align: center;
  transition: border-color .2s;
}
.admin-stat-card:hover { border-color: var(--cyan-dim); }
.admin-stat-card.online  { border-color: rgba(68,238,136,.3); }
.admin-stat-card.mining  { border-color: rgba(0,229,204,.3); }
.admin-stat-icon { font-size: 1.6rem; margin-bottom: 6px; }
.admin-stat-val  { font-size: 1.5rem; font-weight: 900; color: var(--cyan); }
.admin-stat-label { font-size: .7rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; margin-top: 4px; }

/* Section */
.admin-section { display: flex; flex-direction: column; gap: 10px; }
.admin-section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.admin-section-header h2 {
  font-size: 1rem; color: var(--cyan); font-weight: 700;
}
.admin-refresh-note { font-size: .74rem; color: var(--muted); }

.admin-table-card { padding: 0; overflow: hidden; }
.admin-table-controls { display: flex; gap: 10px; }
.admin-search {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); font-size: .82rem; padding: 6px 12px; outline: none;
  font-family: var(--font); transition: border-color .2s;
}
.admin-search:focus { border-color: var(--cyan); }

/* Admin table */
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.admin-table th {
  background: var(--bg2); color: var(--muted); font-weight: 600;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .5px;
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 14px; border-bottom: 1px solid rgba(37,37,72,.5);
  vertical-align: middle; color: var(--text);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.row-online td { background: rgba(68,238,136,.03); }
.admin-table tr:hover td { background: var(--bg2); }
.admin-act-btn { white-space: nowrap; }

/* Badges */
.admin-badge {
  font-size: .68rem; padding: 2px 8px; border-radius: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px; display: inline-block;
}
.admin-badge.green { background: rgba(68,238,136,.15); color: var(--green); border: 1px solid var(--green); }
.admin-badge.cyan  { background: rgba(0,229,204,.12);  color: var(--cyan);  border: 1px solid var(--cyan); }
.admin-badge.blue  { background: rgba(68,136,255,.12); color: var(--blue);  border: 1px solid var(--blue); }
.admin-badge.muted { background: rgba(102,119,170,.12); color: var(--muted); border: 1px solid var(--border); }

/* ── Blockchain tree ── */
.blockchain-scroll {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 10px 0 16px;
  scrollbar-width: thin;
}
.blockchain-scroll::-webkit-scrollbar { height: 5px; }
.blockchain-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.block-node-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.block-node {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  width: 175px;
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.block-node:hover { border-color: var(--cyan-dim); box-shadow: 0 0 14px rgba(0,229,204,.12); }

.block-node-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 7px;
}
.block-node-num  { font-weight: 900; color: var(--cyan); font-size: .88rem; }
.block-node-age  { font-size: .68rem; color: var(--muted); }
.block-node-miner { font-size: .78rem; font-weight: 600; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-node-reward { font-size: .74rem; color: var(--gold); margin-bottom: 5px; }
.block-node-hash { font-size: .65rem; color: var(--muted); font-family: monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-node-prev { font-size: .62rem; color: var(--border); font-family: monospace;
  margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.block-connector {
  display: flex; align-items: center; padding: 0 8px;
  color: var(--muted); font-size: 1.2rem; flex-shrink: 0;
}

/* ── Confirm modal ── */
.admin-confirm-overlay {
  position: fixed; inset: 0; background: rgba(8,8,24,.85);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  backdrop-filter: blur(4px);
}
.admin-confirm-box {
  background: var(--card); border: 1px solid var(--red); border-radius: 14px;
  padding: 28px 32px; max-width: 360px; text-align: center;
  box-shadow: 0 0 30px rgba(255,85,85,.2); animation: modal-in .25s ease;
  font-size: .9rem; line-height: 1.6;
}

/* ── Admin toast ── */
.admin-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--cyan); border-radius: 10px;
  padding: 10px 22px; font-size: .86rem; color: var(--text); z-index: 10000;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  transition: opacity .4s; pointer-events: none;
}
