.srs-app{
  --srs-asphalt:#3a3a3c;
  --srs-cream:#f4efe2;
  --srs-ink:#22261f;
  --srs-accent:#e8623a;
  --srs-accent-dark:#c94f2b;
  --srs-gauge:#f4efe2;

  display: block;
  max-width: 720px;
  margin: 0 auto;
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  color: var(--srs-cream);
  background: linear-gradient(180deg, #1b1d17, #22261f 60%);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  user-select: none;
  touch-action: manipulation;
  line-height: 1.4;
}
.srs-app *{
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.srs-app ul{ list-style: none; }
.srs-app h1, .srs-app h2, .srs-app h3{ font-size: inherit; }

.srs-app .srs-header{
  padding: 14px 16px 6px;
  text-align: center;
}
.srs-app .srs-title{
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--srs-cream);
  font-weight: bold;
}
.srs-app .srs-subtitle{
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c7ccb8;
  margin-top: 2px;
}

.srs-app .srs-hud{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 12px 0;
  font-family: 'Courier New', monospace;
}
.srs-app .srs-hud-block{ text-align: center; flex: 1; min-width: 0; }
.srs-app .srs-hud-label{
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9aa08a;
  white-space: nowrap;
}
.srs-app .srs-hud-value{
  font-size: 20px;
  font-weight: bold;
  color: var(--srs-gauge);
  line-height: 1.1;
  white-space: nowrap;
}
.srs-app .srs-hud-value span{ font-size: 10px; color: #9aa08a; }
.srs-app #srsTimerBlock .srs-hud-value{ color: var(--srs-accent); }

.srs-app .srs-canvas-wrap{
  position: relative;
  margin: 10px 12px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45), inset 0 0 0 3px #12140f;
  background: #000;
}
.srs-app canvas{ display: block; width: 100%; height: auto; }

.srs-app .srs-overlay{
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,12,8,0.82);
  text-align: center;
  padding: 20px;
  gap: 10px;
}
.srs-app .srs-overlay.srs-hidden{ display: none; }
.srs-app .srs-overlay-title{
  font-family: Georgia, serif;
  font-size: 24px;
  margin: 0;
  color: var(--srs-cream);
  font-weight: bold;
}
.srs-app .srs-overlay-text{
  margin: 0;
  font-size: 14px;
  color: #c7ccb8;
  max-width: 320px;
  line-height: 1.5;
}
.srs-app .srs-big-btn{
  margin-top: 6px;
  padding: 14px 34px;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 1px;
  border: none;
  border-radius: 10px;
  background: var(--srs-accent);
  color: #fff;
  box-shadow: 0 4px 0 var(--srs-accent-dark);
  cursor: pointer;
  text-transform: uppercase;
}
.srs-app .srs-big-btn:active{ transform: translateY(3px); box-shadow: 0 1px 0 var(--srs-accent-dark); }

.srs-app .srs-gas-overlay{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  height: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, rgba(232,98,58,0.88), rgba(201,79,43,0.94));
  box-shadow: 0 -2px 0 rgba(0,0,0,0.25) inset, 0 -6px 20px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: background .1s;
}
.srs-app .srs-gas-overlay:active{
  background: linear-gradient(180deg, rgba(201,79,43,0.92), rgba(180,66,34,0.96));
}

.srs-app .srs-leaderboard{ padding: 0 18px 20px; }
.srs-app .srs-leaderboard h3{
  font-family: Georgia, serif;
  font-size: 16px;
  color: var(--srs-cream);
  border-bottom: 1px solid #3a3d31;
  padding-bottom: 6px;
  margin-bottom: 8px;
  font-weight: bold;
}
.srs-app .srs-board-list{
  list-style: none;
  margin: 0; padding: 0;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}
.srs-app .srs-board-list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px;
  border-bottom: 1px dashed #33362a;
  border-radius: 6px;
  transition: background .3s;
}
.srs-app .srs-board-list li .srs-rank{ color: var(--srs-accent); font-weight: bold; width: 22px; flex-shrink: 0; }
.srs-app .srs-board-list li .srs-nm{ flex: 1; color: var(--srs-cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 6px; }
.srs-app .srs-board-list li .srs-stats{ text-align: right; flex-shrink: 0; }
.srs-app .srs-board-list li .srs-stat-dist{ display: block; color: var(--srs-gauge); font-weight: bold; }
.srs-app .srs-board-list li .srs-stat-sub{ display: block; color: #9aa08a; font-size: 10px; }
.srs-app .srs-board-list li.srs-empty{ color: #7a806c; justify-content: center; font-style: italic; border-bottom: none; }
.srs-app .srs-board-list li.srs-highlight{
  background: rgba(232, 98, 58, 0.18);
  border-bottom-color: rgba(232, 98, 58, 0.4);
}
.srs-app .srs-board-list li.srs-highlight .srs-nm{ color: var(--srs-accent); font-weight: bold; }

.srs-app .srs-name-form{
  display: flex;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
  max-width: 300px;
}
.srs-app .srs-name-form input{
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  background: var(--srs-cream);
  color: var(--srs-ink);
}
.srs-app .srs-name-form button{
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--srs-accent);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.srs-app .srs-footer{
  text-align: center;
  font-size: 10px;
  color: #5f6552;
  padding: 6px 16px 18px;
  letter-spacing: 1px;
}

/* Extra breathing room on very small phones */
@media (max-width: 380px) {
  .srs-app .srs-hud-value{ font-size: 16px; }
  .srs-app .srs-hud-label{ font-size: 8px; letter-spacing: 0.5px; }
  .srs-app .srs-title{ font-size: 22px; }
  .srs-app .srs-gas-overlay{ font-size: 16px; letter-spacing: 2px; }
}
