/* Aniimo Trade — plant exchange site.
   Earthy, nature-inspired palette similar to aniimo.com. */
:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --text: #26382b;
  --text-muted: #6e7d72;
  --brand: #2d6a4f;
  --brand-hover: #245a41;
  --brand-light: #e9f2ea;
  --accent: #52b788;
  --border: #ccd8ce;
  --danger: #b3402e;
  --danger-light: #fbe9e7;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand);
  margin-right: auto;
}

.logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text span.logo-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  padding: 6px 0;
  position: relative;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--brand);
  text-decoration: none;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-label {
  font-size: 13px;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  margin: 4px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  padding: 10px 18px;
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
  padding: 10px 16px;
}

.btn-outline:hover {
  background: var(--brand-light);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-delete {
  background: transparent;
  color: var(--danger);
  border-color: transparent;
}

.btn-delete:hover {
  background: var(--danger-light);
}

.hidden {
  display: none !important;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  color: #fff;
  padding: 70px 20px 60px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 40px;
  margin: 0 0 14px;
  font-weight: 800;
  line-height: 1.15;
}

.hero .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* Sections */
.section {
  padding: 40px 20px;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 24px;
  margin: 0;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input[type="search"],
.filter-bar select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  min-width: 220px;
}

.filter-bar select {
  min-width: auto;
  cursor: pointer;
}

/* Plant grid */
.plant-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.plant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.plant-card-media {
  background: var(--brand-light);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.plant-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plant-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.plant-card-season {
  margin: 0;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.plant-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.plant-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Owned plant card */
.plant-card-owned .plant-card-actions {
  justify-content: space-between;
}

/* Trade grid */
.trade-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.trade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.trade-card-status {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.trade-card-with {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.trade-card-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  padding: 40px 0;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  max-height: 90vh;
  margin: 60px auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  overflow: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover {
  color: var(--text);
}

/* Form elements */
.form-grid {
  display: grid;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--brand-hover);
}

/* Login form in header */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.login-form-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form input {
  padding: 8px 12px;
  font-size: 14px;
}

.login-divider span {
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.login-divider span:first-child,
.login-divider span:last-child {
  flex: 0.8;
}

.login-switch {
  margin: 0;
  text-align: center;
}

.login-switch .link-btn {
  text-decoration: none;
  font-weight: 600;
}

.login-switch .link-btn:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: var(--brand);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 20px 28px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-disclaimer {
  margin: 0 0 8px;
  font-size: 13px;
}

.footer-note {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
  }

  .nav-links {
    position: fixed;
    inset: 0 40% 0 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    flex-direction: column;
    padding: 70px 24px 24px;
    gap: 18px;
    transform: translatex(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    transform: translatex(0);
  }

  .nav-toggle {
    display: block;
  }

  .auth-actions {
    gap: 6px;
  }

  .btn-primary,
  .btn-outline {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hero {
    padding: 50px 16px 40px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar input[type="search"] {
    min-width: auto;
    flex: 1;
  }

  .modal-content {
    margin: 20px auto;
    padding: 20px;
  }
}

/* Utilities */
.accent {
  color: var(--accent);
}

.section + .section {
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding-top: 10px;
}
