/* RESET */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}


/* BACKGROUND */

body{

    min-height:100vh;

    color:white;

    background:linear-gradient(
        135deg,
        #0f3d2e,
        #1db954,
        #f7e733,
        #ff8c42,
        #ff4fa3
    );

    background-size:400% 400%;

    animation:gradientMove 18s ease infinite;

}

@keyframes gradientMove{

    0%{background-position:0% 50%;}
    50%{background-position:100% 50%;}
    100%{background-position:0% 50%;}

}


/* DARK OVERLAY */

body::before{

    content:"";

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,0.45);

    z-index:-1;

}


/* NAVBAR */

.navbar{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 60px;

}

.navbar h1{

    color:#69ffa6;

}

.navbar ul{

    display:flex;

    list-style:none;

}

.navbar li{

    margin-left:25px;

}

.navbar a{

    text-decoration:none;

    color:white;

    transition:.3s;

}

.navbar a:hover{

    color:#69ffa6;

}


/* MAIN CONTAINER */

.container{

    max-width:1100px;

    margin:auto;

    padding:40px 20px;

}


/* CARD DESIGN */

.card{

    background:rgba(255,255,255,0.08);

    backdrop-filter:blur(12px);

    border-radius:15px;

    padding:30px;

    margin-bottom:30px;

    border:1px solid rgba(255,255,255,0.15);

}


/* TITLES */

.card h2{

    margin-bottom:20px;

}


/* FORM */

form{

    display:flex;

    flex-direction:column;
}

option{
    color:black;
}

label{

    margin-top:10px;

    margin-bottom:5px;

}

input,
select{

    padding:10px;

    border-radius:8px;

    border:none;

    background:rgba(255,255,255,0.15);

    color:white;

}

input::placeholder{

    color:#ddd;

}

input:focus,
select:focus{

    outline:none;

    box-shadow:0 0 8px #69ffa6;

}


/* BUTTON */

.btn{

    margin-top:15px;

    padding:12px;

    border:none;

    border-radius:8px;

    cursor:pointer;

}

.btn-primary{

    background:linear-gradient(
        135deg,
        #1db954,
        #69ffa6
    );

    color:#06351f;

    font-weight:bold;

}

.btn-primary:hover{

    transform:scale(1.05);

    box-shadow:0 0 15px #69ffa6;

}


/* TABLE */

table{

    width:100%;

    border-collapse:collapse;

}

th,
td{

    padding:10px;

    text-align:center;

}

thead{

    background:rgba(255,255,255,0.1);

}

tbody tr:nth-child(even){

    background:rgba(255,255,255,0.05);

}

tfoot{

    font-weight:bold;

    background:rgba(255,255,255,0.1);

}


/* RECOMMENDATIONS */

#recommendations{

    list-style:none;

}

#recommendations li{

    padding:8px 0;

    border-bottom:1px solid rgba(255,255,255,0.1);

}


/* CHART */

canvas{

    margin-top:20px;

    background:rgba(255,255,255,0.05);

    padding:10px;

    border-radius:10px;

}


/* FOOTER */

