/*
  Standardized Stylesheet for QR Scanner Web Pages
  - Aims for consistency with iOS Human Interface Guidelines.
  - Uses CSS variables for easy theme management (Light/Dark).
  - Improves typography, spacing, and color palette.
*/

/* 1. Global Variables & Resets */
:root {
  /* Light Mode Palette (iOS-like) */
  --bg-color: #f2f2f7;
  --card-bg-color: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent-color: #007AFF;
  --shadow-color: rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light dark;
    /* Dark Mode Palette (iOS-like) */
    --bg-color: #000000;
    --card-bg-color: #1c1c1e;
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --accent-color: #0A84FF;
    --shadow-color: rgba(0, 0, 0, 0.25);
  }
}

/* 2. Base Styles */
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 3. Main Content Container */
#message {
  background-color: var(--card-bg-color);
  max-width: 680px;
  margin: 40px auto;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* 4. Typography */
#message h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
}

#message h2 {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 22px;
  margin: 32px 0 8px;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  padding-top: 24px;
}

#message p {
  line-height: 1.6;
  margin: 12px 0;
  font-size: 17px;
  color: var(--text-primary);
}

#message ul {
  padding-left: 20px;
  line-height: 1.6;
  font-size: 17px;
  list-style-position: outside;
}

#message li {
  margin-bottom: 10px;
}

/* 5. Links & Buttons */

/* Default style for links (e.g., Privacy, Terms) */
#message p a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

#message p a:hover {
  text-decoration: underline;
}

/* Specific style for the App Store button */
#message a[href*="apps.apple.com"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  background-color: var(--accent-color);
  text-decoration: none;
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 17px;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease;
  margin-top: 24px;
}

#message a[href*="apps.apple.com"]:hover {
  text-decoration: none;
  filter: brightness(1.1);
}

#message a[href*="apps.apple.com"]:active {
  transform: scale(0.98);
  filter: brightness(1);
}


/* 6. Footer */
footer {
  text-align: center;
  padding: 20px 0 40px;
  background-color: transparent;
  font-size: 14px;
}

footer a {
  margin: 0 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* 7. Responsive Design */
@media (max-width: 720px) {
  body {
    padding: 0;
  }

  #message {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    padding: 24px;
  }

  footer {
    padding: 20px;
  }
}

/* Legacy class, can be removed if not used */
#load {
  color: var(--text-secondary);
  text-align: center;
  font-size: 13px;
}