    :root {
  --bg-1: #dce7f3;
  --bg-2: #b9cbe0;
  --panel: #ffffff;
  --field: #f7f9fc;
  --field-2: #f3f7fb;
  --border: #dce4ee;
  --text: #1d2d3e;
  --muted: #697f95;
  --primary: #0f62ff;
  --primary-2: #0a5fe4;
  --primary-3: #0a52d4;
  --title: #0c2d4d;
  --button-1: #0d8bff;
  --button-2: #0c77f3;
  --shadow: rgba(12, 35, 66, 0.2);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Be Vietnam Pro', sans-serif;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  color: var(--text);
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  overflow-y: auto;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.68) contrast(1.02) saturate(0.78);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(15, 40, 71, 0.36), rgba(31, 73, 119, 0.16));
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
}

.page-shell {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 400px) minmax(160px, 1fr);
  gap: 24px;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 48px);
}

.app-card {
  width: 100%;
  grid-column: 2;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 24px 70px var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.side-tools {
  grid-column: 1;
  grid-row: 1;
  width: min(100%, 220px);
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(12, 35, 66, 0.18);
  backdrop-filter: blur(10px);
}

.side-panel {
  min-width: 0;
}

.side-tools .add-points-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.outcome-tools h3 {
  margin: 0;
  color: var(--title);
  font-size: 0.9rem;
}

.outcome-tools p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.outcome-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.outcome-buttons button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--title);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.outcome-buttons button[aria-pressed="true"] {
  border-color: var(--primary);
  background: #e1edff;
  color: var(--primary-3);
}

.brand-wrap {
  padding: 26px 24px 12px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(100%, 224px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(31, 98, 255, 0.12));
  margin: 0 auto;
}

