:root {
  color-scheme: dark;
  font-family: "Poppins", sans-serif;
  --bg-primary: #050608;
  --bg-secondary: #10121c;
  --accent-electric: #4c8dff;
  --accent-violet: #6d5dfc;
  --accent-magenta: #4338ca;
  --text-primary: #f5f6ff;
  --text-muted: rgba(226, 229, 255, 0.72);
}

/* ✅ Fix: Global box-sizing and responsive base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ✅ Fix: Prevent horizontal scrolling on mobile */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ✅ Fix: Responsive images and media */
img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 15%, rgba(76, 141, 255, 0.08), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(127, 90, 240, 0.12), transparent 50%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 60%, #080a16 100%);
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  /* ✅ Fix: Responsive typography scaling */
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.6;
  /* ✅ Fix: Prevent horizontal scroll on mobile */
  overflow-x: hidden;
  width: 100%;
}

body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(76, 141, 255, 0.12), transparent 55%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 45%, #090b17 100%);
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(76, 141, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 90, 240, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.45;
  pointer-events: none;
  animation: gridShift 26s linear infinite;
}

.auth-ambient {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.4), transparent 70%);
  filter: blur(140px);
  opacity: 0.65;
  transform: translate(-40%, -30%);
  z-index: 0;
}

.card {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(2rem, 4vw, 2.6rem);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(10, 12, 18, 0.9), rgba(12, 14, 24, 0.94));
  border: 1px solid rgba(76, 141, 255, 0.22);
  box-shadow:
    0 32px 80px rgba(4, 0, 22, 0.6),
    0 0 70px rgba(76, 141, 255, 0.16);
  backdrop-filter: blur(22px);
  text-align: center;
  z-index: 1;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 35% 20%, rgba(76, 141, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.card-header {
  display: grid;
  gap: 0.75rem;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(76, 141, 255, 0.16);
  border: 1px solid rgba(76, 141, 255, 0.38);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.auth-badge.success {
  background: rgba(0, 200, 120, 0.18);
  border-color: rgba(0, 200, 120, 0.45);
  color: #93ffda;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw + 1rem, 2.1rem);
  font-weight: 600;
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.input-wrap {
  margin-top: 1.75rem;
}

input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(76, 141, 255, 0.25);
  background: rgba(10, 8, 30, 0.9);
  color: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: rgba(198, 200, 255, 0.55);
}

input:focus {
  outline: none;
  border-color: rgba(76, 141, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(76, 141, 255, 0.25);
}

button {
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 0.98rem);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  /* ✅ Fix: Minimum touch target size for mobile */
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.primary-btn {
  background: linear-gradient(120deg, var(--accent-electric), var(--accent-violet), var(--accent-magenta));
  color: #050417;
  box-shadow: 0 22px 40px rgba(9, 0, 40, 0.45);
  border: 1px solid rgba(76, 141, 255, 0.45);
}

.primary-btn:hover {
  transform: translateY(-3px);
  background-position: right center;
  box-shadow: 0 28px 55px rgba(9, 0, 40, 0.55);
}

.primary-btn:disabled {
  opacity: 0.75;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.secondary-btn {
  background: rgba(76, 141, 255, 0.14);
  border: 1px solid rgba(76, 141, 255, 0.28);
  color: var(--text-primary);
}

.secondary-btn:hover {
  transform: translateY(-3px);
  background: rgba(76, 141, 255, 0.24);
  box-shadow: 0 18px 32px rgba(76, 141, 255, 0.25);
  border-color: rgba(127, 90, 240, 0.45);
}

#status {
  margin-top: 1.1rem;
  min-height: 1.3rem;
  font-size: 0.92rem;
  color: rgba(245, 245, 255, 0.75);
}

.success {
  color: #00c878;
}

.error {
  color: #ff4d4f;
}

.info {
  color: rgba(245, 245, 255, 0.65);
}

.hidden {
  display: none !important;
}

.helper-actions {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: rgba(210, 210, 255, 0.55);
}

.helper-actions a {
  color: rgba(198, 205, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.helper-actions a:hover {
  color: #ffffff;
}

.back-link {
  display: inline-block;
  margin-top: 1.8rem;
  font-size: 0.85rem;
  color: rgba(198, 205, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #ffffff;
}

.download-card {
  text-align: left;
}

.download-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.release-version {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: rgba(214, 216, 255, 0.7);
}

.download-grid.release-only {
  grid-template-columns: 1fr;
}

.download-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(23, 20, 35, 0.85);
  border: 1px solid rgba(118, 226, 255, 0.2);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.download-link:hover {
  transform: translateY(-3px);
  border-color: rgba(118, 226, 255, 0.45);
  box-shadow: 0 18px 32px rgba(76, 58, 255, 0.25);
}

.download-link.disabled {
  pointer-events: none;
  opacity: 0.6;
  border-style: dashed;
}

.action-icon {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(76, 58, 255, 0.18);
  color: rgba(227, 227, 255, 0.85);
  overflow: hidden;
}

.action-icon.github {
  background: #ffffff;
  border: 1px solid rgba(118, 226, 255, 0.25);
}

.action-icon.github img {
  filter: none;
}

.action-icon img {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.download-text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.download-text small {
  font-size: 0.78rem;
  color: rgba(210, 210, 255, 0.65);
}

.download-note {
  margin-top: 1.6rem;
  font-size: 0.85rem;
  color: rgba(210, 210, 255, 0.65);
  text-align: center;
}

.download-note a {
  color: rgba(198, 205, 255, 0.9);
  text-decoration: none;
}

.download-note a:hover {
  color: #ffffff;
}

.sign-out {
  margin-top: 1.6rem;
}

.dashboard-card {
  width: min(960px, 100%);
  text-align: left;
}

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel {
  border-radius: 20px;
  padding: 1.6rem;
  background: rgba(22, 18, 35, 0.78);
  border: 1px solid rgba(118, 226, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.panel-subtitle {
  margin: 0 0 1.2rem;
  color: rgba(214, 216, 255, 0.65);
  font-size: 0.95rem;
}

.discord-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(76, 58, 255, 0.3), rgba(118, 226, 255, 0.28));
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.2rem;
}

.discord-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(76, 58, 255, 0.28);
}

.discord-text {
  font-weight: 600;
}

.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.quick-links a {
  color: rgba(198, 205, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.quick-links a:hover {
  color: #ffffff;
}

.update-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: grid;
  gap: 0.75rem;
}

.update-title {
  display: block;
  font-weight: 600;
  color: #f5f5ff;
}

.update-date {
  display: block;
  font-size: 0.83rem;
  color: rgba(210, 210, 255, 0.6);
}

.update-detail {
  display: block;
  font-size: 0.85rem;
  color: rgba(220, 222, 255, 0.75);
  margin-top: 0.2rem;
}

.update-detail a {
  color: rgba(220, 222, 255, 0.9);
  text-decoration: underline;
}

.update-detail a:hover {
  color: #ffffff;
}

.full-width {
  display: block;
  width: 100%;
  text-align: center;
}

.dashboard-footer-actions {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Marketing content pages */
body.content-page {
  background:
    radial-gradient(circle at 18% 20%, rgba(76, 141, 255, 0.08), transparent 55%),
    radial-gradient(circle at 78% 6%, rgba(127, 90, 240, 0.1), transparent 60%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 62%, #080a16 100%);
  color: var(--text-primary);
}

.trading-journal-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 12, 26, 0.88);
  border-bottom: 1px solid rgba(76, 141, 255, 0.16);
  backdrop-filter: blur(16px);
  padding: 1.1rem 0;
  /* ✅ Fix: Prevent header overflow on mobile */
  width: 100%;
  overflow-x: hidden;
}

.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.5rem, 2vw, 1rem);
  flex-wrap: wrap;
}

.site-brand {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--accent-electric), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.1rem);
  flex-wrap: wrap;
  /* ✅ Fix: Better mobile nav spacing */
  justify-content: center;
}

.site-nav a {
  color: rgba(226, 229, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  /* ✅ Fix: Responsive font size for nav links */
  font-size: clamp(0.85rem, 2vw, 1rem);
  /* ✅ Fix: Touch-friendly tap targets */
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--accent-electric);
}

.site-main {
  padding-bottom: 4rem;
}

.page-hero {
  text-align: center;
  padding: 4.5rem 0 3rem;
}

.page-hero h1 {
  margin: 0 auto 1rem;
  max-width: 760px;
  /* ✅ Fix: Better mobile typography scaling */
  font-size: clamp(1.75rem, 5vw, 3.4rem);
  background: linear-gradient(45deg, #ffffff, var(--accent-electric), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* ✅ Fix: Prevent text overflow on small screens */
  word-wrap: break-word;
  hyphens: auto;
}

.page-hero p {
  margin: 0.6rem auto 0;
  max-width: 720px;
  color: var(--text-muted);
  /* ✅ Fix: Responsive paragraph text */
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.6;
}

.journal-hero {
  padding: clamp(3.8rem, 5vw + 2rem, 6rem) 0 3.5rem;
  position: relative;
}

.journal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(76, 141, 255, 0.14), transparent 60%),
    radial-gradient(circle at 82% 10%, rgba(127, 90, 240, 0.12), transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}

.journal-hero__inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  position: relative;
  z-index: 1;
}

.journal-hero__content h1 {
  margin: 0 0 1rem;
  /* ✅ Fix: Mobile-optimized heading size */
  font-size: clamp(1.75rem, 5vw, 3.6rem);
  background: linear-gradient(45deg, #ffffff, var(--accent-electric), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-wrap: break-word;
  hyphens: auto;
}

.journal-hero__content p {
  margin: 0 0 2rem;
  color: var(--text-muted);
  /* ✅ Fix: Responsive hero text */
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.6;
}

.journal-hero__visual img {
  width: 100%;
  max-width: 520px;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(76, 141, 255, 0.22);
  box-shadow:
    0 28px 68px rgba(5, 0, 26, 0.6),
    0 0 45px rgba(76, 141, 255, 0.2);
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* ✅ Fix: Responsive button padding */
  padding: clamp(0.75rem, 2vw, 0.95rem) clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 14px;
  background: linear-gradient(120deg, var(--accent-electric), var(--accent-violet), var(--accent-magenta));
  color: #07071c;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 24px 55px rgba(12, 0, 40, 0.5);
  border: 1px solid rgba(76, 141, 255, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* ✅ Fix: Touch-friendly button size */
  min-height: 44px;
  font-size: clamp(0.9rem, 2vw, 1rem);
  -webkit-tap-highlight-color: transparent;
}

.primary-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 70px rgba(12, 0, 40, 0.6);
}

.primary-cta:active {
  transform: translateY(-2px);
}

.journal-features {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.journal-feature {
  background: rgba(13, 16, 38, 0.78);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid rgba(76, 141, 255, 0.2);
  box-shadow: 0 18px 38px rgba(5, 0, 26, 0.45);
}

.journal-feature h2 {
  margin: 0 0 0.9rem;
  font-size: 1.45rem;
  color: #ffffff;
}

.journal-feature p {
  margin: 0;
  color: var(--text-muted);
}

.section-block {
  padding: 3.5rem 0;
}

.section-block.alt {
  position: relative;
}

.section-block.alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 16, 38, 0.7), rgba(8, 10, 24, 0.7));
  pointer-events: none;
}

.section-block.alt .site-container {
  position: relative;
  z-index: 1;
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--text-muted);
}

