/* Add a parchment-like background and fantasy styling */
body { 
    font-family: 'Merriweather', serif; 
    background: #fdf5e6; /* parchment color */
    color: #4b2e1e; /* dark brown text */
    padding: 20px; 
    max-width: 800px; 
    margin: 0.5em auto; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #d4af37; /* gold border */
    border-radius: 10px;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif; /* decorative fantasy font */
    color: #6b4226; /* darker brown for headings */
    text-shadow: 1px 1px 2px #d4af37; /* subtle gold glow */
    margin-bottom: 0.25em;
}

h2 { margin-top: 0.5em; }

.your-ingredients h3 {
    margin-bottom: 0;
}

.small-note {
    margin-bottom: 0.5em;
    font-size: 0.8em;
}

.rarity-rare { color: #d4af37; /* gold */ }
.rarity-uncommon { color: #6b6b6b; /* silver */ }
.rarity-common { color: #8b4513; /* bronze */ }

ul { margin-top: 0.3em; }

ul.suggestions {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #6b4226;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    background: #fff8e1; /* lighter parchment */
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: none; /* Hide by default */
}

ul.suggestions li {
    padding: 5px;
    cursor: pointer;
    font-family: 'Merriweather', serif;
}

ul.suggestions li:hover {
    background-color: #f4e4c1;
}

.ingredient-tag {
    display: inline-block;
    background: #f4e4c1; /* lighter parchment */
    padding: 4px 8px;
    margin: 4px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #6b4226;
    font-family: 'Merriweather', serif;
}

.potion-container {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff8e1; /* lighter parchment */
    padding: 15px;
    border: 1px solid #6b4226;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.potion-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 150px;
    min-height: 150px;
    margin: auto auto;
    border: 1px solid #6b4226;
    border-radius: 10px;
    background: #f4e4c1;
}

.potion-image {
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    margin: auto;
}

.potion-image-small {
    width: auto;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    border: 1px solid #6b4226;
    border-radius: 10px;
    background: #f4e4c1;
    float: right;
    display: none;
    margin-left: 1em;
    margin-bottom: 1em;
}

.field { margin-bottom: 10px; }

button {
    background: #d4af37; /* gold */
    color: #4b2e1e; /* dark brown text */
    font-size: 1em;
    padding: 10px 20px;
    border: 2px solid #6b4226; /* darker brown border */
    border-radius: 5px;
    cursor: pointer;
    text-shadow: 1px 1px 2px #6b4226; /* subtle shadow */
    transition: background 0.3s, transform 0.2s;
    font-family: 'Merriweather', serif;
}

button:hover {
    background: #f4e4c1; /* lighter parchment */
    transform: scale(1.05);
}

button:active {
    background: #c89f2f; /* slightly darker gold */
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .potion-image-container {
        display: none;
    }

    .potion-image-small {
        display: inline;
    }
}

.suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
}

.suggestions li {
    padding: 8px;
    cursor: pointer;
}

.suggestions li:hover {
    background: #f0f0f0;
}
