* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2d5a3d;
    --primary-light: #3d7a52;
    --primary-dark: #1e3d2a;
    --accent: #e07a5f;
    --bg: #fafaf7;
    --bg-card: #ffffff;
    --text: #2c3e50;
    --text-light: #6b7c8d;
    --border: #e8ebe5;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --toxic-severe: #dc2626;
    --toxic-severe-bg: #fef2f2;
    --toxic-high: #ea580c;
    --toxic-high-bg: #fff7ed;
    --toxic-moderate: #ca8a04;
    --toxic-moderate-bg: #fefce8;
    --toxic-low: #16a34a;
    --toxic-low-bg: #f0fdf4;
    --toxic-irritant: #0891b2;
    --toxic-irritant-bg: #ecfeff;
    --toxic-nontoxic: #059669;
    --toxic-nontoxic-bg: #ecfdf5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: transparent;
    outline: none;
    color: var(--text);
}

.search-box button {
    padding: 0.75rem 1.75rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.search-box button:hover {
    background: #d66a4f;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: white;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Weed Grid */
.weed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.weed-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border);
}

.weed-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.weed-card-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e8ebe5 0%, #d4dcd0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    position: relative;
    overflow: hidden;
}

.weed-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.weed-card-content {
    padding: 1.25rem;
}

.weed-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.weed-card .scientific {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.weed-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Toxicity Badges */
.toxicity-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.severe { background: var(--toxic-severe); }
.high { background: var(--toxic-high); }
.moderate { background: var(--toxic-moderate); }
.low { background: var(--toxic-low); }
.irritant { background: var(--toxic-irritant); }
.nontoxic { background: var(--toxic-nontoxic); }

/* Detail Page */
.detail-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.back-link {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.back-link:hover {
    opacity: 1;
}

.detail-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.detail-hero .scientific {
    font-style: italic;
    opacity: 0.9;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    padding: 3rem 0;
}

.detail-img {
    width: 100%;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e8ebe5 0%, #d4dcd0 100%);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-info {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.quick-info h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 0.95rem;
}

.quick-info p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.quick-info p:last-child {
    margin-bottom: 0;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section ul {
    padding-left: 1.25rem;
}

.info-section li {
    margin-bottom: 0.4rem;
    color: var(--text);
    font-size: 0.95rem;
}

.info-section p {
    color: var(--text);
    font-size: 0.95rem;
}

/* Feature Cards on Home */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text);
}

.tab-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Identify Page */
.identify-container {
    max-width: 700px;
    margin: 0 auto;
}

.identify-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.identify-box h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.identify-box p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.form-group select:focus {
    border-color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--primary-light);
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
    background: #d66a4f;
}

.btn-full {
    width: 100%;
}

.match-results {
    margin-top: 2rem;
}

.match-results h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* First Aid */
.first-aid-steps {
    display: grid;
    gap: 1.25rem;
}

.step-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1.25rem;
    border: 1px solid var(--border);
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.warning-box {
    background: var(--toxic-severe-bg);
    border-left: 4px solid var(--toxic-severe);
    padding: 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 2rem;
}

.warning-box h4 {
    color: var(--toxic-severe);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.warning-box ul {
    padding-left: 1.25rem;
}

.warning-box li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.info-box {
    background: var(--toxic-moderate-bg);
    border-left: 4px solid var(--toxic-moderate);
    padding: 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 2rem;
}

.info-box h4 {
    color: var(--toxic-moderate);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-box p {
    font-size: 0.9rem;
}

.contact-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.contact-box h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.contact-box p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* About Page */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.about-card h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-card h2:first-child {
    margin-top: 0;
}

.about-card p {
    margin-bottom: 1rem;
    color: var(--text);
    line-height: 1.7;
}

.about-card ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.disclaimer-box {
    background: var(--toxic-moderate-bg);
    border-left: 4px solid var(--toxic-moderate);
    padding: 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 2rem;
}

.disclaimer-box p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    opacity: 0.7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius);
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .search-box input {
        text-align: center;
    }

    .search-box button {
        border-radius: var(--radius-sm);
    }

    .detail-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .weed-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .step-card {
        flex-direction: column;
        gap: 0.75rem;
    }

    .identify-box {
        padding: 1.5rem;
    }

    .about-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .weed-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }
}
