/* =============================================================================
   PeakLens Download Page - IT2core
   ============================================================================= */

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d28;
  --bg-card: #22263a;
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #2d3348;
  --badge-bg: #1e3a2f;
  --badge-text: #4ade80;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 48px;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.app-icon {
  font-size: 48px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a2f, #22263a);
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.app-icon img { width: 72px; height: 72px; display: block; }

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tagline {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* Sections */
section { margin-bottom: 48px; }

h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* Download card */
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.version-badge {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 8px;
}

.build-info {
  color: var(--text-muted);
  font-size: 13px;
}

.build-info .separator {
  margin: 0 6px;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #0f1117;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn-download:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

/* Checksum */
.checksum-section {
  margin-bottom: 32px;
}

.checksum {
  display: block;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 8px;
  user-select: all;
}

.checksum-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.checksum-hint code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* QR code */
.qr-section {
  text-align: center;
}

.qr-code {
  display: inline-block;
  background: white;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.qr-code svg {
  width: 180px;
  height: 180px;
}

.qr-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.feature h3 {
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  margin-bottom: 6px;
}

.feature p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* Changelog */
.changelog-entry {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.changelog-entry.latest {
  border-color: var(--accent-dim);
  background: linear-gradient(135deg, var(--bg-secondary), #1a2e22);
}

.changelog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.changelog-version {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}

.changelog-build {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.changelog-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
}

.changelog-entry ul {
  list-style: none;
  padding: 0;
}

.changelog-entry li {
  padding: 3px 0 3px 18px;
  position: relative;
  font-size: 14px;
  color: var(--text-secondary);
}

.changelog-entry li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

.latest li::before {
  background: var(--accent-dim);
}

/* Older versions */
.older-versions {
  margin-top: 12px;
}

.older-versions summary {
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 10px 0;
  user-select: none;
}

.older-versions summary:hover {
  color: var(--text-secondary);
}

.older-versions .changelog-entry {
  margin-top: 12px;
}

/* Footer */
footer {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-brand strong {
  color: var(--text-secondary);
}

.footer-links {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links .separator {
  margin: 0 8px;
}

.copyright {
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 24px 16px; }
  h1 { font-size: 26px; }
  .download-card { flex-direction: column; text-align: center; }
  .btn-download { width: 100%; justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
}
