/* Global reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base body styles (mobile-first) */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  line-height: 1.6;
}

a {
  color: #7dd3fc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================
   HEADER (MOBILE-FIRST)
============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;      /* stacked by default on mobile */
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #1f2937;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  max-width: 18ch;             /* keeps it from stretching too wide */
}

.logo span {
  color: #38bdf8;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
}

.site-header nav a {
  font-size: 0.85rem;
}

/* Auth button in header */
.btn {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-outline {
  border: 1px solid #38bdf8;
  background: transparent;
  color: #e5e7eb;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.15);
}

.btn.primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0b1120;
}

.btn.primary:hover {
  filter: brightness(1.05);
}

/* ============================
   HERO (MOBILE-FIRST)
============================ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* single column by default */
  gap: 2rem;
  padding: 2.25rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 6vw, 2.4rem); /* scales well on phones */
  line-height: 1.2;
  max-width: 40rem;
  margin-bottom: 1.2rem;   /* breathing room below heading */
}

.hero-text .quote {
  font-size: 0.95rem;
  color: #cbd5f5;
  margin-bottom: 1.5rem;
}

.hero-card {
  background: #020617;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #1f2937;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.hero-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.hero-card .username {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.eulogy-card {
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* ============================
   GENERIC SECTIONS
============================ */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.step {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1.1rem;
  border: 1px solid #1f2937;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* Privacy card is its own block, styled like a step */
.privacy-card {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid #1f2937;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.privacy-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.privacy-card ul {
  margin-left: 1.25rem;
  list-style: disc;
}

.ui-notes ul {
  margin-left: 1.1rem;
  list-style: disc;
  color: #d1d5db;
}

/* ============================
   AUTH SECTION (MOBILE-FIRST)
============================ */

.auth-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* single column by default */
  gap: 2rem;
}

.auth-card,
.auth-info {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1.25rem;
  border: 1px solid #1f2937;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.auth-card label {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

input {
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
}

input:focus {
  outline: none;
  border-color: #38bdf8;
}

.message {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #a7f3d0;
}

.auth-info ul {
  margin-left: 1.1rem;
  list-style: disc;
  color: #d1d5db;
}

/* ============================
   SUPPORT & RESOURCES
============================ */

.support-section p {
  margin-bottom: 1rem;
}

.resource-list {
  list-style: disc;
  margin-left: 1.1rem;
  margin-bottom: 1rem;
}

.resource-list li {
  margin-bottom: 0.4rem;
}

.small-note {
  font-size: 0.85rem;
  color: #9ca3af;
}

.small-note.center {
  text-align: center;
}

/* ============================
   FOOTER
============================ */

.site-footer {
  border-top: 1px solid #1f2937;
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ============================
   INVITE BANNER
============================ */

#invite-banner {
  display: none;
  background: #1f2937;
  color: #fff;
  padding: 20px;
  margin-top: 80px; /* pushes it below the nav header */
  border-left: 4px solid #60a5fa;
  border-radius: 6px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  line-height: 1.5;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.consent-row input[type="checkbox"] {
  margin-top: 4px;
}

#invite-banner button {
  margin-top: 15px;
}

/* ============================
   SHARE / WRITE SECTIONS
============================ */

.share-section .share-form {
  max-width: 480px;
  margin: 1rem auto 0;
}

.share-section input[type="text"] {
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}

.share-result {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.share-result input[type="text"] {
  flex: 1;
  min-width: 0;
}

.write-section textarea {
  width: 100%;
  min-height: 160px;
  margin-top: 0.75rem;
  padding: 0.75rem;
  resize: vertical;
}

.write-section button {
  margin-top: 0.5rem;
}

/* Small button size */
.btn.small {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
}

/* ============================
   ADS / BOOK FEATURE
============================ */

.ads-section {
  margin-top: 2rem;
  text-align: center;
}

.book-feature {
  text-align: center;
  margin-top: 20px;
}

.book-feature img.book-thumb {
  width: 170px;
  display: block;
  margin: 0 auto;
}

.book-caption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #ccc;
}

.step-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #60a5fa;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

em.aboutme {
  font-style: italic !important;
}

/* ============================
   MY TRIBUTES SECTION
============================ */

.tributes-section {
  max-width: 900px;
  margin: 4rem auto;
  padding: 2rem;
}

.tributes-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#tributes-loading {
  color: #9bb6d1;
  margin: 1rem 0;
}

#tributes-error {
  color: #ff6b6b;
  margin: 1rem 0;
}

.tributes-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.tribute-card {
  background: #0f1a28;
  border: 1px solid #1e2d3d;
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.tribute-card p {
  margin: 0.4rem 0;
  line-height: 1.5;
}

.tribute-card strong {
  color: #7ec3ff;
}

.error-note {
  font-size: 0.9rem;
  color: #ff7777;
}

/* ============================
   RESPONSIVE BREAKPOINTS
============================ */

/* Very small screens – tighten a bit more */
@media (max-width: 480px) {
  .hero {
    padding: 2rem 1rem;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .site-header {
    padding-inline: 1rem;
  }
}

/* Larger screens – move to horizontal header & 2-column layouts */
@media (min-width: 900px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .site-header nav {
    flex-wrap: nowrap;
    gap: 1rem;
  }

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

  .logo {
    font-size: 1.25rem;
    max-width: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2.5rem;
    padding: 3rem 1.5rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
    max-width: 42rem;
  }

  .auth-section {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

/* ============================
   TERMS SECTION + MODAL + FEEDBACK (GLOBAL)
============================ */

.terms-section {
  padding: 2rem 1rem;
  max-width: 900px;
  margin: 0 auto 3rem auto;
  font-size: 0.95rem;
  line-height: 1.5;
  border-top: 1px solid #ddd;
}

.terms-section h2 {
  margin-bottom: 0.5rem;
}

.terms-section h3 {
  margin-top: 1rem;
  font-size: 1rem;
}

/* Modal overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Modal content box */
.modal-content {
  background: #ffffff;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  color: #000000; /* dark text on white box */
}

/* Scroll box for terms */
.terms-box {
  height: 150px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
}

/* Feedback section */
#feedback {
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
}

#feedback input,
#feedback textarea {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 10px auto;
  display: block;
}

#feedback button {
  margin-top: 10px;
}
/* ============================
   PROFILE PHOTO PREVIEW
============================ */

.profile-section {
  max-width: 600px;
  margin: 0 auto;
}

.profile-photo-preview {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.profile-photo-preview img {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #38bdf8;
}

/* ============================
   ACCOUNT ACTIONS (FOOTER)
============================ */

.account-actions {
  margin-top: 1.5rem;
  text-align: center;
}

.account-actions .btn {
  margin: 0 0.5rem;
}

/* Slightly “danger” style for delete */
.btn.danger {
  border-color: #f97373;
  color: #fecaca;
}

.btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}
