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

html, body {
  height: 100%;
}

body {
  background: #b0b0b0;
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: #111;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── HEADER ── */
#header {
  background: #1a1a8c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 3px solid #f0c000;
}

#header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rupee-icon { font-size: 1.6rem; }

#site-title {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 900;
  color: #f0c000;
  font-family: Georgia, serif;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  letter-spacing: -0.3px;
}

#header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.bullet { color: #f0c000; font-size: 0.6rem; }
.dot-item { color: #fff; }

#sold-box {
  background: #cc0000;
  color: #fff;
  border: 2px solid #ff6666;
  border-radius: 6px;
  padding: 6px 14px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 90px;
}

#sold-box strong { font-size: 1rem; color: #ffe066; }

/* ── NAVBAR ── */
#navbar {
  background: #f0c000;
  padding: 6px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  border-bottom: 2px solid #c8a000;
  color: #1a1a8c;
}

#navbar a {
  color: #1a1a8c;
  text-decoration: none;
  margin: 0 8px;
}

#navbar a:hover { text-decoration: underline; }

/* ── GRID AREA ── */
#grid-outer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 16px;
  background: #b0b0b0;
  flex: 1;
  min-height: 0;
}

#grid-wrapper {
  position: relative;
  cursor: crosshair;
  border: 2px solid #555;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.4);
  background: #fff;
  /* width & height set by JS */
}

#pixel-grid,
#hover-canvas {
  position: absolute;
  top: 0; left: 0;
  display: block;
}

#hover-canvas { z-index: 2; }

/* ── FOOTER ── */
#footer {
  background: #1a1a8c;
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.78rem;
  border-top: 3px solid #f0c000;
  margin-top: auto;
}

#footer a { color: #f0c000; font-weight: 700; text-decoration: none; }
#footer a:hover { text-decoration: underline; }

/* ── MODAL ── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

#modal {
  background: #fff;
  border-radius: 10px;
  padding: 24px 22px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  border-top: 4px solid #1a1a8c;
}

#modal h2 {
  color: #1a1a8c;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

#selection-info {
  color: #555;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

#modal label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 3px;
  margin-top: 2px;
}

.opt { font-weight: 400; color: #888; }

#modal input {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #f5f7fb;
  border: 1px solid #c8d0e0;
  border-radius: 5px;
  color: #111;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

#modal input:focus { border-color: #1a1a8c; }
#modal input::placeholder { color: #aaa; }

#amount-display {
  background: #fffbe6;
  border: 2px solid #f0c000;
  border-radius: 6px;
  padding: 9px;
  margin: 8px 0 12px;
  color: #1a1a8c;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

#pay-btn {
  width: 100%;
  padding: 11px;
  background: #cc0000;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}

#pay-btn:hover    { background: #aa0000; }
#pay-btn:disabled { background: #aaa; cursor: not-allowed; }

#modal-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
}

.note {
  font-size: 0.7rem;
  color: #888;
  margin-top: 8px;
  text-align: center;
}

/* ── TOOLTIP ── */
#tooltip {
  position: fixed;
  background: #1a1a8c;
  color: #fff;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 300;
  max-width: 220px;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hidden { display: none !important; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  #header       { padding: 8px 10px; }
  #header-meta  { display: none; }
  #site-title   { font-size: 1rem; }
  #navbar       { font-size: 0.75rem; }
  #navbar a     { margin: 0 4px; }
}

/* ── UPI BOX ── */
#upi-box {
  background: #f0f8ff;
  border: 2px solid #1a1a8c;
  border-radius: 8px;
  padding: 14px;
  margin: 10px 0 12px;
  text-align: center;
}

#upi-box p { font-size: 0.82rem; color: #555; margin-bottom: 6px; }

#upi-id {
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a1a8c;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

#upi-qr {
  display: block;
  margin: 0 auto 10px;
  width: 180px;
  height: 180px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.upi-note { font-size: 0.78rem; color: #333; margin-bottom: 6px; }
