:root {
  --red: #e50914;
  --red-dark: #b0060f;
  --gold: #f5c451;
  --peach: #fff3e6;
  --ink: #1b1b1f;
  --muted: #6b6b76;
  --line: #ececf1;
  --page: #f7f7fa;
  --card: #ffffff;
  --danger-bg: #fdecee;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--red); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.lang { color: var(--red); text-decoration: none; font-weight: 600; font-size: 14px; }
main { max-width: 480px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 0 0 8px; }
.card {
  background: var(--card); border-radius: 16px; padding: 16px; margin-top: 14px;
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.06); border: 1px solid var(--line);
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.small span[dir="ltr"] { white-space: nowrap; font-size: 12px; }
.strong { font-weight: 700; }
label { display: block; font-size: 14px; margin: 12px 0 4px; }
input[type="text"], input:not([type]), input[type="password"] {
  width: 100%; padding: 12px; font-size: 16px; border-radius: 12px; border: 1px solid #d6d6de; background: #fff;
}
input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
button, .button {
  font: inherit; cursor: pointer; border: 0; border-radius: 999px; padding: 13px 18px; width: 100%;
  display: block; text-align: center; text-decoration: none; margin-top: 14px;
}
.primary { background: linear-gradient(180deg, #ff2a35, var(--red)); color: #fff; font-weight: 700; }
.primary:disabled { background: #e3e3e8; color: #9a9aa5; cursor: not-allowed; }
.button { background: var(--peach); color: var(--red-dark); font-weight: 700; }
.link { background: none; color: var(--red); width: auto; padding: 6px 0; margin: 0; font-weight: 600; }
.error { color: var(--red-dark); background: var(--danger-bg); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.account { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.balance {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold), #ffd9a8); border: 0;
}
.balance .muted { color: #5a4310; flex: 1; }
.coin {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3b8, var(--gold) 55%, #c9971f);
  box-shadow: inset 0 0 0 2px #e2ac2c;
}
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pkg {
  margin: 0; padding: 12px 8px; border-radius: 14px; border: 2px solid var(--line); background: #fffaf4;
  color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%;
}
.pkg .amount { font-weight: 800; font-size: 17px; }
.pkg .unit { font-size: 12px; color: var(--muted); }
.pkg .price { margin-top: 4px; font-weight: 700; color: var(--red-dark); }
.pkg[aria-checked="true"] { border-color: var(--red); background: #fff1f1; }
.terms { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 15px; font-weight: 600; }
.terms input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.notice h2 { color: var(--ink); }
.danger { background: var(--danger-bg); border-color: #f6c7cc; }
.status { text-align: center; }
.status-icon { width: 56px; height: 56px; border-radius: 50%; margin: 12px auto; position: relative; }
.status-icon.pending { border: 4px solid #f3d6d8; border-top-color: var(--red); animation: spin 1s linear infinite; }
.status-icon.ok { background: #1f9d55; }
.status-icon.ok::after {
  content: ""; position: absolute; left: 19px; top: 12px; width: 12px; height: 22px;
  border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg);
}
.status-icon.bad, .status-icon.cancel { background: #9a9aa5; }
.status-icon.bad::after, .status-icon.cancel::after {
  content: ""; position: absolute; left: 14px; top: 25px; width: 28px; height: 5px; background: #fff; border-radius: 3px;
}
.status-icon.wait { background: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status-icon.pending { animation: none; } }
footer { text-align: center; padding: 20px 16px 28px; }
[hidden] { display: none !important; }
