/*
Theme Name: Ultra Landing
Theme URI: https://ultra.local
Author: Ultra Studio
Description: Original Rummy Ultra landing theme. Narrow app column, bonus claim, recommended row, ranked list, detail modals, FAQ, and a sticky download bar.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Text Domain: ultra-landing
*/

:root {
  --blue: #003a92;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f3f4f6;
  --line: #e5e7eb;
  --red: #dc2626;
  --green: #00b050;
  --col: 430px;
  --header: 92px;
  --sticky: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: var(--blue);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
}

body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.topbar {
  background: var(--blue);
  color: #fff;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  max-width: 920px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.brand-mark img,
.sticky-left .icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.subbar {
  background: #fff;
  border-bottom: 1px solid #eef0f3;
  min-height: 40px;
  display: flex;
  justify-content: center;
}

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
}

.tabs a,
.tabs button {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 16px 7px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: 15px;
}

.tabs a.is-current,
.tabs a:hover,
.tabs button:hover {
  border-bottom-color: #ff7a18;
}

.site-main {
  padding: calc(var(--header) + 8px) 12px 18px;
}

body.admin-bar .site-main { padding-top: calc(var(--header) + 40px); }

.page-title {
  max-width: 480px;
  margin: 8px auto 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
}

.sheet {
  width: min(var(--col), 100%);
  margin: 0 auto;
}

.hero {
  display: block;
  width: min(100%, 430px);
  margin: 0 auto 14px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

.hero-hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero svg,
.hero img { width: 100%; height: auto; }

.badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 14px;
}

.badge {
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  color: #fff;
  background: linear-gradient(#2b1247, #120a24);
}

.badge strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.badge small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  opacity: .95;
}

.claim {
  margin: 0 0 8px;
}

.official {
  margin: 0 0 16px;
  text-align: center;
  font-size: 14px;
  color: #334155;
}
.official a {
  color: #003a92;
  font-weight: 700;
}

.claim-btn,
.sticky-btn,
.dl-btn,
.primary-btn {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: .03em;
}

.claim-btn {
  border-radius: 12px;
  padding: 14px 18px;
  background: linear-gradient(45deg, #ff4c4c, #ff9c3c);
  box-shadow: 0 0 30px rgba(255, 120, 1, .9), 0 8px 20px rgba(0, 0, 0, .35);
  font-size: 15px;
}

.claim-btn:hover { filter: brightness(1.05); }

.guide { margin-top: 22px; }
.guide h2,
.faq h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
}

.guide-card,
.faq-item {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef0f4;
}

.guide-card {
  padding: 16px 18px 8px;
  color: #334155;
  font-size: 14px;
}
.guide-card p { margin: 0 0 10px; }
.guide-card h3 {
  margin: 2px 0 8px;
  font-size: 15px;
  line-height: 1.35;
  color: #0f172a;
}
.guide-card ol {
  margin: 0 0 10px;
  padding-left: 18px;
}
.guide-card ol.guide-steps {
  list-style: none;
  padding-left: 0;
}
.guide-card li { margin: 0 0 10px; }
.guide-card li strong { color: #0f172a; }

.faq { margin-top: 22px; }
.faq-item {
  background: #fff;
  border-radius: 14px;
  margin: 10px 0;
  border: 1px solid #eef0f4;
}

.faq-item h3 {
  margin: 0;
  padding: 16px 18px 0;
  font-size: 16px;
  line-height: 1.35;
}

.faq-item .answer {
  padding: 8px 18px 16px;
  color: #334155;
  font-size: 14px;
}
.faq-item .answer p { margin: 0 0 10px; }
.faq-item .answer p:last-child { margin-bottom: 0; }
.faq-item .answer h4 {
  margin: 2px 0 8px;
  font-size: 14px;
  line-height: 1.35;
  color: #0f172a;
}
.faq-item .answer ol,
.faq-item .answer ul {
  margin: 0 0 10px;
  padding-left: 18px;
}
.faq-item .answer li { margin: 0 0 8px; }

.fine-print {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.site-footer {
  background: var(--blue);
  color: #fff;
  padding: 22px 16px 28px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 14px;
}

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

.footer-copy {
  max-width: 760px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.55;
}
.footer-copy p { margin: 8px 0; }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, .96);
  color: #fff;
}

.sticky-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sticky-left .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
}

.sticky-left strong { display: block; font-size: 14px; }
.sticky-left span { display: block; font-size: 12px; color: #cbd5e1; }

.sticky-btn {
  width: auto;
  background: var(--green);
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 6px 16px rgba(0, 176, 80, .35);
}

.help-fab {
  position: fixed;
  right: 14px;
  bottom: 92px;
  z-index: 45;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 58, 146, .35);
}
.help-fab:hover { filter: brightness(1.08); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 70;
  display: none;
}
.overlay.open { display: block; }

.modal {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  width: min(520px, calc(100% - 24px));
  max-height: min(78vh, 720px);
  overflow: auto;
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 22px 20px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  display: none;
}
.modal.open { display: block; }

.modal h2 { margin: 0 36px 10px 0; font-size: 22px; }
.modal p, .modal li { font-size: 14px; color: #334155; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.app-modal-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.app-modal-head .icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  flex: none;
}

.stat-line { color: #15803d; font-weight: 700; font-size: 13px; }

.primary-btn {
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(45deg, #ff4c4c, #ff9c3c);
}

.page-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 28px 22px 32px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}
.page-wrap h1 { margin-top: 0; font-size: 32px; }
.page-wrap p, .page-wrap li { color: #334155; }

.form { display: grid; gap: 12px; margin-top: 12px; }
.form label { font-weight: 700; font-size: 14px; display: grid; gap: 6px; }
.form input, .form textarea {
  width: 100%;
  border: 1px solid #d6dbe3;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.form .hp { position: absolute; left: -9999px; }
.notice {
  background: #ecfdf3;
  color: #166534;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.notice.warn { background: #fff7ed; color: #9a3412; }

.icon svg { width: 100%; height: 100%; display: block; }

@media (max-width: 782px) {
  body.admin-bar .site-main { padding-top: calc(var(--header) + 54px); }
}

@media (max-width: 720px) {
  .help-fab { display: none; }
  .tabs a,
  .tabs button { padding: 8px 12px 7px; font-size: 14px; }
  .brand strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
