/* The Garden - Styles */

:root {
  --forest-dark: #0a1f0a;
  --forest-mid: #1a3d1a;
  --forest-light: #2d5a2d;
  --grass: #4a7c4a;
  --leaf: #6fb06f;
  --bloom: #ff9ff3;
  --water: #5eb3ff;
  --earth: #8b6f47;
  --light: #f0f7f0;
  --shadow: rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--light);
  background: var(--forest-dark);
  overflow: hidden;
}

/* === LANDING PAGE === */
.landing-page {
  overflow: auto;
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest-mid) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.landing-content {
  text-align: center;
}

.landing-title {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--leaf), var(--bloom));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  color: var(--leaf);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--leaf);
}

.feature p {
  color: var(--light);
  opacity: 0.8;
}

.landing-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 3rem 0;
}

.landing-footer {
  margin-top: 3rem;
  opacity: 0.6;
  font-size: 0.9rem;
}

.landing-footer a {
  color: var(--leaf);
  text-decoration: none;
}

.landing-footer a:hover {
  text-decoration: underline;
}

/* === AUTH PAGES === */
.auth-page {
  overflow: auto;
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest-mid) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
}

.auth-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--leaf);
  margin-bottom: 2rem;
}

.auth-form {
  margin: 2rem 0;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--leaf);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--light);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(111, 176, 111, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.error-message {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #ff6b6b;
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-footer a {
  color: var(--leaf);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-back {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

.auth-back a {
  color: var(--light);
  text-decoration: none;
}

.auth-back a:hover {
  text-decoration: underline;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--grass), var(--leaf));
  color: white;
  box-shadow: 0 4px 12px rgba(111, 176, 111, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(111, 176, 111, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-full {
  width: 100%;
}

/* === GARDEN PAGE === */
.garden-page {
  overflow: hidden;
}

.garden-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(10, 31, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.garden-title {
  font-size: 1.5rem;
  margin: 0;
}

.welcome-user {
  color: var(--leaf);
  font-size: 0.9rem;
}

.header-right {
  display: flex;
  gap: 0.5rem;
}

#garden-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.controls-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 31, 10, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 50;
  font-size: 0.9rem;
  color: var(--leaf);
  text-align: center;
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === MODALS === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-content {
  background: var(--forest-mid);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content h2 {
  margin-bottom: 0.5rem;
  color: var(--leaf);
}

.modal-hint {
  color: var(--light);
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.plant-message {
  font-size: 1.3rem;
  margin: 1.5rem 0;
  line-height: 1.8;
  text-align: center;
}

.plant-meta {
  text-align: center;
  color: var(--leaf);
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.growth-info {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin: 1rem 0;
}

.growth-stage {
  text-align: center;
}

.growth-stage #stageIcon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.water-info {
  text-align: center;
  font-size: 1.2rem;
  color: var(--water);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .landing-title {
    font-size: 2.5rem;
  }
  
  .landing-subtitle {
    font-size: 1.2rem;
  }
  
  .landing-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .garden-header {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    align-items: center;
  }
  
  .garden-title {
    font-size: 1rem !important;
    margin: 0;
  }
  
  .welcome-user {
    display: none;
  }
  
  .header-left {
    flex: 0 0 auto;
  }
  
  .header-right {
    flex: 1;
    justify-content: flex-end;
    gap: 0.25rem;
  }
  
  .garden-header .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .controls-hint {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    bottom: 10px;
    width: 90%;
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1.5;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
}

#charCount {
  float: right;
  font-size: 0.85rem;
  color: var(--leaf);
}