:root {
  --bg-dark: #0a0a0f; --bg-card: #12121a; --bg-card-hover: #1a1a25;
  --border: #1e1e2e; --border-bright: #2a2a3e;
  --text: #e2e2ef; --text-dim: #6b6b82; --text-muted: #44445a;
  --accent: #00ff88; --accent-dim: #00ff8830; --accent-glow: #00ff8815;
  --orange: #ff8c00; --orange-dim: #ff8c0030;
  --red: #ff3366; --red-dim: #ff336630;
  --blue: #3388ff; --blue-dim: #3388ff30; --yellow: #ffd000;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg-dark); color: var(--text); font-family: 'Outfit', sans-serif; min-height: 100vh; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 0%, var(--accent-glow) 0%, transparent 50%), radial-gradient(ellipse at 80% 100%, #3388ff08 0%, transparent 50%);
  pointer-events: none; z-index: 0; }
.container { max-width: 1400px; margin: 0 auto; padding: 20px; position: relative; z-index: 1; }
.header { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.header-left { display: flex; align-items: center; gap: 14px; }
.logo { width: 42px; height: 42px; background: linear-gradient(135deg, var(--accent), #00aa55); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--bg-dark); box-shadow: 0 0 20px var(--accent-dim); }
.title { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.title span { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 16px; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--accent); } 50% { opacity: 0.5; box-shadow: 0 0 12px var(--accent); } }
.connect-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--bg-dark); font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; padding: 8px 18px; border: none; border-radius: 8px; cursor: pointer; text-decoration: none; transition: all 0.15s; box-shadow: 0 0 16px var(--accent-dim); letter-spacing: 0.3px; }
.connect-btn:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 0 24px var(--accent-dim); }
.connect-btn svg { width: 14px; height: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; transition: all 0.2s ease; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); opacity: 0.4; }
.stat-card:nth-child(2)::before { background: var(--orange); }
.stat-card:nth-child(3)::before { background: var(--blue); }
.stat-card:nth-child(4)::before { background: var(--yellow); }
.stat-card:hover { border-color: var(--border-bright); background: var(--bg-card-hover); }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-value .unit { font-size: 14px; font-weight: 400; color: var(--text-dim); margin-left: 4px; }
.stat-sub { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.network-bar { display: flex; gap: 24px; padding: 14px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 28px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-dim); flex-wrap: wrap; }
.network-item { display: flex; align-items: center; gap: 8px; }
.network-label { color: var(--text-muted); }
.network-value { color: var(--text); font-weight: 500; }
.content-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; margin-bottom: 28px; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; }
.panel-title { font-size: 14px; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }
.panel-badge { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--accent-dim); color: var(--accent); flex-shrink: 0; }
.panel-badge.orange { background: var(--orange-dim); color: var(--orange); }
.search-input { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--bg-dark); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; outline: none; width: 160px; transition: border-color 0.2s; }
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); }
.rig-table { width: 100%; border-collapse: collapse; }
.rig-table th { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.rig-table td { font-family: 'JetBrains Mono', monospace; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid #15151f; color: var(--text); }
.rig-table tr:hover td { background: #15151f; }
.rig-name { display: flex; align-items: center; gap: 8px; }
.rig-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.rig-dot.offline { background: var(--red); }
.block-row { display: flex; align-items: center; padding: 10px 20px; border-bottom: 1px solid #15151f; font-family: 'JetBrains Mono', monospace; font-size: 12px; gap: 12px; transition: background 0.15s; }
.block-row:hover { background: #15151f; }
.block-height { color: var(--accent); font-weight: 600; min-width: 80px; }
.block-height a { color: var(--accent); text-decoration: none; }
.block-height a:hover { color: #66ffbb; text-decoration: underline; }
.block-time { color: var(--text-muted); min-width: 70px; text-align: right; }
.chart-container { padding: 16px 20px; height: 200px; position: relative; }
.chart-canvas { width: 100%; height: 100%; }
.full-panel { margin-bottom: 28px; }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; }
.payout-bar { display: flex; gap: 24px; padding: 14px 20px; border-bottom: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 12px; flex-wrap: wrap; }
.payout-item { display: flex; align-items: center; gap: 8px; }
.payout-label { color: var(--text-muted); }
.payout-val { color: var(--accent); font-weight: 600; }
.payout-unit { color: var(--text-muted); font-size: 10px; }
.admin-btn { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--bg-dark); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 14px; cursor: pointer; transition: all 0.2s; }
.admin-btn:hover { border-color: var(--accent); color: var(--accent); }
.setting-item { display: flex; align-items: center; gap: 8px; }
.setting-item label { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); min-width: 120px; }
@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .content-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header { flex-direction: column; gap: 12px; align-items: stretch; }
  .header-left { justify-content: center; }
  .header-right { flex-wrap: wrap; justify-content: center; gap: 10px; }   /* кнопки переносятся, не съезжают */
  .connect-btn, .admin-btn { font-size: 12px; padding: 7px 13px; }
  .header-right .connect-btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; }  /* равная ширина */
  .header-right #headerPriceBox { flex: 1 1 100%; justify-content: center; }  /* прайс — отдельной строкой */
  .search-input { width: 120px; }
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
@keyframes flashGreen { 0% { background: var(--accent-dim); } 100% { background: transparent; } }
.block-row.new { animation: flashGreen 2s ease-out; }
