@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Modern Design Tokens & Variables --- */
:root {
  --primary-color: #29A661;
  --primary-hover: #1e804a;
  --primary-rgb: 41, 166, 97;
  --secondary-color: #0A2A1B;
  
  /* System Theme Defaults (Light Theme) */
  --bg-color: #f6f8f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --text-main: #111827;
  --text-muted: #5e6b62;
  --border-color: #e2e8f0;
  --hero-gradient: linear-gradient(135deg, #e9f7f0 0%, #f6f8f7 100%);
  --nav-bg: rgba(246, 248, 247, 0.8);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --accent-glow: rgba(41, 166, 97, 0.15);
}


/* --- Base Styles & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

/* --- Full Screen Splash Layout --- */
.landing-body {
  height: 100dvh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--hero-gradient);
  padding: 3rem 4rem;
}

/* Center Branding Block */
.center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 800px;
  width: 100%;
  margin: auto;
  flex: 1;
  gap: 1rem;
}

.center-logo-glow {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.center-logo-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background-color: var(--primary-color);
  filter: blur(50px);
  opacity: 0.35;
  z-index: 1;
  border-radius: 50%;
}

.center-logo {
  width: 7rem;
  height: 7rem;
  border-radius: 1.75rem;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-color);
  position: relative;
  z-index: 2;
}

.branding-title {
  font-size: clamp(2.5rem, 8vh, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.branding-title span {
  color: var(--primary-color);
}

.branding-tagline {
  font-size: clamp(1.2rem, 3.5vh, 1.8rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Bottom Actions Bar */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  flex-shrink: 0;
}

.legal-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legal-links a:hover {
  color: var(--primary-color);
}

.download-options {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.store-badge {
  display: inline-block;
  height: 2.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0.35rem;
  overflow: hidden;
}

.store-badge svg {
  height: 100%;
  width: auto;
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.apk-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: underline;
  white-space: nowrap;
}

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

.legal-page {
  padding: 4rem 0;
  background-color: var(--bg-color);
  min-height: 100dvh;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 3rem 4rem;
  box-shadow: var(--shadow-sm);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.back-link:hover {
  color: var(--primary-color);
  transform: translateX(-4px);
}

.legal-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.legal-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.legal-content p {
  color: var(--text-main);
  opacity: 0.95;
  line-height: 1.7;
}

.legal-content ul {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-content li {
  line-height: 1.6;
}

.legal-content table {
  display: block; /* Allows horizontal scroll */
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.legal-content th, .legal-content td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

.legal-content th {
  background-color: rgba(var(--primary-rgb), 0.05);
  font-weight: 600;
}

/* Simple navbar for sub-pages */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
}

/* Footer for Legal Pages */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  color: var(--text-main);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-legal-links a:hover {
  color: var(--primary-color);
}

/* --- Responsive Media Queries --- */

@media (max-width: 768px) {
  .landing-body {
    padding: 1.5rem 1rem;
    overflow: hidden; /* Lock viewport on mobile too */
  }
  
  .center-container {
    padding: 1rem 0;
    gap: 0.75rem;
  }
  
  .center-logo {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1.35rem;
    margin-bottom: 0.5rem;
  }
  
  .branding-title {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
    line-height: 1.2;
  }
  
  .branding-tagline {
    font-size: clamp(0.95rem, 4.5vw, 1.15rem);
    margin-top: 0.25rem;
    padding: 0 0.5rem;
  }
  
  .bottom-bar {
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
  }
  
  .legal-links {
    order: 2;
    justify-content: center;
    width: 100%;
    gap: 0.85rem;
    font-size: 0.85rem;
  }
  
  .download-options {
    order: 1;
    flex-direction: row; /* Horizontal alignment */
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    width: 100%;
  }
  
  .store-badge {
    height: 2.35rem; /* Scaled down slightly to fit side-by-side */
    width: 120px;
  }
  
  .store-badge svg {
    width: 100%;
    height: auto;
  }
  
  .legal-page .container {
    padding: 0;
  }

  .legal-page {
    padding: 0;
  }

  .legal-container {
    margin: 0 1rem;
    padding: 2rem 1.5rem; /* Balanced horizontal reading space */
    border-radius: 0.5rem;
  }
}

@media (max-width: 480px) {
  .legal-container {
    margin: 0;
    padding: 1.5rem 1rem;
    border-radius: 0; /* Full bleed edge-to-edge layout on narrow devices */
    border-left: none;
    border-right: none;
  }
}
