:root {
  --bg-dark: #0b0d10;
  --bg-surface: #13161c;
  --bg-surface-elevated: #1c2029;
  --bg-surface-border: #2c3240;
  --primary-green: #00e676;
  --primary-green-hover: #00c853;
  --primary-green-glow: rgba(0, 230, 118, 0.25);
  --master-orange: #f97316;
  --master-orange-hover: #ea580c;
  --master-orange-glow: rgba(249, 115, 22, 0.3);
  --danger-red: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-mono: 'Consolas', 'Fira Code', 'Monaco', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  background: var(--primary-green);
  color: #000;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 3px;
}

#funktionen,
#matrix,
#designer,
#versionsverlauf,
#shop {
  scroll-margin-top: 6rem;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Header & Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 950;
  background: rgba(11, 13, 16, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-surface-border);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.primary-navigation {
  margin-left: auto;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--bg-surface-border);
  border-radius: 7px;
  background: var(--bg-surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--text-main);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand-logo-dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-green);
}

.brand-version {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--bg-surface-border);
  color: var(--primary-green);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-cta {
  flex-shrink: 0;
  margin-left: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-green {
  background-color: var(--primary-green);
  color: #000;
  box-shadow: 0 0 15px var(--primary-green-glow);
}

.btn-green:hover {
  background-color: var(--primary-green-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--bg-surface-border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--text-muted);
}

/* --- Hero Section --- */
.hero {
  padding: 5rem 2rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.badge-pill [data-app-version-template] {
  color: var(--primary-green);
  font-weight: 600;
  white-space: nowrap;
}

.badge-pill .release-note-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--bg-surface-border);
  color: var(--text-muted);
  font-weight: 500;
}

