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

:root {
  --ink: #0b1220;
  --ink-soft: #132033;
  --surface: #f2f5f7;
  --surface-deep: #e6edf1;
  --text: #142033;
  --text-muted: #5a6b7d;
  --cyan: #2dd4bf;
  --sky: #38bdf8;
  --accent: #0d9488;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --line: rgba(20, 32, 51, 0.08);
  --nav-height: 72px;
  --page-pad: clamp(20px, 4vw, 40px);
  --content: 920px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --font-body: var(--font);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-height) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(242, 245, 247, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}

.navbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 var(--page-pad);
  padding-left: calc(var(--page-pad) + var(--safe-left));
  padding-right: calc(var(--page-pad) + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  border-radius: 9px;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 2px;
}

.brand-primary {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding:
    calc(var(--nav-height) + var(--safe-top) + clamp(36px, 6vh, 72px))
    var(--page-pad)
    clamp(56px, 8vh, 88px);
  padding-left: calc(var(--page-pad) + var(--safe-left));
  padding-right: calc(var(--page-pad) + var(--safe-right));
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-base {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, #061018 0%, #0b1a28 40%, #0a2532 70%, #071820 100%);
}

.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.hero-bg-orb--a {
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  top: 8%;
  left: 8%;
  background: rgba(45, 212, 191, 0.18);
}

.hero-bg-orb--b {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  right: 4%;
  bottom: 12%;
  background: rgba(56, 189, 248, 0.14);
}

.hero-bg-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(45, 212, 191, 0.2), transparent 35%),
    radial-gradient(circle at 78% 62%, rgba(56, 189, 248, 0.16), transparent 40%),
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 15%, transparent 78%);
}

.hero-bg-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(45, 212, 191, 0.045) 48%,
    transparent 52%,
    transparent 100%
  );
  background-size: 100% 220%;
  opacity: 0.7;
  pointer-events: none;
}

.hero-bg-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 36% at 50% 40%, rgba(45, 212, 191, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 28% 22% at 70% 70%, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bg-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(7, 16, 24, 0.55), transparent);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-bg-scan {
    animation: scan-drift 10s linear infinite;
  }

  .hero-bg-orb--a {
    animation: orb-float 14s ease-in-out infinite alternate;
  }

  .hero-bg-orb--b {
    animation: orb-float 18s ease-in-out infinite alternate-reverse;
  }

  .wave-path {
    animation: wave-shift 18s ease-in-out infinite alternate;
  }

  .wave-path--2 {
    animation-duration: 22s;
    animation-delay: -4s;
  }

  .wave-path--3 {
    animation-duration: 26s;
    animation-delay: -8s;
  }

  .node {
    animation: node-pulse 3.6s ease-in-out infinite;
  }

  .node:nth-child(2) { animation-delay: 0.4s; }
  .node:nth-child(3) { animation-delay: 0.8s; }
  .node:nth-child(4) { animation-delay: 1.2s; }
  .node:nth-child(5) { animation-delay: 1.6s; }

  .hero-content > * {
    animation: rise-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-brand { animation-delay: 0.05s; }
  .hero-product-full { animation-delay: 0.12s; }
  .hero-title { animation-delay: 0.2s; }
  .hero-desc { animation-delay: 0.28s; }
  .cta-group { animation-delay: 0.38s; }
  .version-info { animation-delay: 0.48s; }
}

@keyframes scan-drift {
  from { background-position: 0 -40%; }
  to { background-position: 0 140%; }
}

@keyframes wave-shift {
  from { transform: translateY(0); opacity: 0.55; }
  to { transform: translateY(-10px); opacity: 0.85; }
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes orb-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -18px, 0) scale(1.06); }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: min(100%, 820px);
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(42px, 9vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 10px 48px rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, #ffffff 20%, rgba(180, 245, 235, 0.92) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-product-full {
  font-size: clamp(11px, 2.2vw, 14px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: clamp(20px, 3vh, 28px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 34px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  line-height: 1.35;
  text-wrap: balance;
}

.hero-desc {
  font-size: clamp(13px, 2.2vw, 15px);
  color: rgba(255, 255, 255, 0.62);
  margin: 0 auto clamp(32px, 5vh, 44px);
  letter-spacing: 0.01em;
  line-height: 1.7;
  max-width: 36em;
  text-wrap: pretty;
}

/* ── CTA ── */
.cta-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  justify-content: center;
  gap: 14px;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 18px;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer;
  text-align: left;
  border: 1px solid transparent;
}

.btn-download--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.btn-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.btn-download--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-download.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-icon-wrap {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.btn-download--secondary .btn-icon-wrap {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-icon {
  width: 22px;
  height: 22px;
}

.btn-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.btn-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.55;
  text-transform: uppercase;
}

.btn-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.btn-meta {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-info {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.03em;
  line-height: 1.5;
}

/* ── Sections ── */
.section-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.035em;
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: clamp(28px, 4vw, 40px);
  max-width: 38em;
}

.stack,
.platforms-section,
.changelog {
  padding: clamp(64px, 10vw, 112px) var(--page-pad);
  padding-left: calc(var(--page-pad) + var(--safe-left));
  padding-right: calc(var(--page-pad) + var(--safe-right));
}

.stack {
  background: #fff;
}

.stack-inner,
.platforms-inner,
.changelog-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.stack-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stack-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 148, 136, 0.03), transparent 48%),
    #fff;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.stack-item:hover {
  border-color: rgba(13, 148, 136, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 18, 32, 0.05);
}

