:root {
  --bg: #09141d;
  --bg-2: #0d1d2d;
  --panel: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.14);
  --text: #edf8ff;
  --muted: rgba(237, 248, 255, 0.72);
  --primary: rgba(125, 211, 252, 0.92);
  --accent: rgba(110, 231, 183, 0.9);
  --shadow: 0 24px 60px rgba(7, 15, 26, 0.35);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", sans-serif;
  background: var(--bg);
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

button,
.box,
.start-btn,
.ghost-button,
.back-button,
.download-button,
.modal-button {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  position: relative;
  width: min(1100px, calc(100% - 1.2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 10px 24px rgba(7, 15, 26, 0.18);
}

.topbar {
  width: min(100%, 920px);
  margin: 0 auto 1rem;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 14px;
  background: rgba(125, 211, 252, 0.9);
  color: #06131c;
  font-weight: 800;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.04em;
}

.app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
}

.screen {
  display: none;
  min-height: 70vh;
}

.screen.active {
  display: block;
}

.main-panel,
.content-panel {
  border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2.2rem);
}

.main-panel {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.platform-notice {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: min(100%, 520px);
  margin-top: 2rem;
}

.fx-layer {
  filter: none;
}

.box {
  --w: 100px;
  --h: 100px;
  --r: 9999px;
  --tr: 25%;
  z-index: 500;
  position: relative;
  width: var(--w);
  height: var(--h);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--r);
  border: 1px double rgba(51, 51, 51, 0.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: pointer;
  filter: none;
  user-select: none;
}

.box .svg {
  width: 28px;
  filter: none;
}

.box .text {
  filter: none;
}

.box:before {
  content: none;
}

.box:after {
  content: none;
}

.start-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0 1.1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(7, 15, 26, 0.15);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.start-btn .text {
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  font-family: "Inter", "Segoe UI", sans-serif;
  letter-spacing: -0.04em;
  color: #edf8ff;
  text-shadow: none;
}

.start-btn .btn-icon {
  width: 2.7rem;
  height: 2.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: none;
  transition: transform 0.22s ease;
}

.start-btn .btn-icon .svg {
  width: 16px;
  fill: #f7fbff;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(7, 15, 26, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
}

.start-btn:hover .btn-icon {
  transform: scale(1.06);
}

.start-btn:active {
  transform: translateY(0) scale(0.98);
}

.start-btn:active .btn-icon {
  transform: scale(0.96);
}

.ghost-button,
.back-button,
.download-button,
.modal-button {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.download-button,
.ghost-button,
.back-button,
.modal-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 52px;
  padding: 0.85rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 18px rgba(7, 15, 26, 0.12);
  color: #edf8ff;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.download-button::before,
.ghost-button::before,
.back-button::before,
.modal-button::before {
  content: none;
}

.download-button:hover,
.ghost-button:hover,
.back-button:hover,
.modal-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.download-button:active,
.ghost-button:active,
.back-button:active,
.modal-button:active {
  transform: scale(0.98);
}

.ghost-button,
.back-button {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 1rem;
}

.download-button {
  width: 100%;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.07);
}

.modal-button {
  min-width: 120px;
}

.modal-button-secondary {
  color: #f3f9ff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.modal-button-primary {
  color: #ffffff;
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.header-left {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.06em;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.version-card,
.eeg-card,
.empty-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(125, 211, 252, 0.12);
  color: var(--primary);
}

.badge.beta {
  background: rgba(255, 202, 87, 0.12);
  color: #ffd789;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.card-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-card {
  color: var(--muted);
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  width: min(100%, 420px);
  padding: 1.6rem;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modal-panel h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.05em;
}

#download-modal-message {
  color: var(--muted);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.modal-button {
  min-width: 120px;
  padding: 0.9rem 1.2rem;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.modal-button:hover {
  transform: translateY(-1px);
}

.modal-button-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.modal-button-primary {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.26), rgba(110, 231, 183, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 0.8rem, 1100px);
  }

  .topbar {
    border-radius: 20px;
  }

  .screen {
    min-height: auto;
  }

  .main-panel {
    min-height: 62vh;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }

  .start-btn {
    width: min(100%, 320px);
    max-width: 100%;
  }

  .download-button {
    width: 100%;
  }
}
