/* =========================
   Global Theme Variables
   ========================= */
:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --bg: #f8f9fa;
  --text: #333333;
}

/* =========================
     Base Styles
     ========================= */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================
     Header & Logo
     ========================= */
header {
  background: #ffffff;
  padding: 24px 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.logo {
  width: 240px;
  height: auto;
}

/* =========================
     Layout Containers
     ========================= */
main {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

h1,
h2,
h3,
h4 {
  color: #212529;
  font-weight: 600;
  margin: 0 0 1rem;
}

h1 {
  font-size: 2rem;
  text-align: center;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

section {
  margin-bottom: 1.5rem;
}

ol,
ul {
  padding-left: 1.25rem;
}

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

a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* =========================
     Download Buttons
     ========================= */
.download-section {
  text-align: center;
  margin-top: 2rem;
}

.download-buttons {
  display: none; /* Revealed after ToS checked */
  margin-top: 1rem;
}

.download-buttons a {
  display: inline-block;
  margin: 0 12px;
  padding: 14px 28px;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.download-buttons a:hover {
  background: var(--primary-dark);
}

/* =========================
     Terms of Service Box
     ========================= */
.tos-box {
  height: 200px;
  overflow: auto;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 12px;
  background: #ffffff;
}

/* Optional: subtle custom scrollbar for WebKit */
.tos-box::-webkit-scrollbar {
  width: 6px;
}
.tos-box::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 3px;
}

.tos-content {
  font-size: 0.9rem;
  line-height: 1.6;
}

.tos-content h3 {
  font-size: 1rem;
  margin-top: 0;
}

.tos-content h4 {
  font-size: 0.95rem;
  margin: 1rem 0 0.5rem;
}

.tos-checkbox {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.tos-checkbox input {
  margin-right: 0.5rem;
}

/* =========================
     Footer
     ========================= */
footer {
  font-size: 0.85rem;
  color: #6c757d;
  text-align: center;
  padding: 40px 0 60px;
}

/* =========================
     Responsive Helpers
     ========================= */
@media (max-width: 600px) {
  .logo {
    width: 180px;
  }
  main {
    padding: 0 14px;
  }
  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.1rem;
  }
}