.stack-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.stack-value {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.platforms-section {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(13, 148, 136, 0.06), transparent 60%),
    var(--surface-deep);
}

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

.platform {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.platform-icon svg {
  width: 22px;
  height: 22px;
}

.platform-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.platform-status {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.platform.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(11, 18, 32, 0.07);
}

.platform.muted {
  opacity: 0.62;
}

.platform.muted .platform-icon {
  background: rgba(90, 107, 125, 0.1);
  color: var(--text-muted);
}

.platform.muted .platform-status {
  color: var(--text-muted);
  background: rgba(90, 107, 125, 0.1);
}

.changelog {
  background: #fff;
}

.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-list li {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.04), transparent 40%),
    #fff;
}

.changelog-version {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.changelog-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.changelog-notes {
  font-size: 14px;
  color: #3d4d5f;
  line-height: 1.75;
}

/* ── Footer ── */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 48px var(--page-pad) calc(40px + var(--safe-bottom));
  padding-left: calc(var(--page-pad) + var(--safe-left));
  padding-right: calc(var(--page-pad) + var(--safe-right));
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.footer-sub {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(45, 212, 191, 0.8);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-links .sep {
  color: rgba(255, 255, 255, 0.28);
}

.icp-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.8;
  transition: color 0.2s;
}

.icp-link:hover {
  color: var(--cyan);
}

.copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.8;
}

/* ── Desktop enhancements ── */
@media (min-width: 1024px) {
  .hero-content {
    width: min(100%, 880px);
  }

  .cta-group {
    grid-template-columns: repeat(2, minmax(0, 260px));
    gap: 16px;
  }

  .btn-download {
    min-height: 78px;
    padding: 16px 22px;
  }

  .stack-list {
    gap: 18px;
  }

  .platforms {
    gap: 18px;
  }
}