.release-note-summary a {
  flex: 0 0 auto;
  color: var(--primary-green);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.release-note-summary a:hover {
  text-decoration: underline;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(90deg, #fff 0%, var(--primary-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3.5rem;
}

/* --- Showcase / Software Interface Mockup --- */
.showcase {
  max-width: 1200px;
  margin: 0 auto 5rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.showcase-header {
  background: var(--bg-surface-elevated);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bg-surface-border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.showcase-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot-group {
  display: flex;
  gap: 6px;
  margin-right: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4b5563;
}

.showcase-body {
  padding: 1.5rem;
}

.showcase-demo-note {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.08);
  color: #fdba74;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-align: left;
}

.matrix-scroll-hint {
  display: none;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: left;
}

.matrix-table-wrap {
  border-radius: 6px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
  margin-bottom: 1.5rem;
  background: #0f1217;
  border: 1px solid var(--bg-surface-border);
  border-radius: 6px;
  overflow: hidden;
}

.matrix-table th, .matrix-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-surface-border);
}

.matrix-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.status-live {
  background: rgba(0, 230, 118, 0.15);
  color: var(--primary-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.status-stopped {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.master-go-banner {
  background: var(--master-orange);
  color: #000;
  font-weight: 800;
  text-align: center;
  padding: 0.85rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 20px var(--master-orange-glow);
  cursor: pointer;
  transition: background 0.2s ease;
}

.master-go-banner:hover {
  background: var(--master-orange-hover);
}

.master-go-banner.demo-control,
.master-go-banner.demo-control:hover {
  background: rgba(249, 115, 22, 0.82);
  box-shadow: none;
  cursor: default;
}

.demo-label {
  display: inline-block;
  margin-right: 0.55rem;
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  vertical-align: 0.08rem;
}

.demo-button {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  cursor: not-allowed;
  opacity: 0.65;
}

/* --- Features Grid --- */
.features-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  border-radius: 10px;
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--primary-green);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  font-weight: bold;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Versionsverlauf / Feature Tree --- */
.release-history-section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.65rem;
  color: var(--primary-green);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.release-tree {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.release-tree::before {
  position: absolute;
  top: 1.2rem;
  bottom: 1.2rem;
  left: 0.55rem;
  width: 2px;
  background: linear-gradient(var(--primary-green), var(--bg-surface-border) 35%, var(--bg-surface-border));
  content: '';
}

.release-tree-loading {
  padding-left: 2.5rem;
  color: var(--text-muted);
}

.release-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-bottom: 1.35rem;
}

.release-marker {
  position: relative;
  z-index: 1;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 1.4rem;
  border: 3px solid var(--bg-dark);
  border-radius: 50%;
  background: var(--bg-surface-border);
  box-shadow: 0 0 0 1px var(--bg-surface-border);
}

.release-entry.is-current .release-marker {
  background: var(--primary-green);
  box-shadow: 0 0 0 1px var(--primary-green), 0 0 18px var(--primary-green-glow);
}

.release-card {
  overflow: hidden;
  border: 1px solid var(--bg-surface-border);
  border-radius: 10px;
  background: var(--bg-surface);
}

.release-entry.is-current .release-card {
  border-color: rgba(0, 230, 118, 0.55);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

.release-entry.is-undocumented .release-card {
  opacity: 0.72;
}

.release-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.4rem;
}

.release-version-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.release-version-line h2,
.release-version-line h3 {
  font-family: var(--font-mono);
  font-size: 1.08rem;
}

.release-current-label {
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(0, 230, 118, 0.45);
  border-radius: 99px;
  color: var(--primary-green);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.release-summary {
  margin-top: 0.3rem;
  color: var(--text-muted);
}

.release-date {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.release-change-list {
  display: grid;
  gap: 0.7rem;
  padding: 0 1.4rem 1.3rem;
  list-style: none;
}

.release-change-list li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  color: #d5d8de;
  font-size: 0.92rem;
}

.release-change-type {
  display: inline-flex;
  justify-content: center;
  padding: 0.14rem 0.45rem;
  border: 1px solid var(--bg-surface-border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.release-change-added { border-color: rgba(0, 230, 118, 0.4); color: var(--primary-green); }
.release-change-changed { border-color: rgba(96, 165, 250, 0.45); color: #60a5fa; }
.release-change-fixed { border-color: rgba(249, 115, 22, 0.45); color: #fb923c; }
.release-change-security { border-color: rgba(192, 132, 252, 0.45); color: #c084fc; }
.release-change-info { color: var(--text-muted); }

.changelog-main {
  min-height: 70vh;
}

.changelog-header {
  padding-top: 1.5rem;
}

.changelog-header h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
}

.changelog-back-link {
  display: inline-flex;
  margin-top: 1.35rem;
  color: var(--primary-green);
  font-weight: 700;
  text-decoration: none;
}

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

.changelog-footer-brand {
  margin-bottom: 0.75rem;
}

.changelog-footer-copy {
  max-width: 320px;
}

.changelog-footer-links {
  line-height: 2;
  list-style: none;
}

.changelog-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.changelog-footer-links a:hover {
  color: var(--text-main);
}

.feature-list {
  margin-top: 1rem;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.feature-list li::before {
  content: "✓";
  color: var(--primary-green);
  font-weight: bold;
}

/* --- Licensing & PayPal Shop Section --- */
.shop-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.demo-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: -1.5rem 0 2rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(0, 230, 118, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.1), rgba(20, 27, 37, 0.92));
}

.demo-download-copy {
  max-width: 680px;
}

.demo-download-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--primary-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-download-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.demo-download-card p {
  color: var(--text-muted);
}

.demo-download-meta {
  margin-top: 0.65rem;
  font-size: 0.82rem;
}

.demo-download-button {
  flex: 0 0 auto;
  text-align: center;
}

.shop-container {
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  border-radius: 12px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.license-selector {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.license-option {
  width: 100%;
  border: 2px solid var(--bg-surface-border);
  border-radius: 10px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  text-align: left;
}

.license-option:hover {
  border-color: var(--text-muted);
}

.license-option.active {
  border-color: var(--primary-green);
  background: rgba(0, 230, 118, 0.04);
}

.license-option:focus-visible {
  border-color: var(--primary-green);
}

.license-option .plan-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.license-option .plan-description {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.license-option .price {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-top: 0.5rem;
}

.license-option .price span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: normal;
}

.checkout-area {
  position: relative;
  z-index: 0;
  isolation: isolate;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-surface-border);
  border-radius: 10px;
  padding: 2rem;
}

.checkout-area h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bg-surface-border);
  padding-bottom: 0.75rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-surface-border);
  font-weight: 800;
  font-size: 1.3rem;
}

.legal-checkbox-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.checkbox-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--primary-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-item a {
  color: var(--text-main);
  text-decoration: underline;
  cursor: pointer;
}

.checkout-message {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 0.86rem;
}

/* PayPal SDK Container */
#paypal-button-container {
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: 140px;
}

/* Kaufbestätigung Box */
#order-confirmation {
  display: none;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid var(--primary-green);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

#order-confirmation h4 {
  color: var(--primary-green);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.generated-key {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  background: #0b0d10;
  border: 1px dashed var(--primary-green);
  padding: 0.8rem;
  border-radius: 6px;
  color: #fff;
  margin: 1rem 0;
  letter-spacing: 2px;
  user-select: all;
}

/* --- Modals (rechtliche Dokumente) --- */
.withdrawal-trigger {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 900;
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(239, 68, 68, 0.65);
  border-radius: 6px;
  background: rgba(19, 22, 28, 0.94);
  color: #fca5a5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font: 700 0.76rem var(--font-sans);
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.withdrawal-trigger.is-footer-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.75rem);
}

.withdrawal-trigger:hover,
.withdrawal-trigger:focus-visible {
  background: rgba(239, 68, 68, 0.16);
  color: #fff;
  outline: 2px solid rgba(239, 68, 68, 0.5);
  outline-offset: 2px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: clamp(0.75rem, 4vw, 2rem);
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--bg-surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.3rem;
  color: #fff;
}

.close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}

.close-modal:hover {
  color: #fff;
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.modal-body h4 {
  color: var(--text-main);
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body a {
  color: var(--primary-green);
  text-underline-offset: 3px;
}

.withdrawal-modal {
  max-width: 720px;
}

.withdrawal-notice {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--text-muted);
}

.withdrawal-notice strong {
  color: #fca5a5;
}

.withdrawal-field {
  margin-bottom: 1.1rem;
}

.withdrawal-field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-main);
  font-weight: 600;
}

.withdrawal-field input,
.withdrawal-field textarea {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--bg-surface-border);
  border-radius: 6px;
  background: #0b0d10;
  color: var(--text-main);
  font: inherit;
}

