:root {
    --bg: #1f2222;
    --card: #282828;
    --card-dark: #202020;
    --text: #ede4bd;
    --grey: #ede4bd2f;
    --accent: #b16f09;
    --success: #698114;
    --danger: #b93220;
    --edit: #5286b9;
    --secondary: #986073;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body::-webkit-scrollbar {
    display: none;
}

.container {
    width: 100%;
    max-width: 900px;
}

.card {
    background: var(--card);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--grey);
    position: relative;
    transition: 0.3s;
}

h1 {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 5px;
}

h2 {
    margin-top: 0;
    color: var(--text);
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input,
select,
button {
    padding: 10px;
    border-radius: 4px;
    border: none;
    outline: none;
}

input {
    background: var(--card-dark);
    color: white;
    flex: 1;
    min-width: 140px;
}

button {
    cursor: pointer;
    background: var(--accent);
    color: white;
    font-weight: bold;
    transition: 0.2s;
}

button:hover {
    opacity: 0.8;
}

/* Recipe Grid Styling */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.recipe-card {
    background: var(--card-dark);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
    position: relative;
    font-size: 0.85em;
}

.control-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    opacity: 0.5;
}

.control-btn:hover {
    opacity: 1;
    color: var(--danger);
}

/* Group Block Styling */
.group-item {
    background: var(--card-dark);
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--grey);
}

/* Results Styling */
#results {
    background: var(--card-dark);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--success);
    display: none;
    margin-top: 20px;
}

.group-result-block {
    border-left: 2px solid var(--secondary);
    padding-left: 15px;
    margin-bottom: 30px;
}

.group-result-header {
    color: var(--secondary);
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-decoration: underline;
}

.summary-box {
    background: #111;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid var(--accent);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.card.editing {
    border-color: var(--edit);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
}

#saveBtn.editing {
    background: var(--edit);
}

.control-btn.edit-btn:hover {
    color: var(--edit);
}