/* ── Tablet ── */
@media (max-width: 900px) {
  .stack-list {
    grid-template-columns: 1fr;
  }

  .platforms {
    grid-template-columns: 1fr;
  }

  .platform {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .platform-name {
    flex: 1;
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  :root {
    --nav-height: 60px;
  }

  .brand-sub {
    display: none;
  }

  .brand-icon {
    width: 28px;
    height: 28px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-link {
    font-size: 13px;
    padding: 10px 8px;
  }

  .nav-link::after {
    display: none;
  }

  .hero {
    align-items: flex-end;
    padding-bottom: clamp(48px, 10vh, 72px);
  }

  .hero-brand {
    font-size: clamp(36px, 11vw, 56px);
    letter-spacing: -0.03em;
  }

  .hero-product-full {
    letter-spacing: 0.14em;
  }

  .hero-desc {
    font-size: 13.5px;
  }

  .cta-group {
    grid-template-columns: 1fr;
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .btn-download {
    min-height: 68px;
    width: 100%;
  }

  .btn-meta {
    max-width: 100%;
  }

  .version-info {
    font-size: 12px;
    padding: 0 8px;
  }

  .stack-item,
  .changelog-list li {
    padding: 18px 18px 20px;
    border-radius: 16px;
  }

  .platform {
    padding: 16px;
  }

  .feedback-card {
    border-radius: 16px;
  }
}

@media (max-width: 380px) {
  .nav-link {
    font-size: 12px;
    padding: 10px 6px;
  }

  .hero-title {
    font-size: 19px;
  }
}

/* Touch devices: avoid hover-only lift that can stick */
@media (hover: none) {
  .btn-download:hover,
  .stack-item:hover,
  .platform.active:hover {
    transform: none;
  }

  .btn-download:active {
    transform: scale(0.98);
  }
}

/* ── Feedback page ── */
.page-feedback {
  background: var(--surface);
}

.feedback-main {
  padding-top: calc(var(--nav-height) + var(--safe-top));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.feedback-hero {
  position: relative;
  padding: clamp(40px, 7vw, 64px) var(--page-pad) clamp(52px, 8vw, 72px);
  padding-left: calc(var(--page-pad) + var(--safe-left));
  padding-right: calc(var(--page-pad) + var(--safe-right));
  overflow: hidden;
}

.feedback-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #071018 0%, #0c1a28 50%, #0a2430 100%);
}

.feedback-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(45, 212, 191, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 40%, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
}

.feedback-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.feedback-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.feedback-hero-content p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

.feedback-section {
  flex: 1;
  padding: 0 calc(var(--page-pad) + var(--safe-left)) calc(64px + var(--safe-bottom));
  padding-right: calc(var(--page-pad) + var(--safe-right));
  margin-top: -28px;
}

.feedback-card {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(11, 18, 32, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: clamp(24px, 4vw, 40px);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-label .required {
  color: #e11d48;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #f7fafb;
  border: 1px solid #d7e0e6;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
  background: #fff;
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
  font-size: 16px;
}

.form-hint {
  font-size: 12px;
  color: #95a3b2;
}

.type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.type-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.type-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.type-option span {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
  color: #4b5c6e;
  background: #f0f4f6;
  border: 1px solid #dce4ea;
  border-radius: 12px;
  transition: all 0.2s;
  user-select: none;
}

.type-option input:checked + span {
  color: var(--accent);
  background: rgba(13, 148, 136, 0.08);
  border-color: var(--accent);
  font-weight: 600;
}

.type-option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.btn-submit {
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #0f766e 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  min-height: 48px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.94;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-cancel {
  font-size: 14px;
  color: #7a8b9c;
  transition: color 0.2s;
  padding: 10px 4px;
}

.btn-cancel:hover {
  color: var(--accent);
}

.form-message {
  font-size: 14px;
  min-height: 1.4em;
  line-height: 1.5;
}

.form-message.success {
  color: #15803d;
}

.form-message.error {
  color: #be123c;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-submit {
    width: 100%;
  }

  .btn-cancel {
    text-align: center;
  }

  .type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .type-option span {
    width: 100%;
    text-align: center;
  }
}

.page-admin {
  background: var(--surface);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.page-admin [hidden] {
  display: none !important;
}

.page-admin .nav-text-btn {
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 2px;
}

.page-admin .nav-text-btn:hover {
  color: var(--accent);
}

.admin-main {
  padding-top: calc(var(--nav-height) + var(--safe-top));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.admin-hero {
  position: relative;
  overflow: hidden;
  padding: 28px var(--page-pad) 32px;
  padding-left: calc(var(--page-pad) + var(--safe-left));
  padding-right: calc(var(--page-pad) + var(--safe-right));
}

.admin-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #071018 0%, #0c1a28 50%, #0a2430 100%);
}

.admin-hero-content {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
}

.admin-hero-content h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.admin-hero-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

.admin-body {
  flex: 1;
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 20px calc(var(--page-pad) + var(--safe-left)) calc(40px + var(--safe-bottom));
  padding-right: calc(var(--page-pad) + var(--safe-right));
  box-sizing: border-box;
}

.admin-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(20, 32, 51, 0.06);
  box-shadow: 0 10px 28px rgba(11, 18, 32, 0.06);
}

.admin-login-card {
  max-width: 400px;
  margin: 12px auto 0;
  padding: 28px 24px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-inbox {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.admin-search {
  width: 100%;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-tabs { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 10px 12px; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-decision { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 7px; background: #f6f8fa; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.admin-decision.approve { border-color: #9ad9b0; background: #effaf2; color: #15803d; }
.admin-decision.reject { border-color: #f1b5bf; background: #fff5f6; color: #be123c; }
.admin-decision:disabled { opacity: .55; cursor: wait; }
.invite-status-pending { color: #9a6700; background: #fff8df; }
.invite-status-approved { color: #15803d; background: #effaf2; }
.invite-status-rejected { color: #be123c; background: #fff0f1; }

.admin-filter {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.admin-filter input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.admin-filter span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  color: #4b5c6e;
  background: #f3f6f8;
  border: 1px solid #dce4ea;
  border-radius: 999px;
  user-select: none;
  white-space: nowrap;
}

.admin-filter input:checked + span {
  color: var(--accent);
  background: rgba(13, 148, 136, 0.1);
  border-color: var(--accent);
  font-weight: 600;
}

.admin-count {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 4px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.admin-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 36px 16px;
  margin: 0;
}

.admin-item {
  padding: 18px 18px 16px;
  min-width: 0;
}

.admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.admin-type {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f4f6;
  color: #4b5c6e;
  flex-shrink: 0;
}

.admin-type-bug {
  background: rgba(225, 29, 72, 0.1);
  color: #be123c;
}

.admin-type-feature {
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
}

.admin-type-usage {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.admin-time {
  font-size: 12px;
  color: #8a9aab;
  margin-left: auto;
  text-align: right;
}

.admin-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-content {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  background: #f6f8fa;
  border-radius: 8px;
  font-size: 12px;
}

.admin-meta-label {
  color: #8a9aab;
  flex-shrink: 0;
}

.admin-meta-value {
  color: #334155;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .admin-hero {
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .admin-login-card {
    padding: 22px 18px;
  }

  .admin-item-head {
    align-items: flex-start;
  }

  .admin-time {
    line-height: 1.4;
  }

  .page-admin .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-admin .btn-submit {
    width: 100%;
  }
}