.withdrawal-field input:focus,
.withdrawal-field textarea:focus {
  border-color: var(--danger-red);
  outline: 2px solid rgba(239, 68, 68, 0.22);
}

.withdrawal-field small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.withdrawal-review-button,
.withdrawal-confirm-button {
  background: var(--danger-red);
  color: #fff;
}

.withdrawal-summary {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--bg-surface-border);
  border-radius: 8px;
  background: #0b0d10;
}

.withdrawal-summary dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.5rem 1rem;
}

.withdrawal-summary dt {
  color: var(--text-muted);
}

.withdrawal-summary dd {
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.withdrawal-declaration {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--danger-red);
  background: rgba(239, 68, 68, 0.07);
  color: var(--text-main);
}

.withdrawal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.withdrawal-error {
  margin-top: 1rem;
  color: #fca5a5;
  font-weight: 600;
}

.withdrawal-success {
  padding: 1.25rem;
  border: 1px solid var(--primary-green);
  border-radius: 8px;
  background: rgba(0, 230, 118, 0.08);
}

.withdrawal-success h4 {
  color: var(--primary-green);
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--bg-surface-border);
  background: var(--bg-dark);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.technology-link {
  margin-top: 1rem;
}

.technology-link a,
.ndi-attribution a {
  color: var(--primary-green);
  text-underline-offset: 3px;
}