.section-intro h2 {
  margin-bottom: 0.8rem;
  color: #ffffff;
  font-size: clamp(1.9rem, 2vw + 1rem, 2.4rem);
}

.section-intro p {
  margin: 0;
}

.section-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.comparison-section {
  text-align: center;
}

.comparison-section h2 {
  margin-bottom: 2rem;
  font-size: clamp(2rem, 2.5vw + 1rem, 2.5rem);
}

.comparison-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.comparison-column {
  background: rgba(13, 16, 34, 0.82);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid rgba(76, 141, 255, 0.18);
  box-shadow: 0 20px 42px rgba(5, 0, 26, 0.45);
  text-align: left;
}

.comparison-column h3 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: #ffffff;
}

.comparison-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--text-muted);
}

.checklist li {
  font-weight: 600;
  color: rgba(239, 240, 255, 0.9);
}

.testimonials {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.testimonial {
  background: rgba(15, 18, 40, 0.8);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(127, 90, 240, 0.25);
  box-shadow: 0 18px 38px rgba(5, 0, 26, 0.45);
  color: var(--text-muted);
  font-style: italic;
}

.testimonial span {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: rgba(229, 233, 255, 0.8);
}

.cta-section {
  padding: 4rem 0;
  position: relative;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, rgba(76, 141, 255, 0.16), transparent 60%);
  pointer-events: none;
}

