:root {
    --bg: #05060a;
    --card: rgba(19, 19, 31, 0.72);
    --accent: #00e676;
    --accent2: #ff4081;
    --cyan: #00bcd4;
    --text: #f0f0f5;
    --muted: #8b8b9e;
    --border: rgba(255, 255, 255, 0.09);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- 3D background layers ---------- */
#bg3d {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 230, 118, 0.06), transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 64, 129, 0.05), transparent 60%);
}

.nav, .hero, .scanner-wrap, .features-section, .how-section, footer {
    position: relative;
    z-index: 2;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 5vw;
    background: rgba(5, 6, 10, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-logo-ai {
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    padding: 0.45rem 1.2rem;
    border: 1px solid rgba(0, 230, 118, 0.45);
    border-radius: 50px;
    color: var(--accent) !important;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    background: rgba(0, 230, 118, 0.1);
    box-shadow: 0 0 24px rgba(0, 230, 118, 0.25);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 1.5rem 4rem;
}

.hero-badge {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.06);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.6rem;
    backdrop-filter: blur(6px);
}

.hero-title {
    font-size: clamp(2.6rem, 7.5vw, 5.5rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
}

.hero-title .line {
    display: block;
}

.grad {
    background: linear-gradient(90deg, #00e676, #00bcd4, #ff4081, #ffab00, #00e676);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-sub {
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 620px;
    margin-bottom: 2.2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3.2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2.1rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #001208;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 230, 118, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    border-color: rgba(0, 230, 118, 0.4);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 1.9rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.scroll-hint {
    position: absolute;
    bottom: 1.6rem;
    font-size: 1.6rem;
    color: var(--muted);
    animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ---------- Section headings ---------- */
.section-heading {
    text-align: center;
    margin-bottom: 2.4rem;
}

.eyebrow {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-bottom: 0.4rem;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ---------- Scanner ---------- */
.scanner-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 5rem 1rem 4rem;
    scroll-margin-top: 4rem;
}

.scanner-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    position: relative;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
}

.scanner-card:hover {
    border-color: rgba(0, 230, 118, 0.3);
    box-shadow: 0 0 60px rgba(0, 230, 118, 0.08);
}

.card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.18), transparent 40%, transparent 60%, rgba(255, 64, 129, 0.14));
    opacity: 0.35;
    z-index: -1;
    filter: blur(18px);
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(0, 230, 118, 0.04);
}

.drop-zone .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: bob 3s ease-in-out infinite;
}

.drop-zone p {
    color: var(--muted);
    margin: 0.5rem 0;
}

.drop-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.drop-tips {
    margin-top: 1.1rem;
    font-size: 0.78rem;
    color: var(--muted);
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    background: var(--accent);
    color: #001208;
    padding: 0.6rem 1.2rem;
    border-radius: 0 0 10px 0;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Camera modal ---------- */
.camera-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(5, 6, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.camera-modal.active {
    display: flex;
}

.camera-inner {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.2rem;
    max-width: 680px;
    width: 100%;
    text-align: center;
}

#cameraVideo {
    width: 100%;
    max-height: 60vh;
    border-radius: 12px;
    background: #000;
    display: block;
}

.camera-hint {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0.7rem 0;
}

.camera-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.camera-actions .reset-btn {
    margin-top: 0;
}

input[type="file"] {
    display: none;
}

/* ---------- Preview & canvas ---------- */
.preview-wrap {
    display: none;
    margin-top: 0.5rem;
    position: relative;
}

.preview-wrap.active {
    display: block;
}

.canvas-frame {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 12px;
}

#plantCanvas {
    max-width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--accent);
    border-style: solid;
    border-width: 0;
    opacity: 0.9;
}

.c-tl { top: 6px; left: 6px; border-top-width: 2px; border-left-width: 2px; }
.c-tr { top: 6px; right: 6px; border-top-width: 2px; border-right-width: 2px; }
.c-bl { bottom: 6px; left: 6px; border-bottom-width: 2px; border-left-width: 2px; }
.c-br { bottom: 6px; right: 6px; border-bottom-width: 2px; border-right-width: 2px; }

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 12px var(--accent);
    animation: scanMove 2.5s ease-in-out infinite;
    display: none;
    border-radius: 2px;
}

@keyframes scanMove {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

#scanStatus {
    color: var(--muted);
    margin-top: 0.8rem;
    font-style: italic;
}

/* ---------- Analysis panel ---------- */
.analysis {
    display: none;
    margin-top: 2rem;
    text-align: left;
}

.analysis.active {
    display: block;
    animation: fadeUp 0.6s ease;
}

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

.analysis h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.metric:hover {
    background: rgba(255, 255, 255, 0.05);
}

.metric-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 500;
}

