/* =========================
   GLOBAL RESET
========================= */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to bottom, #CCD5AE, #E9EDC9);
  color: #2f2f2f;
  min-height: 100vh;
}

/* =========================
   HEADER
========================= */

header {
  text-align: center;
  padding: 30px 20px 10px;
}

.logo-container {
  margin-bottom: 15px;
}

.logo {
  width: 200px;
  max-width: 90%;
}

/* =========================
   NAVIGATION
========================= */

.nav-links ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  list-style: none;
  padding: 15px 0;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a,
.nav-login-btn,
.nav-guest-btn {
  text-decoration: none;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-links a {
  background-color: #7a5a43;
}

.nav-links a:hover {
  background-color: #644733;
  transform: translateY(-1px);
}

.nav-login-btn {
  background-color: #D4A373;
}

.nav-login-btn:hover {
  background-color: #c48e5f;
  transform: translateY(-1px);
}

.nav-guest-btn {
  background-color: #6b4f3b;
}

.nav-guest-btn:hover {
  background-color: #5a3e2f;
  transform: translateY(-1px);
}

.nav-links a[aria-current="page"],
.nav-links button[aria-current="page"] {
  background-color: #3f2e22;
  color: #fff6df;
  box-shadow: 0 0 0 2px rgba(250, 237, 205, 0.75);
}

/* =========================
   PAGE LAYOUT
========================= */

.page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.home-main {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  padding: 20px;
  align-items: stretch;
}

.hero-card,
.content-card {
  background: rgba(250, 237, 205, 0.92);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.hero-card {
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.35) 0%, rgba(212, 163, 115, 0) 70%);
}

.hero-tag {
  display: inline-block;
  background: #e9edc9;
  color: #5f4b3a;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-card h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-cta {
  background-color: #6b4f3b;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.primary-cta:hover {
  background-color: #5a3e2f;
  transform: translateY(-1px);
}

.secondary-link {
  color: #6b4f3b;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
}

.secondary-link:hover {
  background: #efe3bf;
}

.content-card {
  padding: 28px;
}

.section-head h2 {
  margin-bottom: 6px;
}

.section-head p {
  color: #666;
  margin-bottom: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feature-tile {
  border: 1px solid #d9c9a7;
  background: #fff8e7;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  font-weight: 700;
  color: #5f4b3a;
  transition: all 0.2s ease;
}

.feature-tile:hover,
.feature-tile.is-active {
  border-color: #d4a373;
  background: #f1dfbd;
}

.feature-panel {
  margin-top: 14px;
  background: #fff8e7;
  border-radius: 12px;
  padding: 16px;
  min-height: 110px;
}

.feature-panel h3 {
  margin-bottom: 6px;
}

.about-item {
  border-top: 1px solid #e0d2b5;
  padding: 12px 0;
}

.about-item:first-of-type {
  border-top: none;
}

.about-item summary {
  cursor: pointer;
  font-weight: 700;
  color: #5f4b3a;
}

.about-item p {
  margin-top: 8px;
  color: #444;
  line-height: 1.5;
}

/* =========================
   AUTH CARD
========================= */

.forms-card {
  background-color: #FAEDCD;
  padding: 50px 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.forms-card:hover {
  transform: translateY(-3px);
}

.forms-card h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

/* =========================
   INPUT FIELDS
========================= */

.forms-card input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  font-size: 0.95rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}


.forms-card input:focus {
  outline: none;
  border-color: #D4A373;
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.2);
}

/* =========================
   BUTTONS
========================= */

.forms-card button {
  width: 100%;
  padding: 12px;
  background-color: #D4A373;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  box-sizing: border-box;
}

.forms-card button:hover {
  background-color: #c48e5f;
  transform: translateY(-1px);
}

.remember-me {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px; /* space between checkbox and text */
  

  width: 35%;
  margin: 10px auto 0;
  font-size: 14px;
  margin-top: 10px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

/* =========================
   LINK TEXT
========================= */

.forms-card p {
  margin-top: 18px;
  font-size: 0.9rem;
}

.forms-card a {
  color: #6b4f3b;
  font-weight: 600;
  text-decoration: none;
}

.forms-card a:hover {
  text-decoration: underline;
}

/* =========================
   MESSAGE STYLING
========================= */

#signupMessage,
#loginMessage {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #b23a3a;
  min-height: 18px;
}