.page-title {
  margin: 0;
  padding: 14px 12px;
  border-top: 1px solid rgba(128, 146, 164, 0.35);
  border-bottom: 1px solid rgba(128, 146, 164, 0.35);
  background: rgba(244, 246, 249, 0.62);
  font-size: clamp(1.2rem, 3.8vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: 0.015em;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  padding-top: 22px;
}

.login-error {
  min-height: 1.4em;
  margin: -4px 0 0;
  color: #c62828;
  font-size: 0.85rem;
  font-weight: 600;
}

.logout-button {
  align-self: flex-end;
  margin: 10px 28px 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.logout-button:hover {
  color: var(--primary);
}

.balance-panel {
  margin: 18px 28px 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f9ff, #eef5ff);
}

.balance-summary h3,
.history-section h3 {
  margin: 0;
  color: var(--title);
  font-size: 0.95rem;
  font-weight: 700;
}

.balance-summary p {
  margin: 6px 0 16px;
  color: var(--primary);
  font-size: 1.55rem;
  font-weight: 800;
}

.add-points-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.add-points-controls {
  display: flex;
  gap: 8px;
}

.add-points-controls input {
  min-width: 0;
  flex: 1;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

.add-points-controls button {
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #e1edff;
  color: var(--primary-3);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.history-section {
  padding: 0 28px 28px;
}

.history-section h3 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-empty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.history-entry {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.history-details,
.history-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.history-details {
  min-width: 0;
}

.history-details strong {
  overflow-wrap: anywhere;
}

.history-details time {
  color: var(--muted);
  font-size: 0.72rem;
}

.history-summary {
  flex-shrink: 0;
  align-items: flex-end;
}

.history-status {
  font-size: 0.72rem;
  font-weight: 700;
}

.history-status.is-success {
  color: #21834c;
}

.history-status.is-failed {
  color: #c62828;
}

.transfer-form {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 28px 28px;
}

.input-row {
  display: flex;
  align-items: center;
}

.input-row input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--field);
  padding: 14px 16px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text);
  font-family: 'Be Vietnam Pro', sans-serif;
  box-shadow: 0 2px 5px rgba(20, 43, 73, 0.025);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.input-row input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 98, 255, 0.1), 0 4px 12px rgba(20, 43, 73, 0.06);
}

.input-row input::placeholder {
  color: #718196;
  font-weight: 400;
}

.verify-box {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 13px;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  text-align: left;
  font: inherit;
  color: inherit;
}

.verify-box:hover {
  border-color: rgba(36, 118, 255, 0.5);
  background: rgba(250, 252, 255, 0.96);
}

.verify-box:focus-visible {
  outline: 3px solid rgba(15, 98, 255, 0.18);
  outline-offset: 2px;
}

.verify-box.is-verified {
  background: rgba(233, 247, 238, 0.96);
  border-color: rgba(42, 158, 94, 0.7);
}

.verify-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344b66;
  font-size: 0.78rem;
  min-height: 24px;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.checkbox {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid #7c8ea3;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.verify-box.is-verified .checkbox {
  background: linear-gradient(180deg, #2dc56d, #1fa75c);
  border-color: #1d9c5d;
  box-shadow: 0 0 0 2px rgba(45, 197, 109, 0.18);
}

.verify-box.is-verified .checkbox::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.verify-label {
  font-size: 0.78rem;
  font-weight: 500;
}

.verify-box.is-verified .verify-label {
  color: #1d5a39;
  font-weight: 700;
}

.cloudflare-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  color: #ea7b00;
  font-weight: 800;
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.cloudflare-mark small {
  display: block;
  color: #7a8ca0;
  font-size: 0.42rem;
  letter-spacing: 0;
  margin-top: 1px;
}

.cloudflare-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb44b, #ff7f00 70%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.52rem;
  margin-bottom: 2px;
  box-shadow: 0 3px 8px rgba(245, 128, 0, 0.25);
}

.bottom-bar {
  width: 100%;
  display: block;
  background: linear-gradient(135deg, #3478f6 0%, #155ee8 100%);
  color: white;
  text-align: center;
  padding: 14px 16px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 18px rgba(21, 94, 232, 0.22), inset 0 1px 0 rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 2px;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.bottom-bar:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 11px 22px rgba(21, 94, 232, 0.27), inset 0 1px 0 rgba(255,255,255,0.22);
}

.bottom-bar:active {
  transform: translateY(0);
}

.notice-dialog {
  width: min(100% - 32px, 380px);
  padding: 30px 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  text-align: center;
  box-shadow: 0 24px 80px rgba(12, 35, 66, 0.28);
  font-family: 'Be Vietnam Pro', sans-serif;
}

.notice-dialog[open] {
  animation: notice-appear 0.2s ease-out;
}

.notice-dialog::backdrop {
  background: rgba(11, 29, 52, 0.52);
  backdrop-filter: blur(5px);
}

.notice-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #edf4ff;
  color: var(--primary);
  font-size: 1.65rem;
  font-weight: 700;
}

.notice-title {
  margin: 0;
  color: var(--title);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.notice-message {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.notice-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #3478f6 0%, #155ee8 100%);
  box-shadow: 0 7px 16px rgba(21, 94, 232, 0.2);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.notice-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 20px rgba(21, 94, 232, 0.26);
}

.notice-button:focus-visible {
  outline: 3px solid rgba(15, 98, 255, 0.25);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .balance-panel {
    margin-right: 18px;
    margin-left: 18px;
  }

  .history-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .add-points-controls button {
    padding: 0 10px;
    font-size: 0.68rem;
  }
}

@media (max-width: 860px) {
  body {
    align-items: flex-start;
  }

  .page-shell {
    width: min(100%, 420px);
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
  }

  .app-card {
    order: 1;
  }

  .side-tools {
    order: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-height: 0;
    gap: 12px;
    padding: 0;
  }

  .side-tools .add-points-controls {
    gap: 6px;
  }

  .side-tools .add-points-controls input {
    width: 0;
    min-width: 0;
    padding: 8px;
  }

  .side-tools .add-points-controls button {
    min-height: 34px;
    padding: 0 6px;
    font-size: 0.62rem;
  }
}

@keyframes notice-appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .report-link {
    font-size: 15px;
  }

  .transfer-form {
    padding: 0 18px 20px;
  }

  .brand-wrap {
    padding-top: 22px;
  }

  .input-row input {
    font-size: 0.9rem;
  }

  .notice-dialog {
    padding: 26px 22px 20px;
  }
}

@media (max-width: 400px) {
  .side-tools {
    grid-template-columns: 1fr;
  }
}
