/* ==========================================================================
   Ai Image Browser — Download Site Stylesheet
   ========================================================================== */

:root {
  /* Unified Dark Theme (matches the app) */
  --bg-page: #0b0f17;
  --bg-card: #151d2a;
  --bg-code: #0d131f;
  --bg-badge: rgba(91, 43, 181, 0.3);
  --bg-alert: #1f1b0a;

  --border-subtle: #1e293b;
  --border-card: #273549;
  --border-code: #1e293b;
  --border-alert: #42350a;
  --border-badge: rgba(147, 51, 234, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-badge: #e9d5ff;
  --text-alert: #fef08a;

  --accent-primary: #5b2bb5;
  --accent-hover: #6d35c8;
  --accent-active: #4a2196;
  --accent-focus-ring: rgba(109, 53, 200, 0.45);

  --success-color: #22c55e;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg-page);
  color: var(--text-primary);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Container: Centered, max 720px */
.page-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 3rem 1.25rem 4rem;
}

.content-container {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Typography Defaults */
h1, h2, h3 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Visually Hidden (Accessible screen reader announcements) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 1. Hero Section */
.hero-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-icon {
  width: 96px;
  height: 96px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

h1#app-name {
  font-size: 2.25rem;
  letter-spacing: -0.025em;
}

.hero-tagline {
  font-size: 1.125rem;
  max-width: 540px;
  line-height: 1.5;
}

.badge-wrapper {
  margin-top: 0.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-badge);
  background-color: var(--bg-badge);
  border: 1px solid var(--border-badge);
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* 2. Download Button Section */
.download-section {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.primary-btn.download-btn {
  width: 100%;
  max-width: 440px;
  padding: 1rem 1.75rem;
  font-size: 1.125rem;
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 var(--accent-focus-ring);
  gap: 0.75rem;
}

.primary-btn.download-btn:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.primary-btn.download-btn:active {
  background-color: var(--accent-active);
  transform: translateY(0);
}

.btn-icon {
  flex-shrink: 0;
}

/* Cards & Generic Panels */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.section-heading {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.section-note {
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Secondary Button (Copy) */
.secondary-btn.copy-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.secondary-btn.copy-btn:hover {
  background-color: var(--border-subtle);
}

.secondary-btn.copy-btn.copied {
  color: var(--success-color);
  border-color: var(--success-color);
}

/* Code Container & Monospace Elements */
.code-container {
  width: 100%;
}

.hash-code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background-color: var(--bg-code);
  color: var(--text-primary);
  border: 1px solid var(--border-code);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.direct-link-wrapper {
  margin-top: 0.25rem;
}

.direct-link {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.direct-link:hover {
  color: var(--accent-primary);
}

/* 5. Features Section */
.features-section {
  display: flex;
  flex-direction: column;
}

.feature-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.5rem;
}

.feature-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.feature-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feature-list > li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-list > li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-primary);
}

.feature-list > li strong {
  color: var(--text-primary);
}

.sub-feature-list {
  list-style: disc;
  margin: 0.4rem 0 0.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sub-feature-list li {
  padding-left: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.sub-feature-list li::before {
  display: none;
}

/* 6. First Run on Windows Alert Card */
.alert-card {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-alert);
  border: 1px solid var(--border-alert);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.alert-icon {
  color: var(--text-alert);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.alert-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-alert);
}

.alert-content p {
  font-size: 0.9375rem;
  color: var(--text-alert);
  opacity: 0.95;
  line-height: 1.5;
}

.alert-content strong {
  font-weight: 700;
}

/* 7. System Requirements */
.requirements-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.requirements-box svg {
  color: var(--text-muted);
}

/* 8. Changelog */
.changelog-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.changelog-paragraph {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.changelog-list {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.changelog-list li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* 9. Site Footer */
.site-footer {
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links {
  font-size: 0.875rem;
}

.dot-separator {
  margin: 0 0.5rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 480px) {
  .page-wrapper {
    padding: 2rem 1rem 3rem;
  }

  h1#app-name {
    font-size: 1.85rem;
  }

  .primary-btn.download-btn {
    width: 100%;
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
  }

  .card {
    padding: 1rem;
  }

  .alert-card {
    padding: 1rem;
  }
}