.cta-section__inner {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-section__inner h2 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw + 1rem, 2.7rem);
}

.footer-minimal {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  text-align: center;
}

.footer-minimal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  justify-content: center;
}

.footer-minimal a {
  color: rgba(226, 229, 255, 0.82);
  text-decoration: none;
}

.footer-minimal a:hover {
  color: var(--accent-electric);
}

.footer-minimal p {
  margin: 0;
  color: rgba(214, 216, 255, 0.7);
}

.feature-card {
  background: rgba(13, 16, 38, 0.78);
  border-radius: 18px;
  padding: 1.8rem;
  border: 1px solid rgba(76, 141, 255, 0.18);
  box-shadow: 0 18px 38px rgba(5, 0, 26, 0.5);
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
}

.section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.section-list li {
  background: rgba(11, 13, 28, 0.82);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(76, 141, 255, 0.15);
  color: var(--text-muted);
}

.section-list li strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #ffffff;
}

.internal-links {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.internal-links a {
  color: var(--accent-electric);
  text-decoration: none;
  font-weight: 600;
}

.internal-links a:hover {
  color: var(--accent-violet);
}

.cta-banner {
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(76, 141, 255, 0.16), rgba(127, 90, 240, 0.16));
  border: 1px solid rgba(76, 141, 255, 0.22);
  text-align: center;
}

