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

:root {
  --bg: #0b0f1a;
  --bg-card: #141b2d;
  --bg-elevated: #1a2238;
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #4f8cff;
  --accent-hover: #3a7aef;
  --accent-glow: rgba(79, 140, 255, 0.25);
  --success: #34d399;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}

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

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #7c5cff);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

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

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

/* Hero */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

.hero-has-preview .hero-layout {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 48px;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-has-preview .hero-content {
  max-width: 480px;
}

.hero-preview {
  flex: 1;
  max-width: 560px;
  width: 100%;
}

.hero-preview-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.hero-preview img {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-has-preview .hero-actions {
  justify-content: flex-start;
}

/* Screenshots gallery */
.screenshots-section {
  padding: 60px 0 80px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.gallery {
  max-width: 900px;
  margin: 0 auto;
}

.gallery-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-viewport {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  width: 100%;
}

.gallery-viewport.gallery-zoomable {
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
}

.gallery-viewport img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.gallery-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-zoomable:hover .gallery-zoom-hint,
.hero-preview-btn:hover .gallery-zoom-hint {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: transparent;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.lightbox-overlay {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  box-sizing: border-box;
  cursor: zoom-out;
  position: relative;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 140px);
}

.lightbox-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: none;
  image-rendering: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.lightbox-caption {
  color: #e8ecf4;
  margin-top: 14px;
  text-align: center;
  font-size: 0.95rem;
  max-width: 800px;
  pointer-events: none;
}

.lightbox-hint {
  color: rgba(255, 255, 255, 0.45);
  margin-top: 8px;
  font-size: 0.8rem;
  pointer-events: none;
}

.lightbox-nav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: var(--accent);
}

.lightbox-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Online test */
.try-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.try-loading,
.try-empty {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.try-empty-card {
  text-align: center;
  max-width: 420px;
}

.try-empty-card h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.try-empty-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Feedback */
.feedback-section {
  padding: 80px 0;
  background: var(--bg);
}

.feedback-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.feedback-form .form-group {
  margin-bottom: 20px;
}

.feedback-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.feedback-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feedback-tip {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.feedback-tip.success { color: var(--success); }
.feedback-tip.error { color: #ef4444; }

.gallery-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.gallery-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gallery-caption {
  text-align: center;
  color: var(--text-muted);
  margin: 16px 0 20px;
  font-size: 0.95rem;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 100px;
  height: 64px;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--bg-elevated);
  transition: border-color 0.2s;
  opacity: 0.6;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

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

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 140, 255, 0.3);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

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

/* Download */
.download-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.download-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.download-card .version-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.download-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.download-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.version-list {
  max-width: 700px;
  margin: 0 auto;
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.version-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.version-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.version-changelog {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.no-version {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

/* About */
.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* Admin styles */
.admin-body {
  background: #0e1320;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
}

.admin-sidebar h2 {
  padding: 0 24px 24px;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.admin-nav {
  list-style: none;
}

.admin-nav a {
  display: block;
  padding: 12px 24px;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: var(--text);
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h1 {
  font-size: 1.5rem;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 700;
}

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

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.table-header h3 { font-size: 1.1rem; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 24px;
  text-align: left;
  font-size: 0.9rem;
}

th {
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

td { border-bottom: 1px solid var(--border); }

tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-latest {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.badge-platform {
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
}

.actions { display: flex; gap: 8px; }

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 300;
  animation: slideIn 0.3s ease;
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: #ef4444; color: #ef4444; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.hidden { display: none !important; }

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary, #f9fafb);
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
  margin: 0;
}

.permission-grid input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-muted);
}

.permission-tag.super {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Guide page */
.nav-links a.active-nav { color: var(--text); }

.page-hero {
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.guide-section {
  padding: 48px 0;
}

.guide-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 84px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.guide-sidebar h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-nav {
  list-style: none;
}

.guide-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.guide-nav a:hover,
.guide-nav a.active {
  color: var(--text);
  background: var(--bg-elevated);
}

.guide-nav a.active {
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}

.guide-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  min-height: 300px;
}

.guide-content h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.article-body p:last-child { margin-bottom: 0; }

.article-body-rich {
  color: var(--text-muted);
  line-height: 1.8;
}

.article-body-rich h2,
.article-body-rich h3,
.article-body-rich h4 {
  color: var(--text);
  margin: 20px 0 10px;
}

.article-body-rich h3 { font-size: 1.15rem; }

.article-body-rich img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  border: 1px solid var(--border);
}

.article-body-rich ul,
.article-body-rich ol {
  margin: 12px 0 16px 24px;
}

.article-body-rich li { margin-bottom: 6px; }

.article-body-rich a {
  color: var(--accent);
  text-decoration: underline;
}

.article-body-rich blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-muted);
}

.faq-section {
  padding: 60px 0 80px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  gap: 16px;
}

.faq-question:hover { background: rgba(255, 255, 255, 0.03); }

.faq-icon {
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 500px; }

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  line-height: 1.8;
}

.faq-answer-inner p { margin-bottom: 8px; }

.modal-wide { max-width: 640px; }

.modal-xl { max-width: 860px; width: 95vw; }

.form-group textarea.tall {
  min-height: 200px;
}

.form-hint-inline {
  font-weight: normal;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.rich-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.rich-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}

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

.rich-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.rich-content {
  min-height: 280px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 16px;
  line-height: 1.7;
  color: var(--text);
  outline: none;
}

.rich-content:empty::before {
  content: '输入文字，或点击工具栏插入图片…';
  color: var(--text-muted);
}

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
  display: block;
}

.rich-content h3 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
}

.rich-content ul,
.rich-content ol {
  margin: 8px 0 12px 20px;
}

.rich-content p {
  margin-bottom: 10px;
}

/* Tools page */
.tools-section {
  padding: 48px 0 80px;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.tool-card:hover {
  border-color: rgba(79, 140, 255, 0.3);
}

.tool-icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 12px;
  flex-shrink: 0;
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-info h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.tool-version {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.tool-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.admin-thumb {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 15, 26, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 0 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-open .nav-links { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 1rem;
  }

  .nav-links a.active-nav {
    background: rgba(91, 141, 255, 0.12);
    color: var(--accent);
  }
  .hero-has-preview .hero-layout {
    flex-direction: column;
    text-align: center;
  }
  .hero-has-preview .hero-actions { justify-content: center; }
  .gallery-nav { width: 36px; height: 36px; font-size: 1.2rem; }
  .gallery-thumb { width: 72px; height: 48px; }
  .feedback-row { grid-template-columns: 1fr; }
  .lightbox-overlay { padding: 16px 8px; gap: 4px; }
  .lightbox-content { max-width: calc(100vw - 96px); }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .lightbox-hint { font-size: 0.75rem; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .tool-card { flex-direction: column; align-items: flex-start; }
  .tool-card .btn { width: 100%; justify-content: center; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .version-item { flex-direction: column; align-items: flex-start; }
}
