:root {
  --bg-primary: #070a13;
  --bg-secondary: #0d1220;
  --card-bg: rgba(13, 20, 36, 0.75);
  --card-border: rgba(0, 243, 255, 0.15);
  --card-hover-border: rgba(0, 243, 255, 0.45);
  
  --neon-cyan: #00f3ff;
  --neon-cyan-glow: rgba(0, 243, 255, 0.35);
  --neon-gold: #f7931a;
  --neon-gold-glow: rgba(247, 147, 26, 0.4);
  --neon-green: #10b981;
  --neon-green-glow: rgba(16, 185, 129, 0.35);
  --neon-purple: #a855f7;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-display: 'Orbitron', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  user-select: none;
}

/* Background Cyber Grid & Scanline Effect */
.cyber-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.cyber-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Layout Wrapper */
.dashboard-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100vh;
}

/* Glass Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: var(--card-hover-border);
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pulse-indicator {
  position: relative;
  width: 16px;
  height: 16px;
}

.pulse-dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.pulse-ring {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--neon-cyan);
  border-radius: 50%;
  animation: pulse-ring-anim 2s infinite ease-out;
}

@keyframes pulse-ring-anim {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.brand-titles .brand-main {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-shadow: 0 0 12px var(--neon-cyan-glow);
}

.badge-tag {
  font-size: 0.7rem;
  background: rgba(0, 243, 255, 0.15);
  color: var(--neon-cyan);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--neon-cyan);
  letter-spacing: 1px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* Market Ticker Group */
.market-ticker-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ticker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(0, 243, 255, 0.3);
  border-radius: 0 6px 6px 0;
}

.ticker-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ticker-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.ticker-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Colors */
.neon-cyan { color: var(--neon-cyan); text-shadow: 0 0 8px var(--neon-cyan-glow); }
.neon-gold { color: var(--neon-gold); text-shadow: 0 0 8px var(--neon-gold-glow); }
.neon-emerald { color: var(--neon-green); text-shadow: 0 0 8px var(--neon-green-glow); }
.font-mono { font-family: var(--font-mono); }

/* Controls */
.controls-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(0, 243, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.btn-jackpot {
  background: linear-gradient(135deg, #f7931a, #ff5e00);
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 16px var(--neon-gold-glow);
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-jackpot:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(247, 147, 26, 0.7);
}

/* Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  flex: 1;
}

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

/* Left Section: Miners */
.miners-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Hero Hashrate Card */
.hero-hashrate-card {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(13, 20, 36, 0.85) 0%, rgba(9, 28, 54, 0.6) 100%);
  border: 1px solid rgba(0, 243, 255, 0.3);
}

.metric-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hashrate-display {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.4rem 0 0.8rem 0;
}

.hash-number {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px var(--neon-cyan-glow);
}

.hash-unit {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.hash-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stat-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.dot-green { width: 7px; height: 7px; background: var(--neon-green); border-radius: 50%; box-shadow: 0 0 6px var(--neon-green); }
.dot-gold { width: 7px; height: 7px; background: var(--neon-gold); border-radius: 50%; box-shadow: 0 0 6px var(--neon-gold); }
.dot-cyan { width: 7px; height: 7px; background: var(--neon-cyan); border-radius: 50%; box-shadow: 0 0 6px var(--neon-cyan); }

/* Circular Gauge */
.gauge-box {
  position: relative;
  width: 110px;
  height: 110px;
}

.circular-chart {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3.8;
}

.circle-progress {
  fill: none;
  stroke: var(--neon-cyan);
  stroke-width: 3.8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
  filter: drop-shadow(0 0 6px var(--neon-cyan));
}

.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.gauge-lbl {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
}

/* Rig Cards Container */
.rigs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .rigs-container {
    grid-template-columns: 1fr;
  }
}

.rig-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 3px solid var(--neon-cyan);
}

.rig-card:nth-child(2) {
  border-left-color: var(--neon-purple);
}

