:root {
  --green-deep: #2d5a27;
  --green-mid: #4a8c3f;
  --green-light: #7db96e;
  --green-pale: #e8f3e5;
  --amber: #c8843a;
  --cream: #f7f3ee;
  --text: #2a2a2a;
  --text-muted: #6b6b6b;
  --white: #ffffff;
  --radius: 12px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  padding-top: 60px;
  padding-left: 30px;
  padding-right: 30px;
}

/* ── TAGLINE CARD ── */
.tagline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.tagline-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

.current-plants {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.topbar input {
  flex: 1;
}

.divider {
  width: 100%;
}

#map {
  height: 350px;
  z-index: 1;
  border-radius: var(--radius);
}

#plant-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: auto auto;
}

.plant-card {
  border: 1px solid #A8A8A8;
  min-width: 175px;
  border-radius: 6px;
  margin: 5px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: baseline;
  align-items: center;
  cursor: pointer;
  text-align: center;
}

.plant-card:hover{
  background-color: #2c950f57;
}

.plant-card img{
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  object-position: center;
}

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

.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  max-width: 90%;
  position: relative;
  text-align: center;
}

.modal-content img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

/* ── CONTENT ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── FORM ── */
.field label {
  display: block;
  font-size: 14px;
  color: #222;
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  background: #e8e7e3;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  color: #888;
  outline: none;
}

.field input::placeholder {
  color: #aaa;
}

/* ── BUTTONS ── */
.btn-login, .btn-signup, .btn-add {
  width: 100%;
  padding: 14px;
  background: #2e7d32;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  margin-top: 10px;
  cursor: pointer;
}

.btn-login:hover, .btn-signup:hover, .btn-add:hover {
  background: #256428;
}

.profile-buttons { 
  width: 100%;             
  display: flex;
  flex-direction: row;     
  gap: 16px;
  margin-bottom: -40px;
}

.profile-buttons button {
  width: 100%;
  padding: 16px;
  font-size: 14px;
  border-radius: 12px;
  border: none;
  background: #6a6565;
  color: white;
  flex: 1;
}

.extra {
  text-align: center;
  margin-top: 15px;
  font-size: 13px;
  color: #666;
}

#brightnessLevel {
  display: block;
  margin-left: auto;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: auto;
  background: #BED563;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 14px;
  z-index: 10;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  display: none;
}

.logout, .filter {
  float: right;
}

.icon-wrapper {
position: relative;
display: inline-block;
}

.icon-wrapper img {
  /* width: 26px; adjust size */
  height: auto;
}

.tooltip {
  position: absolute;
  top: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.icon-wrapper:hover .tooltip {
  opacity: 1;
}

.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  cursor: pointer;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-wrapper:hover .overlay {
  opacity: 1;
}

.plus-icon {
  color: white;
  font-size: 32px;
}

.profile-row {
  display: flex;
  align-items: center;  /* vertically centers the text with the image */
  gap: 16px;            /* space between image and text */
}

.name {
  margin: 0;
  font-size: 18px;
}

.region {
  margin: 0;
  font-size: 14px;
  color: gray;
}

/* TABLET (≥ 768px) */
@media (min-width: 768px) {
  body {
    max-width: 700px;
    padding: 100px;
  }

  .content {
    padding: 32px 28px 120px;
  }

  #map {
    height: 400px;
  }

  #plant-grid {
    flex-direction: row;
    flex-wrap: wrap;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .plant-card {
    width: calc(50% - 12px);
    margin: 0;
  }

  /* Top bar behavior */
  .bottom-nav {
    top: 0;
    bottom: unset;     
    left: 0;             
    transform: none;    
    max-width: 100%;
    height: 80px;
  }
}

/* DESKTOP (≥ 1024px) */
@media (min-width: 1024px) {
  body {
    max-width: 1200px;
    padding: 100px;
  }

  .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 40px 20px 120px;
  }

  .tagline-card {
    grid-column: span 2;
  }

  #map {
    height: 500px;
  }

  #plant-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }

  .plant-card {
    width: 100%;
  }

  .current-plants {
    grid-column: span 2;
  }

  .bottom-nav {
    top: 0;
    bottom: unset;        
    left: 0;              
    transform: none;
    max-width: 100%;
    height: 80px;
  }
}

/* ── AUTH PAGES (LOGIN / SIGNUP / ADD PLANT if needed) ── */

@media (min-width: 768px) {
  .form-page .content {
    display: flex;
    flex-direction: column;
    max-width: 420px;
    margin: 0 auto;
  }

  .nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
}

@media (min-width: 1024px) {
  .form-page .content {
    display: flex;
    flex-direction: column;
    max-width: 450px;
    margin: 0 auto;
  }

  .nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
}