body {
    font-family: 'Oswald', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5; /* Light gray background from image */
    color: #333; /* Default text color */
    line-height: 1.6;
}

.container {
    max-width: 900px; /* Adjust as needed for overall width */
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-size: 2.8em; /* Larger for main title */
    color: #5a2e9b; /* A purple tone for CoCal */
    display: inline-block;
    margin: 0;
}

header .subtitle {
    font-size: 0.7em; /* Smaller for subtitle */
    color: #666;
    vertical-align: middle;
    margin-left: 10px;
}

header .logo {
    font-size: 2.5em; /* Larger for cocktail glass */
    vertical-align: middle;
    margin-left: 10px;
}

header p {
    color: #555;
    font-size: 1.1em;
    margin-top: 10px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    font-size: 1.6em;
    font-weight: 400; /* Oswald regular weight */
}

/* --- Section 1: Add Ingredients --- */
.add-ingredients-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fdfdfd;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ingredient-filters {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to wrap on smaller screens */
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 10px 18px;
    border: 1px solid #ccc;
    border-radius: 20px; /* Pill shape */
    background-color: #f2f2f2;
    cursor: pointer;
    font-size: 0.95em;
    color: #555;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: #5a2e9b;
    color: #fff;
    border-color: #5a2e9b;
}

.filter-btn.clear-all {
    background-color: #e74c3c; /* Red color */
    color: #fff;
    border-color: #e74c3c;
}

.search-bar input {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    margin-bottom: 15px;
}

.search-results-list {
    max-height: 200px; /* Limit height for scrollable results */
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
    background-color: #fff;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f9f9f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item span {
    font-size: 1em;
    color: #333;
}

.add-btn {
    padding: 6px 12px;
    background-color: #28a745; /* Green add button */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s ease;
}

.add-btn:hover {
    background-color: #218838;
}

/* --- Section 2: Your Mix --- */
.your-mix-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fdfdfd;
    border-radius: 8px;
    border: 1px solid #eee;
}

.mix-ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* Responsive grid for items */
    gap: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.mix-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative; /* For the remove button */
}

.mix-item img {
    width: 70px; /* Size of bottle image */
    height: auto;
    margin-bottom: 10px;
}

.mix-item-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.mix-item-abv {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.volume-input {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
}

.remove-mix-item-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545; /* Red for remove */
    color: white;
    border: none;
    border-radius: 50%; /* Circle shape */
    width: 24px;
    height: 24px;
    font-size: 0.8em;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}

.remove-mix-item-btn:hover {
    background-color: #c82333;
}

.add-ingredient-btn {
    display: block;
    width: fit-content;
    margin: 0 auto 20px auto;
    padding: 12px 25px;
    background-color: #62a83e; /* Green for add button */
    color: #fff;
    border: none;
    border-radius: 25px; /* Rounded button */
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s ease;
    font-weight: 400; /* Oswald regular weight */
}

.add-ingredient-btn:hover {
    background-color: #559135;
}

.total-abv-display {
    text-align: right;
    margin-top: 20px;
}

#calculatedAbv {
    font-size: 2em; /* Larger ABV display */
    font-weight: bold;
    color: #5a2e9b; /* Purple tone */
    margin: 0;
}

/* ABV Bar styling - Integrated from your original code */
#abvBar {
    height: 20px;
    margin-top: 15px;
    background: #e0e0e0; /* Lighter background for the bar */
    border-radius: 10px;
    overflow: hidden; /* Ensures fill stays within rounded corners */
}

#abvFill {
    height: 100%;
    width: 0%;
    background: #28a745; /* Default green */
    transition: width 0.5s ease-out, background 0.5s ease;
    border-radius: 10px; /* Match outer bar */
}

/* --- Sections 3 & 4: Results and Buy --- */
.results-buy-sections {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allows sections to wrap on smaller screens */
}

.abv-result-section, .buy-ingredients-section {
    flex: 1; /* Each takes equal space */
    min-width: 280px; /* Minimum width before wrapping */
    background-color: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.result-list {
    margin-top: 15px;
    list-style: none; /* Remove default list bullets */
    padding: 0;
}

.result-list p {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 1em;
    color: #444;
}

.result-list p:last-child {
    border-bottom: none;
}

.result-list p span {
    font-weight: bold;
    color: #333;
}

.buy-list {
    margin-top: 15px;
}

.buy-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.buy-item img {
    width: 45px; /* Size of buy item image */
    height: auto;
    margin-right: 15px;
    border-radius: 4px; /* Slightly rounded corners for images */
}

.buy-item p {
    margin: 0;
    font-size: 0.95em;
    color: #333;
}

.buy-item p:last-child {
    margin-left: auto; /* Pushes the ABV to the right */
    font-weight: bold;
    color: #555;
}

/* --- Footer --- */
footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #666;
    flex-wrap: wrap; /* Allow wrapping */
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switcher input[type="radio"] {
    width: auto; /* Override 100% width */
    margin: 0;
}

.theme-switcher label {
    margin-right: 10px;
}

/* --- Dark Theme (for JavaScript toggle) --- */
body.dark-theme {
    background-color: #222;
    color: #eee;
}

body.dark-theme .container {
    background-color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-theme header h1 {
    color: #a07cdb; /* Lighter purple for dark theme */
}

body.dark-theme header .subtitle,
body.dark-theme header p,
body.dark-theme h2,
body.dark-theme .filter-btn,
body.dark-theme .search-bar input,
body.dark-theme .search-result-item span,
body.dark-theme .mix-item-name,
body.dark-theme .mix-item-abv,
body.dark-theme .volume-input,
body.dark-theme .result-list p,
body.dark-theme .result-list p span,
body.dark-theme .buy-item p,
body.dark-theme .buy-item p:last-child,
body.dark-theme footer {
    color: #eee;
}

body.dark-theme .filter-btn {
    background-color: #444;
    border-color: #555;
}

body.dark-theme .filter-btn:hover {
    background-color: #555;
}

body.dark-theme .filter-btn.active {
    background-color: #a07cdb;
    border-color: #a07cdb;
}

body.dark-theme .filter-btn.clear-all {
    background-color: #c0392b;
    border-color: #c0392b;
}

body.dark-theme .add-ingredients-section,
body.dark-theme .your-mix-section,
body.dark-theme .abv-result-section,
body.dark-theme .buy-ingredients-section {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
}

body.dark-theme .search-bar input {
    background-color: #4a4a4a;
    border-color: #5a5a5a;
}

body.dark-theme .search-results-list,
body.dark-theme .mix-item,
body.dark-theme .buy-item {
    background-color: #4a4a4a;
    border-color: #5a5a5a;
    box-shadow: none;
}

body.dark-theme .search-result-item,
body.dark-theme .result-list p {
    border-bottom-color: #3a3a3a;
}

body.dark-theme .volume-input {
    background-color: #5a5a5a;
    border-color: #6a6a6a;
}

body.dark-theme .add-ingredient-btn {
    background-color: #4b882e;
}

body.dark-theme .add-ingredient-btn:hover {
    background-color: #3d6e24;
}

body.dark-theme #calculatedAbv {
    color: #a07cdb;
}

body.dark-theme footer {
    border-top-color: #4a4a4a;
}

body.dark-theme #abvBar {
    background: #555;
}

body.dark-theme #abvFill {
    /* Colors adjusted for dark theme bar, similar to light theme logic but darker */
    background: #3cb371; /* A green for low ABV */
}