:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #0f172a;
}

/* Page + background */
.cp-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 24px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(14,165,233,.45), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(99,102,241,.45), transparent 60%),
              linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
}
.cp-page.has-bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.cp-page.has-bg::before {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.55), rgba(15,23,42,.8));
}
.cp-shell { position: relative; width: 100%; max-width: 420px; }

/* Card */
.cp-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(2,6,23,.45);
  overflow: hidden;
}
.cp-head { text-align: center; padding: 28px 24px 8px; }
.cp-logo {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), #0ea5e9);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(37,99,235,.6);
}
.cp-logo.has-img { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; }
.cp-logo.has-img img { max-height: 76px; max-width: 220px; display: block; }
.cp-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; color: var(--ink); }
.cp-head p { color: var(--muted); font-size: .92rem; margin: 0; }
.cp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600;
  color: #047857; background: #ecfdf5;
  border-radius: 999px; padding: 4px 10px; margin-bottom: 12px;
}
.cp-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.cp-body { padding: 18px 24px 24px; }

/* Fields */
.cp-label { display: block; font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: 6px; }
.cp-label .opt { font-weight: 500; color: var(--muted); }
.cp-field {
  display: flex; align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color .15s, box-shadow .15s, background .15s;
  margin-bottom: 14px;
}
.cp-field:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.cp-field .ico, .cp-field .eye { width: 44px; flex: 0 0 44px; display: flex; justify-content: center; color: #94a3b8; }
.cp-field .eye { cursor: pointer; background: none; border: 0; padding: 0; height: 44px; align-items: center; }
.cp-field .eye:focus { outline: 0; color: var(--brand); }
.cp-field .prefix {
  font-weight: 600; color: #334155; padding-right: 10px; margin-right: 10px;
  border-right: 1px solid var(--line); font-size: .95rem;
}
.cp-field input {
  flex: 1; border: 0; outline: 0; background: transparent; box-shadow: none;
  height: 48px; font-size: 1rem; color: var(--ink); padding: 0 14px 0 0; min-width: 0; width: 100%;
}
.cp-field input::placeholder { color: #94a3b8; opacity: 1; }
.cp-field.no-ico input { padding-left: 14px; }
.cp-hint { font-size: .78rem; color: var(--muted); margin: -8px 0 14px; }

.cp-check { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: #475569; margin: 4px 0 16px; cursor: pointer; }
.cp-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); flex: 0 0 auto; }
.cp-check a { color: var(--brand) !important; font-weight: 600; cursor: pointer; }

/* Buttons */
.cp-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 50px; border: 0; border-radius: 12px; padding: 0 14px;
  font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none !important;
  transition: transform .05s, box-shadow .15s, background .15s, color .15s;
}
.cp-btn:active { transform: translateY(1px); }
.cp-btn:focus { outline: 0; }
.cp-btn-primary { color: #fff !important; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: 0 10px 20px -8px rgba(37,99,235,.7); }
.cp-btn-primary:hover { box-shadow: 0 12px 24px -8px rgba(37,99,235,.85); }
.cp-btn-ghost { color: #334155 !important; background: #fff; border: 1.5px solid var(--line); height: 46px; font-size: .88rem; gap: 6px; padding: 0 8px; white-space: nowrap; }
.cp-btn-ghost:hover { color: var(--brand) !important; border-color: #bfdbfe; background: #eff6ff; }
.cp-stack { display: grid; gap: 10px; }
.cp-divider { display: flex; align-items: center; gap: 12px; color: #94a3b8; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 14px; }
.cp-divider::before, .cp-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cp-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-alt > :only-child { grid-column: 1 / -1; }
.cp-links { text-align: center; margin-top: 14px; font-size: .85rem; }
.cp-links a { color: var(--brand); font-weight: 600; }

/* Alerts */
.cp-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: .85rem; margin-bottom: 16px; text-align: left; }
.cp-alert svg { flex: 0 0 auto; margin-top: 1px; }
.cp-alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.cp-alert-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.cp-alert-bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Status blocks */
.cp-status { text-align: center; padding: 6px 0 4px; }
.cp-status-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.cp-status-icon.ok { background: #ecfdf5; color: #059669; }
.cp-status-icon.bad { background: #fef2f2; color: #dc2626; }
.cp-status-icon.warn { background: #fffbeb; color: #d97706; }
.cp-status h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.cp-status p { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.cp-chip { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .12em;
  background: #eff6ff; color: var(--brand-dark); border: 1.5px dashed #93c5fd; border-radius: 12px; padding: 10px 16px; margin-bottom: 18px; word-break: break-all; }
.cp-spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: cpspin .8s linear infinite; }
@keyframes cpspin { to { transform: rotate(360deg); } }
.cp-progress { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 4px 0 18px; }
.cp-progress span { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, var(--brand), #0ea5e9); border-radius: 999px; animation: cpbar 1.6s ease-in-out infinite; }
@keyframes cpbar { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

/* OTP */
.cp-otp-note { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.cp-otp-note strong { color: var(--ink); }
.cp-otp { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.cp-otp input {
  width: 56px; height: 60px; text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px; background: #f8fafc; outline: 0; padding: 0;
}
.cp-otp input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }

/* Ads carousel */
.cp-ads { margin-top: 18px; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px -16px rgba(2,6,23,.6); background: #0b1220; }
.cp-ads .carousel-item img { display: block; width: 100%; height: auto; }
.cp-ads .carousel-indicators { margin-bottom: 8px; }
.cp-ads .carousel-indicators li { width: 8px; height: 8px; border-radius: 50%; border: 0; margin: 0 4px; }

.cp-foot { text-align: center; color: rgba(255,255,255,.6); font-size: .75rem; margin-top: 18px; }
.cp-foot svg { margin-right: 4px; vertical-align: -2px; }

/* Modals */
.cp-modal .modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 60px -12px rgba(2,6,23,.45); color: var(--ink); }
.cp-modal .modal-dialog { max-width: 400px; margin: 18vh auto 1.5rem; padding: 0 16px; }
.cp-modal .modal-body { padding: 24px; }
.cp-modal-icon { width: 56px; height: 56px; border-radius: 16px; margin: 4px auto 14px; display: flex; align-items: center; justify-content: center; background: #eff6ff; color: var(--brand); }
.cp-modal h5 { font-weight: 700; margin-bottom: 6px; text-align: center; }
.cp-modal .num { font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; margin: 10px 0 6px; text-align: center; color: var(--ink); }
.cp-modal .sub { color: var(--muted); font-size: .88rem; text-align: center; }
.cp-modal .row-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 20px; }
.cp-modal .terms { max-height: 50vh; overflow-y: auto; color: #475569; font-size: .9rem; text-align: left; }
.modal-backdrop.show { opacity: .6; }

/* Full-screen overlay ad */
.logoformSkip {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1060;
  background-color: #0f172a;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}
.logoformSkip #close-btn {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 388px;
  background: #fff; color: var(--ink);
  box-shadow: 0 12px 24px -10px rgba(0,0,0,.6);
}
