/* ------------------ RESET ------------------ */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3fbf6;
    color: #123022;
    transition: 0.3s;
    line-height: 1.6;
}

/* ------------------ NAVBAR ------------------ */
.navbar {
    background: #1c7c54;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.4rem;
    font-weight: bold;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 18px;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
}

.navbar ul li a:hover {
    text-decoration: underline;
}

#themeToggle {
    background: #fff;
    color: #1c7c54;
    border: none;
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

#themeToggle:hover {
    background: #e9ffee;
}

/* ------------------ HEADER ------------------ */
.hero {
    text-align: center;
    padding: 30px;
    background: #6db06e;
}

.hero h1 {
    font-size: 2rem;
}

.tagline {
    margin-top: 5px;
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ------------------ MAIN CONTENT ------------------ */
main {
    max-width: 900px;
    margin: 25px auto 40px;
    padding: 0 15px;
}

.card, .search-section, .result, .list-section, .disclaimer {
    background: rgb(255, 255, 255);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 6px solid #1c7c54;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-2px);
}

/* ------------------ SEARCH BOX ------------------ */
.search-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#searchBox {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #9ac7aa;
    font-size: 1rem;
}

button {
    background: #1c7c54;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #155a3c;
}

/* ------------------ Auto Suggestions ------------------ */
.suggestions {
    margin-top: 10px;
    border: 1px solid #cfeee0;
    background: rgb(251, 248, 248);
    border-radius: 8px;
    display: none;
    max-width: 500px;
    padding: 10px;
}

.suggestions p {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: 0.2s;
}

.suggestions p:hover {
    background: #caf3b2;
}

/* ------------------ LIST ------------------ */
.medicine-list {
    list-style: none;
    padding-left: 0;
}

.medicine-list li {
    padding: 6px 0;
    border-bottom: 1px solid #89b59c;
}
/* ------------ DARK MODE ------------ */
/* ---------- DARK MODE FULL THEME ---------- */

body.dark {
    background: #0f1916;
    color: #e9fff5;
}

/* Navbar */
body.dark .navbar {
    background: #0b3e2d;
}

body.dark #themeToggle {
    background: #4ee3aa;
    color: #003921;
}

/* Cards and containers */
body.dark .card,
body.dark .search-section,
body.dark .result,
body.dark .disclaimer,
body.dark .list-section {
    background: #132722;
    border-color: #4ee3aa;
    color: #e9fff5;
}

/* Search input */
body.dark #searchBox {
    background: #1f3a33;
    color: white;
    border: 1px solid #4ee3aa;
}

/* Search button */
body.dark button {
    background: #1e6b51;
}

/* Suggestions dropdown */
body.dark #suggestions {
    background: #1b302b;
    border: 1px solid #4ee3aa;
}

body.dark #suggestions p {
    background: #24433a;
    color: #dfffee;
    border-radius: 6px;
    padding: 6px;
    margin: 4px 0;
    transition: 0.2s;
}

body.dark #suggestions p:hover {
    background: #367460;
    cursor: pointer;
}

/* Highlight search text */
body.dark #suggestions p strong {
    color: #8bffd5;
}

/* Medicine list wrapper */
body.dark #medicineList {
    background: #1e3530;
    padding: 10px;
    border-radius: 10px;
}

/* Individual items */
body.dark #medicineList li {
    background: #23453c;
    margin: 6px 0;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #3f6e62;
    transition: 0.3s;
}

body.dark #medicineList li:hover {
    background: #3a7a6a;
    border-color: #4ee3aa;
    cursor: pointer;
}

/* Footer */
body.dark footer {
    background: #11211c;
    color: #b7e5d7;
}