.rig-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rig-id-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rig-status-dot.online {
  width: 10px;
  height: 10px;
  background: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-green);
}

.rig-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.rig-chip-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
}

.rig-metric-main {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.rig-hash-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
}

.rig-hash-unit {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--neon-cyan);
}

.rig-specs-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-k {
  color: var(--text-dim);
}

.spec-v {
  color: var(--text-main);
  font-weight: 500;
}

.sparkline-container {
  margin-top: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.sparkline-container canvas {
  display: block;
  width: 100%;
  height: 40px;
}

/* Right Section: Telemetry & Console */
.telemetry-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* Wallet Card */
.wallet-pool-card {
  padding: 1.25rem;
}

.pool-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(247, 147, 26, 0.15);
  color: var(--neon-gold);
  border: 1px solid var(--neon-gold);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.wallet-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.wallet-addr {
  font-size: 0.82rem;
  color: var(--neon-gold);
  word-break: break-all;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.btn-copy:hover {
  background: var(--neon-gold);
  color: #000;
  border-color: var(--neon-gold);
}

.pool-links-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pool-link-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-decoration: none;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s;
}

.pool-link-pill:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.08);
}

.pool-refresh-btn {
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.pool-refresh-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.pool-live-box {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.45rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
}

/* Matrix Stream Card */
.matrix-stream-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.stream-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stream-pulse {
  width: 8px;
  height: 8px;
  background: var(--neon-green);
  border-radius: 50%;
  animation: pulse-stream 1s infinite alternate;
}

@keyframes pulse-stream {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.stream-fps {
  font-size: 0.72rem;
  color: var(--neon-green);
}

.canvas-wrapper {
  background: #03060d;
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 8px;
  height: 150px;
  overflow: hidden;
  position: relative;
}

.canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Console Logs Card */
.console-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.btn-mini {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.console-logs {
  background: #03050a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem;
  height: 140px;
  overflow-y: auto;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.console-logs::-webkit-scrollbar {
  width: 4px;
}

.console-logs::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.3);
  border-radius: 2px;
}

.log-line {
  line-height: 1.4;
  word-break: break-all;
}

.log-time { color: var(--text-dim); }
.log-info { color: var(--neon-cyan); }
.log-success { color: var(--neon-green); font-weight: 700; }
.log-accent { color: var(--neon-gold); }

/* Footer Bar */
.footer-bar {
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--neon-green);
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.lottery-odds {
  font-size: 0.75rem;
  color: var(--neon-gold);
  letter-spacing: 0.5px;
}

/* Winner Modal Popup */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  position: relative;
  background: #0d1220;
  border: 2px solid var(--neon-gold);
  box-shadow: 0 0 50px rgba(247, 147, 26, 0.5);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 580px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.trophy-icon {
  font-size: 3.5rem;
  animation: trophy-bounce 1s infinite alternate ease-in-out;
}

@keyframes trophy-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.reward-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  width: 100%;
}

.reward-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.reward-btc {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  display: block;
}

.reward-usd {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-gold);
}

.winning-hash-box {
  font-size: 0.68rem;
  background: #03060c;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px dashed rgba(247, 147, 26, 0.4);
  word-break: break-all;
  width: 100%;
  text-align: left;
}

.hash-label {
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.2rem;
}

.hash-code {
  color: var(--neon-cyan);
}


/* Mobile repair: keep every dashboard region inside the viewport. */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
img, svg, canvas { max-width: 100%; }