footer{

    text-align:center;

    padding:20px;

    color:#ddd;

}

 /* RESET - Clean Modern Reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
            min-height: 100vh;
            color: #ffffff;
            background: linear-gradient(135deg, #0f3d2e, #1db954, #f7e733, #ff8c42, #ff4fa3);
            background-size: 400% 400%;
            animation: gradientMove 18s ease infinite;
            position: relative;
        }

        @keyframes gradientMove {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Dark Overlay for better readability */
        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(2px);
            z-index: -1;
        }

        /* ========== GLASSMORPHISM NAVBAR ========== */
        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 48px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }

        .navbar h1 {
            color: #c0ffd0;
            font-size: 1.8rem;
            font-weight: 700;
            letter-spacing: -0.5px;
            text-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

        .navbar ul {
            display: flex;
            list-style: none;
            gap: 32px;
        }

        .navbar a {
            text-decoration: none;
            color: white;
            font-weight: 500;
            transition: 0.2s;
            padding: 8px 0;
            border-bottom: 2px solid transparent;
        }

        .navbar a:hover {
            color: #b8ffc8;
            border-bottom-color: #69ffa6;
        }

        /* Main Container */
        .container {
            max-width: 1300px;
            margin: 0 auto;
            padding: 40px 24px;
        }

        /* ========== GLASS CARD DESIGN (CLEAR + TRANSPARENT) ========== */
        .card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 28px;
            padding: 28px 32px;
            margin-bottom: 28px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .card:hover {
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
            background: rgba(255, 255, 255, 0.13);
        }

        .card h2 {
            font-size: 1.75rem;
            font-weight: 600;
            margin-bottom: 20px;
            letter-spacing: -0.3px;
            background: linear-gradient(135deg, #ffffff, #e0ffe8);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            display: inline-block;
        }

        /* Search Container - Glass style */
        .search-container {
            position: relative;
            width: 100%;
            margin-bottom: 8px;
        }

        .search-input {
            width: 100%;
            padding: 14px 18px;
            font-size: 1rem;
            font-weight: 500;
            border: 1.5px solid rgba(255, 255, 255, 0.4);
            border-radius: 60px;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(8px);
            color: white;
            transition: all 0.25s;
            outline: none;
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
            font-weight: 400;
        }

        .search-input:focus {
            border-color: #69ffa6;
            background: rgba(255, 255, 255, 0.28);
            box-shadow: 0 0 0 3px rgba(105, 255, 166, 0.2);
        }

        /* Autocomplete Dropdown (Glass) */
        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: rgba(30, 30, 40, 0.85);
            backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            max-height: 320px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
            display: none;
            margin-top: 8px;
        }

        .autocomplete-dropdown.show {
            display: block;
        }

        .autocomplete-item {
            padding: 14px 18px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            transition: background 0.2s;
            color: white;
        }

        .autocomplete-item:hover {
            background: rgba(105, 255, 166, 0.2);
        }

        .autocomplete-item strong {
            color: #d4ffb0;
            font-weight: 600;
        }

        .autocomplete-item small {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.75rem;
            display: block;
            margin-top: 4px;
        }

        /* Meal Type Selector - Glass */
        .meal-type-selector {
            margin: 24px 0 20px;
        }

        .meal-type-selector label {
            font-weight: 600;
            margin-bottom: 12px;
            display: block;
            font-size: 0.95rem;
            letter-spacing: 0.5px;
            color: #f0fff0;
        }

        .meal-type-buttons {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
        }

        .meal-type-btn {
            padding: 10px 24px;
            border: 1.5px solid rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(4px);
            border-radius: 60px;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 600;
            color: white;
            font-size: 0.9rem;
        }

        .meal-type-btn.active {
            background: #69ffa6;
            border-color: #69ffa6;
            color: #0a2f1f;
            box-shadow: 0 4px 12px rgba(105, 255, 166, 0.3);
        }

        .meal-type-btn:hover:not(.active) {
            background: rgba(105, 255, 166, 0.3);
            border-color: #69ffa6;
        }

        /* Primary Button - Glass Gradient */
        .btn-primary {
            background: linear-gradient(105deg, #1db954, #69ffa6);
            border: none;
            padding: 14px 24px;
            border-radius: 60px;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            width: 100%;
            color: #0a2f1f;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
            letter-spacing: 0.3px;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
            filter: brightness(1.05);
        }

        .btn-primary:disabled {
            opacity: 0.6;
            transform: none;
            cursor: not-allowed;
        }

        /* Table - Glassmorphism */
        table {
            width: 100%;
            border-collapse: collapse;
            border-radius: 20px;
            overflow: hidden;
        }

        th, td {
            padding: 14px 12px;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.15);
            color: white;
        }

        th {
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(8px);
            font-weight: 600;
            font-size: 0.9rem;
            letter-spacing: 0.5px;
            color: #d4ffc0;
        }

        tbody tr:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        tfoot td {
            background: rgba(0, 0, 0, 0.35);
            font-weight: 700;
            backdrop-filter: blur(5px);
            border-top: 1px solid rgba(255,255,240,0.3);
        }

        /* Recommendation Items - Glass */
        .recommendation-item {
            padding: 14px 18px;
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(8px);
            border-radius: 20px;
            margin-bottom: 12px;
            border-left: 5px solid #69ffa6;
            transition: 0.2s;
        }

        /* Chart Container */
        canvas {
            margin-top: 20px;
            background: rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(4px);
            padding: 12px;
            border-radius: 24px;
            max-width: 100%;
        }

        /* Alerts */
        .alert-success {
            background: rgba(34, 197, 94, 0.85);
            backdrop-filter: blur(12px);
            border-left: 5px solid #bbf7d0;
            padding: 14px 20px;
            border-radius: 18px;
            margin-bottom: 18px;
            color: white;
            font-weight: 500;
        }

        .alert-error {
            background: rgba(239, 68, 68, 0.85);
            backdrop-filter: blur(12px);
            border-left: 5px solid #ffc4c4;
            padding: 14px 20px;
            border-radius: 18px;
            margin-bottom: 18px;
            color: white;
        }

        footer {
            text-align: center;
            padding: 28px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
            border-top: 1px solid rgba(255,255,255,0.15);
            margin-top: 20px;
        }

        /* Loading spinner light */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,0.5);
            border-top: 3px solid #ffffff;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            margin-right: 10px;
            vertical-align: middle;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Responsive */
        @media (max-width: 768px) {
            .navbar {
                padding: 15px 20px;
                flex-direction: column;
                gap: 12px;
            }
            .card {
                padding: 20px;
            }
            .meal-type-buttons {
                gap: 8px;
            }
            .meal-type-btn {
                padding: 6px 16px;
                font-size: 0.8rem;
            }
        }