/* New Trition - Modern, Vibrant CSS */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #333;
    background: url('../images/Bakground_Ingredients_1.jpg') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    margin: 0;
    overflow-x: hidden;
}


.frosted-glass {
    background: rgba(211, 211, 211, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.login-container {
    display: flex;
    padding: 2rem;
    gap: 2%;
    box-sizing: border-box;
    overflow-y: auto;
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 60px);
    width: 100vw;
    padding: 3%;
    box-sizing: border-box;
    margin-top: 60px;
}

.content-panel {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 3%;
    box-sizing: border-box;
    overflow: auto;
}

.content-panel h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4CAF50;
}

.view-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.week-selector, .person-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.person-checklist #peopleChecklist {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.person-checklist label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.selectors {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    align-items: center;
}

.person-selector, .week-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.target-table-container {
    margin-bottom: 1rem;
}

.target-table-container table {
    font-size: 0.8rem;
}

.target-table-container th, .target-table-container td {
    padding: 0.3rem;
}

.meals-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meal-section h4 {
    margin-bottom: 0.5rem;
    color: #4CAF50;
}

.meal-table {
    font-size: 0.7rem;
}

.meal-table th, .meal-table td {
    padding: 0.2rem;
}

#nutrientAveragesTable {
    font-size: 0.9rem;
}

#nutrientAveragesTable th, #nutrientAveragesTable td {
    padding: 0.5rem;
}

.dish-section {
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
}

.dish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dish-name {
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: #4CAF50;
    flex: 1;
}

.dish-name:focus {
    outline: 1px solid #4CAF50;
}

.dish-table {
    width: 100%;
    margin-bottom: 1rem;
}

.totals-row {
    background: rgba(76, 175, 80, 0.1) !important;
    font-weight: bold;
}

.totals-row td {
    border-top: 2px solid #4CAF50;
}

.add-dish {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.add-dish input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.table-container {
    flex: 1;
    overflow: auto;
    margin: 0;
    position: relative;
}

.table-container thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.table-container thead th:hover {
    background: linear-gradient(45deg, #66BB6A, #4CAF50);
}

/* Custom scrollbar for table */
.table-container::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.table-container::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Move scrollbar to top */
.table-container {
    scrollbar-width: thin;
    scrollbar-color: #4CAF50 rgba(0, 0, 0, 0.1);
}

/* Create space for top scrollbar */
.table-container::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: rgba(211, 211, 211, 0.2);
    backdrop-filter: blur(15px);
    z-index: 5;
    pointer-events: none;
}

.panel {
    padding: 2rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    overflow-y: visible;
}


.left-panel {
    flex: 1;
}

.right-panel {
    flex: 1;
}

.logo-block {
    background: white;
    border: 2px solid lightgoldenrodyellow;
    padding: 1rem;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 10px;
}

.left-panel h2 {
    color: darkgoldenrod;
    margin: 0;
    font-size: 3.5rem;
    font-weight: 600;
}

.features-list {
    list-style-type: disc;
    padding-left: 20px;
    color: white;
}

.features-list li {
    margin-bottom: 15px;
    font-size: 1.7rem;
    font-weight: 600;
}

.right-panel h3 {
    color: #000080;
    margin-bottom: 1rem;
    font-size: 2.8rem;
    font-weight: 400;
}

.right-panel .form-group label {
    color: #0D47A1;
    font-size: 1.5rem;
    font-weight: 600;
}

.right-panel .form-group input {
    font-size: 1.5rem;
}

.right-panel .btn {
    font-size: 1.5rem;
    font-weight: 700;
}

.right-panel .btn-primary {
    background: linear-gradient(45deg, #1976D2, #1565C0);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #4CAF50;
    font-weight: 600;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #4CAF50;
}

nav {
    display: flex;
    gap: 1rem;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
    font-weight: 500;
}

nav a:hover, nav a.active {
    background: #4CAF50;
    color: white;
}

.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.site-name {
    font-weight: bold;
    margin-right: 1rem;
    color: #4CAF50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.hamburger {
    display: none;
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #4CAF50;
    z-index: 1001;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.nav-links {
    display: flex;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    background: #4CAF50;
    color: white;
}

.user-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-nav a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
    font-weight: 500;
}

.top-nav a:hover, .top-nav a.active {
    background: #4CAF50;
    color: white;
}

main {
    margin-top: 80px;
    padding: 2rem;
}

/* Hero Section */
.hero {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.hero-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.hero-content p {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    color: white;
    backdrop-filter: blur(5px);
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Auth Section */
.auth-section {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.login-form h3,
.subscribe-section h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #F44336, #D32F2F);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.view-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    margin: 0 0.25rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

.edit-btn:hover {
    background: rgba(255, 152, 0, 0.2);
}

.delete-btn:hover {
    background: rgba(244, 67, 54, 0.2);
}

input[type="checkbox"] {
    accent-color: #4CAF50;
    transform: scale(1.2);
}

table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #4CAF50;
}

th {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    font-weight: 600;
    padding: 0.25rem;
    text-align: left;
    border: 1px solid #66BB6A;
    cursor: pointer;
    font-size: 0.75rem;
}

th:hover {
    background: linear-gradient(45deg, #66BB6A, #4CAF50);
}

td {
    padding: 0.25rem;
    border: 1px solid #81C784;
    font-size: 0.75rem;
}

tr:nth-child(even) {
    background: rgba(76, 175, 80, 0.05);
}

tr:hover {
    background: rgba(76, 175, 80, 0.1);
}

tr.selected {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4CAF50;
}

.subscribe-section {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.subscribe-section p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 15px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auth-section {
        padding: 2rem 1rem;
    }

    .login-container {
        flex-direction: column;
        height: auto;
        padding: 3%;
        gap: 2%;
    }

    .panel {
        padding: 1rem;
        margin-bottom: 2%;
    }

    .left-panel, .right-panel {
        flex: none;
        width: 100%;
    }

    .right-panel {
        order: -1;
    }

    .site-name {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .top-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .top-nav.open {
        max-height: 300px;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        margin: 0;
    }

    .content-panel {
        padding: 3%;
    }

    table th, table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .feature {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        padding: 1rem;
    }

    .left-panel h2 {
        font-size: 2.5rem;
    }

    .features-list li {
        font-size: 1.2rem;
    }

    .right-panel h3 {
        font-size: 2rem;
    }

    .right-panel .form-group label {
        font-size: 1.2rem;
    }

    .right-panel .form-group input {
        font-size: 1.2rem;
    }

    .right-panel .btn {
        font-size: 1.2rem;
    }
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: inherit;
    z-index: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

th, td {
    padding: 0.25rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.75rem;
}

th {
    background: #4CAF50;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Meal Planner */
.meal-planner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .meal-planner {
        grid-template-columns: 1fr;
    }
}

.day-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.day-tab {
    padding: 0.5rem 1rem;
    background: #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.day-tab.active {
    background: #4CAF50;
    color: white;
}

.meal-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.nutrient-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}