:root {
    --primary-color: #6C5CE7;
    --secondary-color: #00CEC9;
    --accent-color: #FD79A8;
    --background-color: #FAFAFE;
    --text-color: #2D3436;
    --card-bg: #FFFFFF;
    --border-radius-sm: 10px;
    --border-radius-md: 20px;
    --border-radius-lg: 50px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Base Styles
---------------------------------------- */

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /*text-align: justify;*/
}

.fb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Typography
---------------------------------------- */

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 1px;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

/* Card Styles
---------------------------------------- */

.fb-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.fb-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.fb-card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.fb-card-body {
    padding: 2rem;
}

/* Form Elements
---------------------------------------- */

.fb-form-group {
    margin-bottom: 1.5rem;
}

.fb-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.fb-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    box-sizing: border-box;
}

.fb-form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 206, 201, 0.1);
}

/* Select Element
---------------------------------------- */

select.fb-form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232D3436' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Buttons
---------------------------------------- */

.fb-btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.fb-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.fb-btn-primary:hover {
    background-color: #5849E6;
    transform: translateY(-2px);
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.fb-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.fb-radio-label input[type="radio"] {
    margin-right: 0.5rem;
}

/* Results Card
---------------------------------------- */

.fb-result-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
}

.fb-result-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #FFFFFF;
}

.fb-result-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.fb-result-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.fb-result-value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Range Input
---------------------------------------- */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #E0E0E0;
    outline: none;
    margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Side Panel
---------------------------------------- */

.fb-pannello-laterale {
    position: fixed;
    right: 20px;
    top: 20px;
    bottom: 20px;
    width: 350px;
    background-color: var(--card-bg);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.2s ease-in-out;
    transform: translateX(100%);
    border-radius: var(--border-radius-md);
}

.fb-pannello-laterale.active {
    transform: translateX(0);
}

.fb-pannello-laterale h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.fb-pannello-laterale p {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.fb-btn-close {
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    align-self: flex-end;
    cursor: pointer;
    border-radius: 30%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-btn-close:hover {
    background-color: #fd4e83;
}

#fb-contentPannelloLaterale {
    margin-top: 1.5rem;
}

.fb-container.shifted {
    margin-right: 430px;
}

/* General list
---------------------------------------- */

.fb-ul, .fb-ol {
    margin-bottom: 1rem;
}

.fb-ul li, .fb-ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.fb-ul {
    list-style-type: none;
}

.fb-ul li::before {
    content: "\2022";
    color: var(--secondary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.fb-ol {
    counter-reset: item;
    list-style-type: none;
}

.fb-ol > li {
    counter-increment: item;
}

.fb-ol > li::before {
    content: counter(item) ".";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

/* Nested lists */
.fb-ul.fb-ul, .fb-ol.fb-ul {
    margin-top: 0.5rem;
}

.fb-ul.fb-ul li::before, .fb-ol.fb-ul li::before {
    content: "\25E6";
    color: var(--accent-color);
}

/* Reset counter for nested ordered lists */
.fb-ol.fb-ol {
    counter-reset: subitem;
}

.fb-ol.fb-ol > li {
    counter-increment: subitem;
}

.fb-ol.fb-ol > li::before {
    content: counter(subitem, lower-alpha) ".";
    color: var(--accent-color);
}

/* Layout
---------------------------------------- */

.fb-col-giorni {
    flex: 0 0 33.33%;
    max-width: 33.33%;
}

.fb-col-pasti {
    flex: 0 0 66.67%;
    max-width: 66.67%;
}

.fb-row-giorni-pasti {
    display: flex;
    margin-top: 20px;
}

.fb-cardforday {
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

#fb-alimentiContainer {
    padding: 10px;
}

/* Lists
---------------------------------------- */

.fb-ul.fb-giorni-lista li::before {
    content: ''; /* Removes the bullet */
}

.fb-ul.fb-giorni-lista {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.fb-ul.fb-giorni-lista li {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--secondary-color);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.fb-ul.fb-giorni-lista li:hover {
    color: #2D34367F;
    background: linear-gradient(30deg, #6C5CE77F, #FD79A87F);
}

.fb-active {
    color: var(--text-color);
    background: linear-gradient(30deg, #6C5CE7, var(--accent-color));
    animation: fb-colorFade 0.3s forwards;
}

/* Radio button
---------------------------------------- */

.fb-radio-group {
    display: flex;
    gap: 2rem;
}

.fb-radio-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.fb-radio-label input[type="radio"] {
    display: none; /* Nasconde i radio button nativi */
}

.fb-radio-label .fb-custom-radio {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.fb-radio-label .fb-custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.fb-radio-label input[type="radio"]:checked + .fb-custom-radio {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.fb-radio-label input[type="radio"]:checked + .fb-custom-radio::after {
    transform: translate(-50%, -50%) scale(1);
}

.fb-radio-label:hover .fb-custom-radio {
    border-color: var(--secondary-color);
}

/* Animations
---------------------------------------- */

@keyframes fb-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fb-colorFade {
    0% {
        opacity: 0.5;
        background: linear-gradient(30deg, #6C5CE7, #FD79A8);
        color: var(--text-color);
    }
    100% {
        opacity: 1;
        background: linear-gradient(30deg, #6C5CE7, var(--accent-color));
        color: var(--text-color);
    }
}

.fb-animate-fade-in {
    animation: fb-fadeIn 0.3s ease-out forwards;
}



