* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #130f24;
  color: #fff;
}
.app {
  max-width: 1100px;
  margin: auto;
  padding: 16px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
h1 {
  color: #ffd36a;
  margin: 8px 0;
}
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
a,
.linkbtn {
  color: #fff;
  text-decoration: none;
  background: #2a2447;
  border: 0;
  border-radius: 999px;
  padding: 10px 13px;
  cursor: pointer;
}
.card,
.hero,
.stat,
.scratch-card {
  background: linear-gradient(160deg, #211a3d, #17122b);
  border: 1px solid #3a315f;
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.center {
  max-width: 430px;
  margin: 40px auto;
  text-align: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.hero {
  background: linear-gradient(120deg, #5c2bd6, #e5508d);
}
.coins {
  font-size: 42px;
  font-weight: 800;
  margin: 0;
  color: #fff7b7;
}
input,
select,
button {
  width: 100%;
  padding: 12px;
  margin: 7px 0;
  border-radius: 12px;
  border: 1px solid #554b79;
  background: #100c20;
  color: #fff;
}
button,
.button {
  display: inline-block;
  background: linear-gradient(90deg, #ffbb38, #ff6b6b);
  border: 0;
  color: #15101f;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}
.danger {
  background: #ff4d4d;
  color: #fff;
}
.err {
  color: #ff8b8b;
}
.ok {
  color: #78ffad;
}
.msg {
  background: #fff7b7;
  color: #191222;
  padding: 12px;
  border-radius: 12px;
}
.note {
  background: #2d2550;
  padding: 10px;
  border-radius: 12px;
}
.note small {
  display: block;
  color: #bbb;
  margin-top: 4px;
}
.ticket,
.result-card {
  border: 2px dashed #ffd36a;
  border-radius: 18px;
  background: radial-gradient(circle, #ffef9b, #f6a623);
  color: #2b1800;
  padding: 28px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
}
.promo {
  display: inline-block;
  background: #7dffba;
  color: #092b18;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}
.price {
  font-size: 28px;
  color: #ffd36a;
  font-weight: 800;
}
.qr {
  width: 100%;
  max-width: 220px;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
}
.big {
  max-width: 320px;
}
table {
  width: 100%;
  border-collapse: collapse;
  overflow: auto;
  display: block;
}
th,
td {
  border-bottom: 1px solid #3a315f;
  padding: 10px;
  text-align: left;
  min-width: 110px;
}
.inline {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.inline input,
.inline button,
.inline select {
  width: auto;
  min-width: 90px;
}
.status {
  padding: 5px 9px;
  border-radius: 999px;
  background: #555;
}
.approved {
  background: #108b4a;
}
.rejected {
  background: #943333;
}
.pending {
  background: #8b6d10;
}
@media (max-width: 700px) {
  header {
    display: block;
  }
  nav a,
  nav form,
  nav button {
    width: 100%;
    display: block;
    text-align: center;
  }
  .inline {
    display: block;
  }
  .inline input,
  .inline button {
    width: 100%;
  }
  .coins {
    font-size: 32px;
  }
}
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  nav a {
    font-size: 14px;
    padding: 10px 12px;
  }

  .hero {
    padding: 24px 18px;
  }

  .hero h1,
  .hero h2 {
    font-size: 26px;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }

  .card {
    padding: 18px;
    overflow-x: auto;
  }

  input,
  select,
  button {
    width: 100%;
    font-size: 16px;
  }

  table {
    min-width: 650px;
  }

  .scratch-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .scratch-box {
    height: 105px !important;
  }

  .ticket {
    font-size: 22px;
    padding: 24px 12px;
  }
}
