:root {
  --bg-top: #fff8e8;
  --bg-bottom: #d9f1d1;
  --panel: #f9f6ef;
  --card-dark: #1f3b2c;
  --card-glow: #d8b56f;
  --text: #1d2e24;
  --muted: #5b6a61;
  --accent: #2b7a4b;
  --shadow: 0 22px 38px rgba(19, 47, 31, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.bg-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(31, 59, 44, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.35;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 7rem;
}

.hero {
  margin-bottom: 1.25rem;
}

.eyebrow,
h1,
.section-title,
.panel h2 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin: 0;
  font-size: 1.3rem;
  color: var(--accent);
}

h1 {
  margin: 0.2rem 0;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 0.95;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.panel {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--panel) 85%, white 15%);
  border: 2px solid rgba(43, 122, 75, 0.22);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07);
}

.panel h2 {
  margin: 0;
  font-size: 1.6rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(31, 59, 44, 0.25);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: white;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(130deg, #2d7d4e, #2d6158);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.section-title {
  margin: 0 0 0.7rem;
  font-size: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.plant-card {
  border-radius: 18px;
  background: linear-gradient(170deg, #f7f2de, #efe7c9);
  border: 5px solid #d8c28a;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(8px);
  opacity: 0;
  animation: card-enter 420ms ease forwards;
}

.card-hit {
  display: block;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.card-hit:hover {
  filter: none;
}

.plant-card:hover {
  transform: translateY(-2px);
}

.card-frame {
  position: relative;
  border-bottom: 4px solid #ccb171;
  background: linear-gradient(155deg, #2a4d37, #1b3228);
  min-height: 220px;
}

.plant-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: none;
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.card-info {
  padding: 0.9rem;
}

.plant-name {
  margin: 0;
  font-size: 1.25rem;
}

.plant-species {
  margin: 0.15rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.watering-line {
  margin: 0;
  font-weight: 700;
  color: var(--card-dark);
}

.fab {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  padding: 0;
  font-size: 2.2rem;
  line-height: 1;
  display: grid;
  place-content: center;
  box-shadow: 0 15px 28px rgba(18, 53, 32, 0.32);
  z-index: 8;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 25, 18, 0.58);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  width: min(540px, 95vw);
  z-index: 1;
  border-radius: 18px;
  border: 2px solid rgba(43, 122, 75, 0.28);
  background: #f9f6ef;
  padding: 1.25rem 1rem 1rem;
  box-shadow: 0 16px 40px rgba(6, 21, 14, 0.25);
}

.detail-panel {
  width: min(820px, 95vw);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(230px, 1fr);
  gap: 1rem;
}

.detail-image-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 300px;
  background: linear-gradient(155deg, #2a4d37, #1b3228);
}

.detail-photo {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: none;
}

.detail-content {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  padding-top: 0.2rem;
}

.detail-content h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 0.95;
  font-family: "Bebas Neue", sans-serif;
}

.detail-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.45rem;
}

.ghost-button {
  background: #e5ebdf;
  border: 1px solid rgba(31, 59, 44, 0.28);
  color: #203326;
}

.ghost-button:hover {
  filter: brightness(0.98);
}

.modal-close {
  position: absolute;
  right: 0.6rem;
  top: 0.45rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  background: #d8e6d2;
  color: #203326;
  border: 1px solid rgba(31, 59, 44, 0.25);
  z-index: 2;
}

.modal-form {
  box-shadow: none;
  border: 0;
  background: transparent;
  padding: 0.25rem 0 0;
}

body.modal-open {
  overflow: hidden;
}

@keyframes card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .container {
    padding-top: 1.2rem;
  }

  h1 {
    line-height: 1;
  }

  .detail-panel {
    grid-template-columns: 1fr;
  }

  .detail-image-wrap,
  .detail-photo {
    min-height: 230px;
  }
}