.metric-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.metric-bar {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-value {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    min-width: 3ch;
    text-align: right;
}

.health-good { color: var(--accent); }
.health-warn { color: #ffab00; }
.health-bad { color: #ff5252; }

.trend {
    display: none;
    padding: 0.8rem 1.1rem;
    border-radius: 12px;
    font-size: 0.92rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.trend-up {
    background: rgba(0, 230, 118, 0.07);
    border-color: rgba(0, 230, 118, 0.3);
    color: var(--accent);
}

.trend-down {
    background: rgba(255, 82, 82, 0.07);
    border-color: rgba(255, 82, 82, 0.3);
    color: #ff8a80;
}

.trend-flat {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.history-section {
    display: none;
    margin-top: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.4rem 1.6rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-head h3 {
    font-size: 1.1rem;
}

.history-clear {
    margin-top: 0;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
}

.history-note {
    color: var(--muted);
    font-size: 0.82rem;
    margin: 0.2rem 0 0.9rem;
}

.history-strip {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
}

.history-card {
    flex: 0 0 auto;
    width: 92px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    text-align: center;
}

.history-card img {
    width: 100%;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0.4rem 0 0.3rem;
}

.history-date {
    font-size: 0.68rem;
    color: var(--muted);
}

.history-score {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.history-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.history-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 2px;
}

.species-box {
    display: none;
    margin-bottom: 1.2rem;
    padding: 1.1rem 1.2rem;
    background: rgba(0, 230, 118, 0.05);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 14px;
}

.species-top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.species-emoji { font-size: 2rem; }

.species-titles h4 {
    font-size: 1.15rem;
    line-height: 1.2;
}

.species-match {
    font-size: 0.78rem;
    color: var(--muted);
}

.species-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.sp-fact {
    display: flex;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--muted);
    align-items: flex-start;
}

.sp-fact strong {
    display: block;
    color: var(--text);
    font-size: 0.8rem;
}

.species-pick-label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

#speciesPick {
    width: 100%;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.9rem;
}

#speciesPick:focus {
    outline: none;
    border-color: rgba(0, 230, 118, 0.5);
}

.id-box {
    display: none;
    margin-top: 1.2rem;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 188, 212, 0.06);
    border: 1px solid rgba(0, 188, 212, 0.25);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.id-box .id-label {
    display: block;
    color: var(--cyan);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.recommendations {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: rgba(0, 230, 118, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
}

.recommendations h4 {
    margin: 0 0 0.6rem;
    color: var(--accent);
}

.recommendations ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
}

.recommendations li {
    margin-bottom: 0.4rem;
}

/* ---------- Deep disease scan ---------- */
.deep-scan {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: rgba(0, 188, 212, 0.05);
    border: 1px solid rgba(0, 188, 212, 0.25);
    border-radius: 14px;
}

.deep-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.deep-head h4 {
    color: var(--cyan);
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.deep-sub {
    color: var(--muted);
    font-size: 0.82rem;
    max-width: 40ch;
}

.deep-head .btn {
    flex: 0 0 auto;
}

.deep-note {
    color: var(--muted);
    font-size: 0.76rem;
    margin-top: 0.7rem;
}

.deep-result {
    display: none;
    margin-top: 1rem;
}

.deep-result.active {
    display: block;
    animation: fadeUp 0.4s ease;
}

.deep-verdict {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
}

.deep-crop {
    font-weight: 700;
    font-size: 1.05rem;
}

.deep-disease {
    font-weight: 600;
}

.deep-conf {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.9rem;
}

.deep-lowconf {
    color: #ffab00;
    font-size: 0.82rem;
    margin-bottom: 0.7rem;
}

.deep-treatment {
    background: rgba(0, 230, 118, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    color: var(--text);
}

.deep-treatment strong {
    color: var(--accent);
}

.deep-alts {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.6rem;
}

.deep-error {
    color: #ff8a80;
    font-size: 0.88rem;
}

.remedy-box {
    display: none;
    margin-top: 1.5rem;
}

.remedy-box h4 {
    color: var(--accent);
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.remedy-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.remedy {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.6rem;
    padding: 0;
    overflow: hidden;
}

.remedy[open] {
    border-color: rgba(0, 230, 118, 0.3);
}

.remedy summary {
    cursor: pointer;
    padding: 0.9rem 1.1rem;
    font-weight: 600;
    list-style: none;
    position: relative;
    transition: background 0.2s;
}

.remedy summary::-webkit-details-marker {
    display: none;
}

.remedy summary::after {
    content: '+';
    position: absolute;
    right: 1.1rem;
    color: var(--accent);
    font-weight: 700;
}

.remedy[open] summary::after {
    content: '−';
}

.remedy summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.remedy summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.remedy-signs {
    color: var(--muted);
    font-size: 0.88rem;
    font-style: italic;
    padding: 0 1.1rem 0.4rem;
    margin: 0;
}

.remedy ol {
    margin: 0.4rem 0 0.6rem;
    padding: 0 1.1rem 0 2.3rem;
    color: var(--text);
    font-size: 0.9rem;
}

.remedy ol li {
    margin-bottom: 0.45rem;
}

.remedy-prevent {
    margin: 0;
    padding: 0.6rem 1.1rem 0.9rem;
    color: var(--cyan);
    font-size: 0.85rem;
}

.remedy-disclaimer {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-style: italic;
}

.report-actions {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.report-actions .reset-btn,
.report-actions .btn {
    margin-top: 0;
}

.reset-btn {
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.reset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Features ---------- */
.features-section {
    padding: 4rem 1rem;
    scroll-margin-top: 4rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
}

.feat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    transform-style: preserve-3d;
}

.feat:hover {
    border-color: rgba(0, 230, 118, 0.25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.feat .emoji {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    display: block;
}

.feat h4 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}

.feat p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- My Garden ---------- */
.garden-section {
    padding: 4rem 1rem;
    scroll-margin-top: 4rem;
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

.garden-form {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: 720px;
    margin: 0 auto 0.8rem;
}

.garden-form input[type="text"] {
    flex: 1 1 240px;
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.95rem;
}

.garden-interval-label {
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.garden-form input[type="number"] {
    width: 4rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.95rem;
    text-align: center;
}

.garden-form input:focus {
    outline: none;
    border-color: rgba(0, 230, 118, 0.5);
}

.garden-note {
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 1.6rem;
}

.garden-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.garden-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.garden-card.due-over { border-color: rgba(255, 82, 82, 0.4); }
.garden-card.due-now { border-color: rgba(255, 171, 0, 0.4); }

.garden-info { flex: 1; min-width: 0; }

.garden-info h4 {
    font-size: 1.02rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.garden-species {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.garden-due {
    font-size: 0.85rem;
    font-weight: 600;
}

.garden-due.due-ok { color: var(--accent); }
.garden-due.due-now { color: #ffab00; }
.garden-due.due-over { color: #ff6e6e; }

.garden-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.4rem 0 0.3rem;
}

.garden-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.garden-card.due-over .garden-fill { background: #ff5252; }
.garden-card.due-now .garden-fill { background: #ffab00; }

.garden-interval {
    font-size: 0.74rem;
    color: var(--muted);
}

.garden-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
}

.garden-water {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
}

.garden-remove {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    padding: 0.25rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.garden-remove:hover {
    border-color: #ff5252;
    color: #ff5252;
}

.garden-empty {
    text-align: center;
    color: var(--muted);
    margin-top: 1rem;
}

/* ---------- Care library ---------- */
.library-section {
    padding: 4rem 1rem;
    scroll-margin-top: 4rem;
    position: relative;
    z-index: 2;
}

.library-search-wrap {
    max-width: 480px;
    margin: 0 auto 1.6rem;
}

#librarySearch {
    width: 100%;
    padding: 0.75rem 1.3rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#librarySearch:focus {
    outline: none;
    border-color: rgba(0, 230, 118, 0.5);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.12);
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.plant-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.3rem 1.4rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.2s, transform 0.2s;
}

.plant-card:hover {
    border-color: rgba(0, 230, 118, 0.25);
    transform: translateY(-3px);
}

.plant-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.plant-emoji {
    font-size: 1.7rem;
}

.plant-head h4 {
    font-size: 1.02rem;
}

.plant-facts {
    list-style: none;
    margin: 0 0 0.7rem;
    padding: 0;
}

.plant-facts li {
    display: flex;
    gap: 0.55rem;
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.plant-facts li span {
    flex: 0 0 auto;
}

.plant-tip {
    font-size: 0.82rem;
    color: var(--cyan);
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    margin: 0;
}

.library-empty {
    display: none;
    text-align: center;
    color: var(--muted);
    margin-top: 1.5rem;
}

/* ---------- How it works ---------- */
.how-section {
    padding: 4rem 1rem 5rem;
    scroll-margin-top: 4rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
}

.step {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.step-num {
    font-family: 'Courier New', monospace;
    font-size: 2.6rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.4rem;
    background: linear-gradient(180deg, rgba(0, 230, 118, 0.9), rgba(0, 230, 118, 0.1));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.step p {
    font-size: 0.88rem;
    color: var(--muted);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: rgba(5, 6, 10, 0.6);
    backdrop-filter: blur(10px);
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .grad, .drop-zone .icon, .scroll-hint { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .nav-links a:not(.nav-cta) { display: none; }

    .metric {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .metric-bar-wrap {
        width: 100%;
    }

    .metric-bar {
        flex: 1;
    }

    .hero-stats {
        gap: 1.6rem;
    }
}
