:root {
  --bg: #0b1220;
  --bg-soft: #111827;
  --panel: #0f172a;
  --panel-soft: #172033;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #0ea5e9;
  --primary-soft: rgba(14, 165, 233, 0.15);
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 12px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #08101d 0%, #0b1220 100%);
  color: var(--text);
}

body {
  /* Space for fixed top + fixed bottom bars */
  padding-top: 68px;
  padding-bottom: 120px;
}

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

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  padding-bottom: 40px;
}

/* Fixed top menu / title bar */
.top-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  padding: 14px 24px;
  margin: 0;
  background: rgba(15, 15, 35, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(6px);
  text-align: left;
}

.top-menu-title {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.top-menu-title strong {
  font-weight: 700;
}

/* Fixed bottom menu or footer */
.bottom-menu,
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;

  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;

  min-height: 56px;
  padding: 14px 18px;
  margin: 0;
  background: rgba(15, 15, 35, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(6px);
  text-align: center;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.25);
}

.menu-link {
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.menu-link:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 158, 255, 0.55);
  background: rgba(74, 158, 255, 0.08);
}

.site-footer .footer-text,
.site-footer .footer-link-label {
  opacity: 0.95;
}

.env-banner {
  margin: 16px 0 0 0;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 600;
}

.hero {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero.compact {
  padding: 18px 22px;
}

.hero h1,
.hero h2 {
  margin: 0 0 10px 0;
  font-size: 2rem;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.hero-meta {
  margin-bottom: 8px;
}

.back-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.back-link:hover {
  text-decoration: underline;
}

.grid,
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.card {
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.45);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.card h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.steps-list {
  padding-left: 20px;
  line-height: 1.7;
}

.muted {
  opacity: 0.85;
}

/* Quick Access 3-column layout */
.quick-access-card {
  padding: 18px;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.quick-link-card {
  display: block;
  height: 100%;
  text-decoration: none;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.quick-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 158, 255, 0.55);
  background: linear-gradient(180deg, rgba(74,158,255,0.10) 0%, rgba(255,255,255,0.03) 100%);
}

.quick-link-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 10px;
}

.quick-link-content h3 {
  margin: 0 0 6px 0;
  font-size: 1rem;
}

.quick-link-content p {
  margin: 0;
  line-height: 1.55;
  opacity: 0.9;
}

/* Frame pages */
body.frame-page {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

body.frame-page .wrap.frame-wrap {
  width: 100vw;
  max-width: none !important;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  padding: 16px 16px 0 16px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
}

.frame-shell {
  min-height: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.app-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

@media (max-width: 960px) {
  .quick-access-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 16px;
    padding-bottom: 32px;
  }

  .hero {
    padding: 20px;
  }

  .hero h1,
  .hero h2 {
    font-size: 1.6rem;
  }

  .cards,
  .grid {
    grid-template-columns: 1fr;
  }

  body.frame-page .wrap.frame-wrap {
    padding: 10px 10px 0 10px;
  }

  .top-menu {
    padding: 12px 16px;
  }

  .top-menu-title {
    font-size: 0.95rem;
    white-space: normal;
  }
}
