* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: radial-gradient(circle at top, var(--bg-gradient-top) 0%, var(--bg-main) 55%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-drawer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-control);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.seg-btn,
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.seg-btn:hover,
.lang-btn:hover {
  color: var(--text-main);
}

.seg-btn.active,
.lang-btn.active {
  background: var(--bg-card-alt);
  color: var(--gold);
}

.seg-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Main Content */
main {
  flex: 1;
  padding: 48px 0 64px;
}

.hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

h1 {
  font-size: 2.3rem;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-heading);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.04rem;
  margin-bottom: 24px;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid transparent;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.84rem;
}

.btn:hover:not(:disabled) {
  opacity: 0.92;
  border-color: var(--gold);
}

.release-meta {
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Section Headers */
.section-block {
  margin-top: 48px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.5rem;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Release Card & Changelog */
.release-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.release-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.release-card-header h2 {
  font-size: 1.12rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.release-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.release-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-control);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

.text-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-main);
  font-size: 0.93rem;
}

.changelog-list li {
  position: relative;
  padding-left: 18px;
}

.changelog-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.release-stack {
  display: flex;
  flex-direction: column;
}

.version-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Feature Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.card h2,
.card h3 {
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Screenshots Gallery & Lightbox */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
}

.shot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}

.shot-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.shot-thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-control);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.shot-card.no-caption .shot-thumb-btn {
  border-bottom: none;
}

.shot-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.shot-card:hover .shot-thumb-btn img {
  transform: scale(1.02);
}

.shot-zoom-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-header);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.shot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
}

.shot-placeholder code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.8rem;
}

.shot-caption {
  padding: 16px 18px;
}

.shot-caption h3 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.shot-caption p {
  font-size: 0.89rem;
  color: var(--text-muted);
}

.shots-empty {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 980px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lightbox-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--gold);
}

.lightbox-counter {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.lightbox-stage {
  position: relative;
  background: var(--bg-control);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 74vh;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lightbox-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 200px;
}

.lightbox-btns {
  display: flex;
  gap: 8px;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item[open] {
  border-color: var(--gold);
}

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--gold);
}

.faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-body);
  font-size: 0.93rem;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.faq-answer code {
  background: var(--bg-control);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.84rem;
  color: var(--gold);
}

/* Feedback Form */
.feedback-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-grid .form-group {
  margin-bottom: 0;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  background: var(--bg-control);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-note a {
  color: var(--gold);
  text-decoration: none;
}

.form-note a:hover {
  text-decoration: underline;
}

.form-status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.89rem;
  line-height: 1.45;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.form-status.error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

/* Privacy Policy & Documentation Article */
.doc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.65;
  box-shadow: var(--shadow-card);
}

.doc h1 {
  font-size: 1.85rem;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.doc .updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.doc h2 {
  font-size: 1.15rem;
  color: var(--gold);
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.doc ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.doc code {
  background: var(--bg-control);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--gold);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc a {
  color: var(--gold);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.doc a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--gold);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  margin-top: 6px;
  font-size: 0.78rem;
}

/* Tablet & Mobile Adaptation */
@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-drawer {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 0 6px;
    border-top: 1px solid var(--border);
  }

  .nav-drawer.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--bg-card-alt);
  }

  .nav-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .segmented-control {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 3px;
  }

  .seg-btn {
    min-height: 36px;
    font-size: 0.82rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  main {
    padding: 32px 0 48px;
  }

  .brand {
    font-size: 0.95rem;
    gap: 9px;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.97rem;
  }

  .cta-row,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn,
  .form-actions .btn {
    width: 100%;
  }

  .release-card,
  .feedback-card {
    padding: 18px 16px;
  }

  .release-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .release-controls {
    justify-content: space-between;
  }

  .grid,
  .screenshots-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-control {
    font-size: 16px;
  }

  .faq-question {
    padding: 15px 16px;
    font-size: 0.94rem;
  }

  .faq-answer {
    padding: 12px 16px 16px;
  }

  .doc {
    padding: 22px 16px;
  }

  .doc h1 {
    font-size: 1.55rem;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-dialog {
    padding: 12px;
  }
}