.technology-link a:hover,
.ndi-attribution a:hover {
  color: var(--text-main);
}

.ndi-attribution {
  max-width: 1280px;
  margin: 0 auto 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--bg-surface-border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}

.footer-legal-links a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

@media (max-width: 850px) {
  footer {
    padding-bottom: 6rem;
  }
  .nav-container {
    position: relative;
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .brand {
    max-width: calc(100% - 60px);
    gap: 0.55rem;
    font-size: 1.05rem;
  }
  .brand-version {
    display: none;
  }
  .nav-toggle {
    display: block;
    margin-left: auto;
  }
  .primary-navigation {
    width: 100%;
    margin: 0;
  }
  .nav-links {
    display: none;
    width: 100%;
    padding: 0.5rem 0 0.75rem;
    flex-direction: column;
    gap: 0.2rem;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 0.7rem 0.75rem;
    border-radius: 6px;
  }
  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: var(--bg-surface-elevated);
  }
  .nav-cta {
    display: none;
  }
  .hero {
    padding: 3.5rem 1rem 2rem;
  }
  .hero-actions {
    flex-direction: column;
    margin-bottom: 2.5rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .badge-pill {
    max-width: 100%;
    flex-direction: column;
    justify-content: center;
  }
  .badge-pill .release-note-summary {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 0.4rem;
    padding-left: 0;
    border-top: 1px solid var(--bg-surface-border);
    border-left: 0;
  }
  .release-history-section {
    padding: 3rem 1rem 4rem;
  }
  .release-entry {
    gap: 0.75rem;
  }
  .release-card-header {
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem;
  }
  .release-change-list {
    padding: 0 1.1rem 1.1rem;
  }
  .release-change-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .release-change-type {
    justify-self: start;
  }
  .showcase {
    margin-bottom: 3rem;
  }
  .showcase-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.72rem;
    text-align: left;
  }
  .showcase-body {
    padding: 0.85rem;
  }
  .matrix-scroll-hint {
    display: block;
  }
  .matrix-table-wrap:focus-visible {
    outline-offset: 2px;
  }
  .matrix-table {
    display: block;
    border: 0;
    background: transparent;
  }
  .matrix-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .matrix-table tbody,
  .matrix-table tr,
  .matrix-table td {
    display: block;
    width: 100%;
  }
  .matrix-table tr {
    margin-bottom: 0.85rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--bg-surface-border);
    border-radius: 8px;
    background: #0f1217;
  }
  .matrix-table td {
    display: grid;
    grid-template-columns: minmax(105px, 0.42fr) 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(44, 50, 64, 0.7);
    overflow-wrap: anywhere;
  }
  .matrix-table td:last-child {
    border-bottom: 0;
  }
  .matrix-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
  }
  .features-section,
  .shop-section {
    padding: 3.5rem 1rem;
  }
  .features-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-card {
    padding: 1.4rem;
  }
  .shop-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
  }
  .demo-download-card {
    align-items: stretch;
    flex-direction: column;
    margin-top: -1rem;
    padding: 1.25rem;
  }
  .demo-download-button {
    width: 100%;
  }
  .license-option,
  .checkout-area {
    padding: 1.2rem;
  }
  .withdrawal-trigger {
    right: 1rem;
    bottom: 1rem;
  }
  .modal-header {
    padding: 0.85rem 1rem;
  }
  .modal-header h3 {
    font-size: 1.05rem;
  }
  .modal-body {
    padding: 1rem;
  }
  .withdrawal-summary dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .withdrawal-summary dd + dt {
    margin-top: 0.55rem;
  }
  .withdrawal-actions {
    flex-direction: column-reverse;
  }
  .footer-content,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-legal-links {
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  .matrix-table td {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .summary-row,
  .summary-total {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
  .withdrawal-trigger {
    max-width: calc(100vw - 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
