:root {
  --primary: #7F2C19;
  --primary-variant: rgba(127, 44, 25, 0.1);
  --surface: #ffffff;
  --background: #F8F5F1;
  --foreground: #1a1a1a;
  --foreground-variant: #656366;
  --error: #D32F2F;
  --font-family: 'Poppins', sans-serif;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-md: 12px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--foreground);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Header */
header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  /* Fixed height for consistency */
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1002;
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-name {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 1003;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span {
  background-color: var(--primary);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Navigation */
nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--foreground-variant);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  background: var(--surface);
  padding: 4px;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-left: 1rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--foreground-variant);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background-color: var(--primary);
  color: white;
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.page {
  animation: fadeIn 0.5s ease-out;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100vh - 80px - 4rem);
  /* Viewport - header - padding */
  gap: 4rem;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-title {
  /* Fluid font size: min 2.5rem, preferred 5vw, max 4rem */
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--primary);
  white-space: nowrap;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--foreground-variant);
  margin-bottom: 2.5rem;
  font-weight: 400;
  max-width: 90%;
}

.hero-img {
  max-width: 100%;
  width: 100%;
  max-width: 350px;
  /* Limit max width */
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
  z-index: 2;
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.play-store-btn {
  display: inline-block;
  transition: transform 0.2s ease;
  height: 80px;
  margin: -10px;
  /* Offset the badge's internal padding */
}

.play-store-btn img {
  height: 100%;
  width: auto;
}

.play-store-btn:hover {
  transform: scale(1.05);
}

.hero-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at center, var(--primary-variant) 0%, transparent 70%);
  z-index: 1;
  border-radius: 50%;
}

/* Privacy & Delete Containers */
.privacy-container,
.delete-container {
  background-color: var(--surface);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 2rem auto;
  border: 1px solid rgba(0, 0, 0, 0.03);
  width: 100%;
}

.privacy-container {
  max-width: 800px;
}

.delete-container {
  max-width: 600px;
}

.privacy-title {
  color: var(--foreground);
  margin-bottom: 2rem;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  position: relative;
  line-height: 1.3;
}

.privacy-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

.privacy-content {
  font-size: 1.05rem;
  color: #333;
}

.privacy-content h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.privacy-content h4 {
  font-size: 1.1rem;
  color: #444;
  margin-top: 1.5rem;
}

/* Delete Form Specifics */
.delete-container .privacy-title {
  margin-bottom: 1.5rem;
}

.warning-note {
  background-color: #FFF4E5;
  border-left: 4px solid #FF9800;
  padding: 1.25rem;
  border-radius: 8px;
  color: #663C00;
  margin-bottom: 2rem;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #eee;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #fcfcfc;
  -webkit-appearance: none;
  /* Reset iOS styles */
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(127, 44, 25, 0.05);
}

.btn-submit {
  width: 100%;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(127, 44, 25, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-submit:active {
  transform: scale(0.98);
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--foreground-variant);
  font-size: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablet and below (max-width: 900px) */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }

  .logo-container {
    flex: 1;
    /* Allow logo to take space */
  }

  /* Sidebar Menu */
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    /* Wider menu */
    max-width: 80vw;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    padding: 100px 2rem;
    /* Adjusted padding */
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1001;
    align-items: center;
    /* Center items to fix "left padding" look */
    justify-content: flex-start;
  }

  nav.nav-open {
    right: 0;
  }

  /* Overlay */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeOverlay 0.3s ease-out;
  }

  @keyframes fadeOverlay {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .nav-link {
    font-size: 1.25rem;
    width: 100%;
    text-align: center;
    /* Center text */
    padding: 1.2rem 0;
    border-bottom: 1px solid #f5f5f5;
  }

  .nav-link::after {
    display: none;
  }

  /* Adjust Hero for Tablets */
  .hero {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
    gap: 3rem;
  }

  .hero-content {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-cta {
    justify-content: center;
    margin-top: 1.5rem;
  }

  .hero-visual {
    order: 1;
    width: 100%;
  }

  /* Make containers full width minus padding */
  .privacy-container,
  .delete-container {
    padding: 2rem;
    margin: 1rem 0;
  }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
  header {
    padding: 0.8rem 1rem;
  }

  .app-name {
    font-size: 1.2rem;
  }

  /* Improve delete form on small screens */
  .delete-container {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    /* Prevents zoom on iOS */
    padding: 0.8rem;
  }

  .btn-submit {
    padding: 1rem;
    font-size: 1rem;
  }

  .privacy-content h3 {
    font-size: 1.2rem;
  }

  .privacy-content li {
    margin-left: -1rem;
    /* Reclaim space for bullets */
  }
}