body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, sans-serif;
    margin: 20px;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    background-color: white; /* Light background for better contrast */
    color: black;
}
main {
    max-width: 450px;
}
header {
    text-align: center;
    margin-bottom: 20px;
    a {
        color: #4CAF50;
    }
}
h1 {
    text-transform: uppercase;
    font-style: italic;
}
h1, h2 {
    text-align: center; /* Center align headings */
    margin-bottom: 20px; /* Space below headings */
}
form {
    width: 100%; /* Make form full width */
}
label {
    display: block; /* Make labels block elements */
    margin-bottom: 5px; /* Space between label and input */
    color: black; /* Slightly darker color for labels */
}
input, button {
    margin: 10px 0; /* Increased margin for better spacing */
    padding: 12px; /* Increased padding for better touch targets */
    width: 100%; /* Make inputs and buttons full width */
    box-sizing: border-box; /* Include padding in width */
    border: 1px solid #ccc; /* Add a border to inputs */
    border-radius: 4px; /* Rounded corners for inputs */
    font-size: 16px; /* Increase font size for better readability */
}

/* Checkbox specific styling */
input[type="checkbox"] {
    width: auto !important; /* Override full width for checkboxes */
    margin: 0 8px 0 0; /* Margin on right side of checkbox */
    padding: 0; /* Remove padding for checkboxes */
    vertical-align: middle; /* Align with text */
}
button {
    background-color: #4CAF50; /* Green background */
    border: none; /* No border */
    cursor: pointer; /* Pointer cursor on hover */
    color: white;
    transition: background-color 0.3s; /* Smooth transition for hover effect */
}
button:hover {
    background-color: #45a049; /* Darker green on hover */
    color: white;
}
p {
    text-align: center; /* Center align paragraph text */
    max-width: 600px; /* Set a max width for paragraphs */
    margin: 0 20px 20px; /* Margin for paragraphs */
}
/* Responsive iframe */
.video-container {
    position: relative;
    width: 100%;
    max-width: 560px; /* Max width for the video */
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin: 20px 0; /* Margin for spacing */
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Remove border */
}

/* Calculator details styling */
.calculator-details {
    margin: 10px 0;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.calculator-summary {
    background-color: #f8f9fa;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.calculator-content {
    padding: 20px;
}

/* Settings button */
.settings-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
}

.settings-button:hover {
    background-color: transparent;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    min-height: calc(100vh - 4%);
    box-sizing: border-box;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.settings-form {
    margin-top: 20px;
}

.settings-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.settings-form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;

    &[type="checkbox"] {
        margin-bottom: 4px;
    }
}


.settings-form button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.settings-form button:hover {
    background-color: #45a049;
}

.settings-form button[type="button"] {
    background-color: #6c757d;
}

.settings-form button[type="button"]:hover {
    background-color: #5a6268;
}

/* Mobile modal improvements */
@media (max-width: 768px) {
    .modal-content {
        margin: 1% auto;
        width: 95%;
        max-width: none;
        min-height: calc(100vh - 2%);
        padding: 15px;
    }
    
    .modal {
        padding: 10px 0;
    }
}

footer {
    text-align: center;
    margin-top: 50px;

    img {
        width: 50px;
    }
    a {
        color: black;
    }
}

/* Mobile fullscreen recipe styling */
.mobile-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 3000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-fullscreen .recipe-card {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 6px solid #4CAF50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mobile-fullscreen .recipe-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.mobile-fullscreen .ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-fullscreen .ingredient-item {
    padding: 15px 0;
    border-bottom: 2px solid #eee;
    font-size: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-fullscreen .ingredient-item:last-child {
    border-bottom: none;
}

.mobile-fullscreen .ingredient-amount {
    font-weight: bold;
    color: #4CAF50;
}

.mobile-fullscreen .close-fullscreen {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 3001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-fullscreen .close-fullscreen:hover {
    background-color: #45a049;
}

/* Shopping Links Styles */
#shoppingSection {
    padding: 15px;
    text-align: center;
}

.shopping-title {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.shopping-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.shopping-link {
    background: #ff9500;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.shopping-link:hover {
    background: #e6850e;
    color: white;
    text-decoration: none;
}

.shopping-link:visited {
    color: white;
}

.shopping-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

@media (max-width: 768px) {
    .shopping-links {
        flex-direction: column;
        align-items: center;
    }
    
    .shopping-link {
        width: 200px;
        justify-content: center;
    }
}
.actions {
    display: flex;
    flex-direction: column;
    align-content: center;
    flex-wrap: wrap;
}
.fullscreen-button{
    background-color: transparent;
    color: black;
    border: 1px solid #5a6268;
    margin: 10px 0;
    width: auto;
}

/* Toggle switch styles */
.toggle-group {
    display: inline-flex;
    background: #f1f3f5;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 10px;
}
.toggle-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #333;
}
.toggle-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
}
.toggle-option span {
    position: relative;
    z-index: 1;
}
.toggle-option:has(input[type="radio"]:checked) {
    background: white;
    color: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}
.toggle-option:hover {
    background: #fff;
}