@media (max-width: 720px) {
  .dashboard-wrapper { width: 100%; padding: .75rem; gap: .75rem; }
  .top-nav { display: grid; grid-template-columns: 1fr auto; padding: .85rem; gap: .75rem; }
  .brand-section { min-width: 0; gap: .65rem; }
  .brand-titles { min-width: 0; }
  .brand-titles .brand-main { display: block; font-size: .95rem; letter-spacing: .5px; line-height: 1.3; }
  .badge-tag { display: inline-block; margin-top: .25rem; font-size: .55rem; }
  .brand-sub { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: .56rem; line-height: 1.35; }
  .controls-group { justify-content: flex-end; align-self: start; flex-wrap: wrap; }
  .btn-jackpot { font-size: .58rem; padding: .55rem .65rem; max-width: 9rem; }
  .market-ticker-group { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .ticker-item { min-width: 0; padding: .35rem .45rem; overflow: hidden; }
  .ticker-label, .ticker-sub { font-size: .52rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ticker-val { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; }
  .main-grid { display: block; }
  .miners-section, .telemetry-section { gap: .75rem; }
  .hero-hashrate-card { padding: 1rem; align-items: flex-start; gap: .5rem; }
  .metric-caption, .section-title { font-size: .62rem; letter-spacing: .7px; }
  .hash-number { font-size: 2.35rem; }
  .hash-unit { font-size: .95rem; }
  .hash-stats-row { gap: .35rem; }
  .stat-pill { min-width: 0; max-width: 100%; font-size: .58rem; padding: .3rem .45rem; overflow-wrap: anywhere; }
  .gauge-box { flex: 0 0 76px; width: 76px; height: 76px; }
  .gauge-val { font-size: .78rem; }
  .gauge-lbl { font-size: .45rem; }
  .rigs-container { grid-template-columns: 1fr; gap: .75rem; }
  .rig-card, .wallet-pool-card, .matrix-stream-card, .console-card { min-width: 0; padding: .9rem; }
  .rig-header, .card-title-row { gap: .5rem; align-items: flex-start; }
  .rig-name { font-size: .75rem; }
  .rig-chip-tag, .pool-badge { font-size: .52rem; white-space: nowrap; }
  .rig-metric-main { margin-bottom: .45rem; }
  .rig-hash-val { font-size: 1.8rem; }
  .rig-specs-grid { min-width: 0; padding: .6rem; font-size: .66rem; }
  .spec-row { gap: .5rem; align-items: flex-start; }
  .spec-k { flex: 0 0 38%; }
  .spec-v { min-width: 0; max-width: 62%; text-align: right; overflow-wrap: anywhere; }
  .wallet-box { min-width: 0; align-items: flex-start; gap: .4rem; }
  .wallet-addr { min-width: 0; font-size: .62rem; overflow-wrap: anywhere; }
  .btn-copy { min-height: 40px; margin-left: 0; }
  .pool-links-row { align-items: stretch; flex-direction: column; }
  .pool-link-pill, .pool-refresh-btn { width: 100%; min-height: 42px; justify-content: center; font-size: .62rem; }
  .pool-live-box { display: block; overflow-wrap: anywhere; font-size: .6rem; line-height: 1.45; }
  .pool-live-box .status-msg { display: block; margin-top: .25rem; }
  .canvas-wrapper { height: 125px; }
  .console-logs { height: 150px; font-size: .6rem; }
  .footer-bar { display: block; padding: .75rem .9rem; }
  .footer-left { display: block; }
  .footer-text, .lottery-odds { display: block; margin-top: .45rem; font-size: .6rem; line-height: 1.4; overflow-wrap: anywhere; }
  .modal-card { max-height: calc(100vh - 1.5rem); overflow-y: auto; padding: 1.25rem; gap: .75rem; }
  .modal-title { font-size: 1.1rem; letter-spacing: 1px; }
  .modal-sub { font-size: .75rem; }
  .reward-btc { font-size: 1.35rem; }
  .reward-usd { font-size: .68rem; }
}

@media (max-width: 380px) {
  .dashboard-wrapper { padding: .5rem; }
  .top-nav { grid-template-columns: 1fr; }
  .controls-group { justify-content: flex-start; }
  .market-ticker-group { grid-template-columns: 1fr 1fr; }
  .ticker-item:last-child { grid-column: 1 / -1; }
  .hero-hashrate-card { display: block; }
  .hero-right { display: none; }
  .stat-pill { font-size: .55rem; }
}