.cta-banner h3 {
  margin: 0 0 0.8rem;
}

.cta-banner p {
  margin: 0.4rem auto 1.2rem;
  max-width: 620px;
  color: var(--text-muted);
}

.cta-banner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--accent-electric), var(--accent-violet));
  color: #050417;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(76, 141, 255, 0.32);
  box-shadow: 0 18px 32px rgba(5, 0, 26, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-banner a:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 42px rgba(5, 0, 26, 0.55);
}

.site-footer {
  border-top: 1px solid rgba(76, 141, 255, 0.18);
  background: linear-gradient(135deg, rgba(4, 2, 16, 0.95), rgba(9, 5, 28, 0.95));
  padding: 2.2rem 0;
  color: rgba(214, 216, 255, 0.65);
}

.site-footer .site-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}

.site-footer nav a {
  color: rgba(226, 229, 255, 0.82);
  text-decoration: none;
  font-weight: 500;
}

.site-footer nav a:hover {
  color: var(--accent-electric);
}

.site-footer p {
  margin: 0;
}

/* ✅ Fix: Comprehensive responsive breakpoints for all devices */

/* iPad / Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .site-container {
    width: 94%;
  }

  .journal-features,
  .section-grid,
  .comparison-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}

/* Tablet Portrait and Small Laptops (768px - 820px) */
@media (max-width: 820px) {
  .site-header {
    position: relative;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    gap: 0.8rem;
  }

  .site-nav a {
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem;
  }

  .journal-hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .journal-hero__content p {
    margin-bottom: 1.6rem;
  }

  .journal-hero__visual img {
    margin: 0 auto;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .primary-cta {
    width: 100%;
  }

  .page-hero {
    padding-top: 3.2rem;
    padding-bottom: 2rem;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 2.5rem 0;
  }
}

/* Mobile Landscape / Large Phones (481px - 767px) */
@media (max-width: 767px) {
  body {
    font-size: 0.95rem;
  }

  .site-brand {
    font-size: 1.2rem;
  }

  .site-nav {
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .page-hero h1,
  .journal-hero__content h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.2;
  }

  .section-intro h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .journal-features,
  .section-grid,
  .comparison-grid,
  .testimonials {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .feature-card,
  .journal-feature,
  .comparison-column {
    padding: 1.5rem;
  }

  .cta-banner {
    padding: 1.5rem;
  }

  .internal-links {
    flex-direction: column;
    align-items: stretch;
  }
}

/* iPhone 12/13/14 Pro Max, Android Large (431px - 480px) */
@media (max-width: 480px) {
  .site-header .site-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .site-brand {
    font-size: 1.15rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-around;
    gap: 0.3rem;
  }

  .site-nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.3rem;
    white-space: nowrap;
  }

  .journal-hero {
    padding: 2.5rem 0 2rem;
  }

  .page-hero {
    padding: 2.5rem 0 1.5rem;
  }

  .section-block {
    padding: 2rem 0;
  }

  h1 {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  h2 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }

  h3 {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
  }

  .feature-card,
  .journal-feature,
  .comparison-column,
  .testimonial {
    padding: 1.25rem;
  }

  .cta-banner {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }

  .primary-cta {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }

  button {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
}

/* iPhone SE, Android Small (360px - 430px) */
@media (max-width: 430px) {
  .site-container {
    width: 96%;
  }

  .site-nav a {
    font-size: 0.75rem;
    padding: 0.35rem 0.25rem;
  }

  .page-hero h1,
  .journal-hero__content h1 {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .section-intro h2,
  .comparison-section h2 {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  .feature-card h3,
  .journal-feature h2,
  .comparison-column h3 {
    font-size: 1.15rem;
  }
}

/* iPhone SE (375px) */
@media (max-width: 375px) {
  body {
    font-size: 0.9rem;
  }

  .site-brand {
    font-size: 1.1rem;
  }

  .site-nav {
    gap: 0.25rem;
  }

  .site-nav a {
    font-size: 0.7rem;
    padding: 0.3rem 0.2rem;
  }

  h1 {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .feature-card,
  .journal-feature,
  .comparison-column,
  .testimonial,
  .cta-banner {
    padding: 1rem;
  }

  .primary-cta,
  button {
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
  }

  .section-list li {
    padding: 1rem 1.2rem;
  }
}

/* Extra Small Phones (< 360px) */
@media (max-width: 360px) {
  .site-container {
    width: 98%;
  }

  .site-header .site-container {
    padding: 0.25rem 0;
  }

  .site-brand {
    font-size: 1rem;
  }

  .site-nav a {
    font-size: 0.65rem;
    padding: 0.25rem 0.15rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  h3 {
    font-size: 1rem;
  }

  p {
    font-size: 0.85rem;
  }

  .feature-card,
  .journal-feature,
  .comparison-column {
    padding: 0.85rem;
  }

  .primary-cta,
  button {
    font-size: 0.8rem;
    padding: 0.65rem 0.85rem;
  }
}

@keyframes gridShift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

@media (max-width: 520px) {
  body.auth-page {
    padding: 2.2rem 1.2rem;
  }

  .card {
    border-radius: 18px;
    padding: 2rem 1.6rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-footer-actions .sign-out,
  .dashboard-footer-actions .back-link,
  .discord-cta {
    width: 100%;
    text-align: center;
  }

  .download-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-icon {
    min-width: 2.2rem;
    min-height: 2.2rem;
  }

  .action-icon img {
    width: 1.2rem;
    height: 1.2rem;
  }
}
