@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@500;600;700;800&family=Mulish:wght@400;500;600;700;800&display=swap");

* { box-sizing: border-box; }

:root {
  --ink: #16273F;
  --body: #5B6675;
  --muted: #8791A0;
  --muted3: #98A2B0;
  --card-border: #EAEDF3;
  --btn-border: #E4E8EF;
  --red: #E8402A;
  --link: #2F6FE0;
}

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Mulish", system-ui, sans-serif;
  color: var(--body);
  background: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
body.auth-pending .app-shell { display: none; }

.app-shell .rm-header-inner,
.app-shell .rm-footer-inner { max-width: 90%; }

@keyframes pxFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------- Hero ------------------------------- */
.px-hero-inner { max-width: 90%; margin: 0 auto; padding: 32px 32px 8px; }
.px-title {
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0 0 6px;
}
.px-subtitle { font-size: 15.5px; color: var(--muted); margin: 0; }

/* ------------------------------- Main / sections ------------------------------- */
.px-main {
  flex: 1;
  max-width: 90%;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.px-section { animation: pxFadeUp 0.3s ease both; }
.px-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.px-section-title { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 20px; color: var(--ink); margin: 0; }
.px-count { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 12px; color: var(--muted); background: var(--card-border); border-radius: 999px; padding: 3px 11px; }

.px-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

/* ------------------------------- Card ------------------------------- */
.px-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(18, 38, 63, 0.05);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.px-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.px-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.px-badge {
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-radius: 7px;
  padding: 4px 11px;
  white-space: nowrap;
}
.px-badge--extension { color: #2F6FE0; background: #EAF1FC; }
.px-badge--plugin { color: #7A5AF0; background: #F1EEFC; }
.px-name { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 18px; color: var(--ink); margin: 18px 0 0; letter-spacing: -0.2px; }
.px-platform { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 12.5px; color: var(--muted3); margin-top: 4px; }
.px-desc { font-family: "Mulish", sans-serif; font-size: 14px; line-height: 1.6; color: var(--body); margin: 12px 0 0; flex: 1; }

.px-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.px-cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}
.px-cta:hover { filter: brightness(0.94); color: #fff; }
.px-secondary {
  display: inline-block;
  margin-top: 12px;
  font-family: "Lexend", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #7A5AF0;
  text-decoration: none;
}
.px-secondary:hover { text-decoration: underline; }
.px-details {
  font-family: "Lexend", sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--body);
  background: #fff;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  padding: 10px 16px;
}
.px-details:hover { border-color: #C7D0DE; color: var(--ink); }

/* ------------------------------- Details dialog --------------------------- */
body.px-modal-open { overflow: hidden; }
.px-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.px-modal-backdrop { position: absolute; inset: 0; background: rgba(18, 38, 63, 0.45); }
.px-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(18, 38, 63, 0.28);
  padding: 26px 28px 28px;
}
.px-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px; line-height: 1;
  font-size: 22px; color: var(--muted);
  background: #fff; border: 1px solid var(--btn-border); border-radius: 9px;
}
.px-modal-close:hover { border-color: #C7D0DE; color: var(--ink); }
.px-modal-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.px-modal-head .px-name { font-size: 20px; }
.px-guide { margin-top: 20px; }
.px-guide-h {
  font-family: "Lexend", sans-serif; font-weight: 700; font-size: 14px;
  color: var(--ink); margin: 0 0 8px;
}
.px-guide-steps { margin: 0; padding-left: 20px; }
.px-guide-steps li {
  font-family: "Mulish", sans-serif; font-size: 14px; line-height: 1.55;
  color: var(--body); margin-bottom: 7px;
}
.px-guide-note {
  font-family: "Mulish", sans-serif; font-size: 13.5px; line-height: 1.55;
  color: var(--body); margin: 0;
  background: #F6F4FD; border: 1px solid #E7E1F8; border-radius: 10px; padding: 12px 14px;
}
.px-modal-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.px-modal-actions .px-cta { flex: 0 0 auto; }
.px-modal-actions .px-secondary { margin-top: 0; }

/* ------------------------------- Responsive ------------------------------- */
@media (max-width: 1100px) {
  .px-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .px-grid { grid-template-columns: 1fr; }
  .px-hero-inner, .px-main { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .px-section { animation: none; }
}
