body {
  font-family: Arial, Helvetica, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  text-align: center;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
h1 { margin: 20px 0 10px; color: #60a5fa; font-size: 2.2em; }
h2 { color: #94a3b8; margin: 20px 0 10px; }
h3 { color: #cbd5e1; margin: 15px 0 8px; }
.tabs button {
  padding: 12px 24px;
  margin: 6px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.05em;
  transition: all 0.2s;
  min-width: 100px;
  touch-action: manipulation;
}
.tabs button:hover { background: #334155; }
.tabs button.active { background: #3b82f6; font-weight: bold; }
.section { display: none; padding: 0 10px; }
.section.active { display: block; }
table {
  margin: 20px auto;
  border-collapse: collapse;
  width: 96%;
  max-width: 1200px;
  background: #0f172a;
}
th, td {
  border: 1px solid #334155;
  padding: 12px;
  text-align: right;
  white-space: nowrap;
}
th { background: #1e293b; color: #94a3b8; }
td { background: #020617; }
button.action {
  padding: 10px 16px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 4px;
  min-width: 80px;
  touch-action: manipulation;
}
button.action:hover { background: #334155; }
.plus { color: #22c55e; }
.minus { color: #ef4444; }
.coin-name { color: #60a5fa; cursor: pointer; font-weight: bold; }
.chartRow { background: #020617; padding: 15px; }
canvas {
  background: #020617;
  border-radius: 10px;
  margin: 15px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  max-width: 100%;
  height: auto;
}
#newsFeed {
  margin: 15px auto;
  width: 90%;
  max-width: 900px;
  max-height: 180px;
  overflow-y: auto;
  background: #1e293b;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  font-size: 0.95em;
}
#loanSection, #bankInfo, #propInfo {
  margin: 20px auto;
  width: 90%;
  max-width: 900px;
  padding: 15px;
  background: #334155;
  border-radius: 10px;
}
#miningShop, #miningOwned {
  margin: 20px auto;
  width: 90%;
  max-width: 900px;
  padding: 15px;
  background: #334155;
  border-radius: 10px;
}
#startScreen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#startBox {
  background: #1e293b;
  padding: 50px 40px;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}
input[type="text"], input[type="number"] {
  font-size: 1.15em;
  padding: 12px;
  margin: 10px;
  width: 80%;
  max-width: 320px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: white;
  box-sizing: border-box;
}
.qtyInput { width: 100px; text-align: center; }
#sortSelect {
  padding: 10px;
  background: #1e293b;
  color: white;
  border: 1px solid #334155;
  border-radius: 8px;
  margin: 15px;
  font-size: 1.05em;
}
.mining-rate { font-size: 0.9em; color: #64748b; }
/* Mobile improvements */
@media (max-width: 768px) {
  h1 { font-size: 1.8em; margin: 15px 0 8px; }
  .tabs { display: flex; flex-wrap: wrap; justify-content: center; }
  .tabs button { padding: 10px 16px; margin: 4px; font-size: 0.95em; min-width: 80px; }
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { position: absolute; top: -9999px; left: -9999px; }
  tr { border: 1px solid #334155; margin-bottom: 12px; border-radius: 8px; }
  td {
    border: none;
    border-bottom: 1px solid #334155;
    position: relative;
    padding-left: 50%;
    text-align: left;
    white-space: normal;
  }
  td:before {
    position: absolute;
    top: 12px; left: 12px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    color: #94a3b8;
    font-weight: bold;
  }
  td:first-child { border-top-left-radius: 8px; border-top-right-radius: 8px; }
  td:last-child { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
  .section { padding: 0 8px; }
  input, button.action { font-size: 1.1em; padding: 12px; }
  canvas { width: 100% !important; height: auto !important; }
}