/* =========================
   NOTES PAGE (future-ready)
========================= */

.note-editor {
  margin-bottom: 2rem;
}

.notes-container {
  margin-top: 1rem;
}

.notes-container {
  display: grid;
  gap: 15px;
  margin-top: 30px;
}



/* =========================
   NOTES CARD
========================= */

.notes-card {
  background-color: #FAEDCD;
  padding: 30px;
  border-radius: 20px;
  width: 100%;
  max-width: 760px;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.notes-toolbar {
  margin-bottom: 16px;
}

.notes-toolbar h1 {
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Search */
#searchInput {
  width: 100%;
  padding: 12px;
  margin-bottom: 0;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  box-sizing: border-box;
}

.secondary-btn {
  border: 1px solid #d4a373;
  background-color: #fff8e7;
  color: #6b4f3b;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.secondary-btn:hover {
  background-color: #f2dfbc;
}

.notes-status {
  margin-top: 10px;
  color: #6f6f6f;
  font-size: 0.92rem;
}

.guest-mode-banner {
  margin-top: 8px;
  color: #5f4b3a;
  background: #f6e7c9;
  border: 1px solid #e5cfa3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

/* Note editor layout */
.note-editor {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.note-editor input,
.note-editor textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.note-editor textarea {
  min-height: 120px;
  resize: vertical;
}

.editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

#saveNoteBtn {
  align-self: flex-start;
  width: auto;
  padding: 10px 18px;
  background-color: #6b4f3b;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
}

#saveNoteBtn:hover {
  background-color: #5a3e2f;
}

.note {
  background: #fff8e7;
  border: 1px solid #ecd8b7;
  border-radius: 12px;
  padding: 14px;
}

.note h3 {
  margin-bottom: 8px;
}

.note p {
  margin-bottom: 12px;
  line-height: 1.45;
  color: #3f3f3f;
}

.note-actions {
  display: flex;
  gap: 8px;
}

.note-action {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

.note-action.edit {
  background: #d4a373;
  color: white;
}

.note-action.edit:hover {
  background: #be8755;
}

.note-action.delete {
  background: #b23a3a;
  color: white;
}

.note-action.delete:hover {
  background: #972f2f;
}

.notes-empty {
  color: #646464;
  background: #fff8e7;
  border: 1px dashed #d8c299;
  border-radius: 10px;
  padding: 14px;
}

/* Logout button */
.logout-btn {
  width: auto;
  margin-top: 20px;
  background-color: #b23a3a;
  padding: 10px 18px;
  border-radius: 8px;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  box-sizing: border-box;
}

.logout-btn:hover {
  background-color: #992f2f;
}

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

@media (max-width: 500px) {
  .login-card {
    padding: 40px 25px;
  }

  .nav-links ul {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: flex-start;
  }

  .nav-links a,
  .nav-login-btn,
  .nav-guest-btn {
    padding: 8px 12px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .home-main {
    padding: 10px;
    gap: 16px;
  }

  .hero-card,
  .content-card {
    padding: 22px;
    border-radius: 16px;
  }

  .hero-card h1 {
    font-size: 1.7rem;
  }

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

  .remember-me {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
  }

  label[for="rememberMe"] {
    text-align: right;
  }

  .notes-layout {
    flex-direction: column;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .secondary-btn {
    width: 100%;
  }

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

  .note-action {
    flex: 1;
  }

  .auth-card {
    width: 100%;
    max-width: 420px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  }

  .note-editor input,
  .note-editor textarea {
    font-size: 16px; /* Prevents zoom on iPhone */
    width: 100%;
    box-sizing: border-box;
  }

  .notes-container {
    width: 100%;
    display: grid;
    gap: 15px;
  }
  

  .remember-me {
    width: 100%;
    justify-content: center;
  }

  /* Make layout stack on mobile */

}