* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: #fff;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

nav {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo {
    background-color: #ff0000;
    color: white;
    padding: 10px 20px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 5px;
    text-decoration: none;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 155px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff0000;
}

nav .btn {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 7px;
    padding: 12px 22px;
    font-size: 22px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

nav .btn:hover {
    background-color: #fffb00;
    color: rgb(0, 0, 0);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 50%;
    left: 0;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #333;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #ff0000;
    padding-left: 25px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.grid-container {
    max-width: 1400px;
    margin: 30px auto;
    margin-left: 0px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-left: 300px;
}

.grid-item {
    background-color: white;
    padding: 60px 40px;
    box-shadow: 60px 10px 90px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 350px;
}

.drop-down-second {
    position: relative;
}

.drop-down-menu-second {
    position: absolute;
    top: 50%;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.drop-down-menu-second li {
    padding: 0;
}

.drop-down-menu-second a {
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #333;
    transition: all 0.3s;
}

.drop-down-menu-second a:hover {
    background-color: #f5f5f5;
    color: #ff0000;
    padding-left: 25px;
}

.drop-down-second:hover .drop-down-menu-second {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.page-header {
    background-color: #2a2a2a;
    color: white;
    padding: 60px 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.page-title {
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-subtitle {
    font-size: 16px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 80%;
}

.daily-stats {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 48px;
    font-weight: 800;
    color: #d32f2f;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #999;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 15px;
    transition: width 0.5s ease;
    width: 0%;
}

.macros-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.macros-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.macro-card {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.macro-card h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.macro-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.macro-progress {
    width: 100%;
    height: 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.macro-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.protein-bar {
    background-color: #e91e63;
}

.carbs-bar {
    background-color: #2196f3;
}

.fats-bar {
    background-color: #ff9800;
}

.tabs-section {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.tabs-container {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #d32f2f;
    border-bottom-color: #d32f2f;
}

.tab-btn:hover {
    color: #d32f2f;
}

.content-section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-section.active {
    display: block;
}

.content-container {
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.add-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #45a049;
}

.meals-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.meal-section {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.meal-section h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #d32f2f;
    padding-bottom: 10px;
}

.food-list {
    min-height: 100px;
    margin-bottom: 15px;
}

.food-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.food-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.food-info p {
    font-size: 13px;
    color: #666;
}

.food-calories {
    font-size: 18px;
    font-weight: 700;
    color: #d32f2f;
}

.food-actions button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.food-actions button:hover {
    background-color: #d32f2f;
}

.meal-total {
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 12px 20px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    width: 300px;
    transition: border-color 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: #d32f2f;
}

.database-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn.active,
.category-btn:hover {
    background-color: #d32f2f;
    color: white;
}

.food-database-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.database-food-card {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.database-food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.database-food-card h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.database-food-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.database-food-card .calories {
    font-size: 24px;
    font-weight: 700;
    color: #d32f2f;
    margin-top: 10px;
}

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

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close:hover {
    color: #d32f2f;
}

.modal h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #333;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-body input,
.modal-body select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.modal-body input:focus,
.modal-body select:focus {
    outline: none;
    border-color: #d32f2f;
}

.modal-food-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

.modal-food-item {
    padding: 10px;
    margin-bottom: 5px;
    background-color: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-food-item:hover {
    background-color: #e0e0e0;
}

.modal-food-item.selected {
    background-color: #d32f2f;
    color: white;
}

.modal-btn {
    width: 100%;
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 8px;
    cursor: pointer;
}

.modal-btn:hover {
    background-color: #45a049;
}

.footer {
    background: #2a2a2a;
    padding: 15px 0;
    text-align: center;
    margin-top: 100px;
}

.footer-info {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
    color: #ffffff;
    font-size: 20px;
}

.footer-info p {
    margin: 25px 0;
}

.footer-info .info {
    font-size: 16px;
    color: #ffffff;
    margin-top: 25px;
}

@media screen and (max-width: 1024px) {
    .nav-container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 80px;
    }

    .logo {
        font-size: 24px;
        padding: 8px 16px;
        letter-spacing: 3px;
    }

    .nav-links a {
        font-size: 16px;
    }

    nav .btn {
        padding: 10px 18px;
        font-size: 18px;
    }

    .page-header {
        padding: 40px 20px;
    }

    .page-title {
        font-size: 36px;
    }

    .page-subtitle {
        font-size: 14px;
        margin-right: 60%;
    }

    .daily-stats,
    .macros-section,
    .tabs-section,
    .content-section {
        padding: 0 20px;
    }

    .stats-container,
    .macros-container {
        gap: 20px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 36px;
    }

    .macro-card {
        padding: 20px;
    }

    .macro-value {
        font-size: 28px;
    }

    .meals-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .add-btn {
        align-self: flex-start;
    }

    .search-container input {
        width: 100%;
    }

    .food-database-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .database-categories {
        gap: 8px;
    }

    .category-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .footer-info {
        font-size: 18px;
        padding: 15px;
    }
}

@media screen and (max-width: 767px) {
    .nav-container {
        padding: 0 15px;
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        font-size: 22px;
        padding: 8px 14px;
        letter-spacing: 2px;
        margin-top: 5px;
    }

    .nav-links {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 16px;
        display: block;
        padding: 12px 0;
    }

    nav .btn {
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        font-size: 18px;
    }

    .dropdown-menu,
    .drop-down-menu-second {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background-color: #f8f8f8;
        margin-top: 5px;
        border-radius: 5px;
        padding: 5px 0;
        min-width: auto;
    }

    .dropdown:hover .dropdown-menu,
    .drop-down-second:hover .drop-down-menu-second {
        display: block;
    }

    .dropdown-menu a,
    .drop-down-menu-second a {
        padding: 10px 15px;
        font-size: 15px;
    }

    .dropdown-menu a:hover,
    .drop-down-menu-second a:hover {
        padding-left: 20px;
    }

    .page-header {
        padding: 30px 15px;
    }

    .header-content {
        text-align: center;
    }

    .page-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .page-subtitle {
        font-size: 13px;
        margin-right: 0;
        width: 100%;
    }

    main {
        padding: 0 15px;
    }

    .daily-stats,
    .macros-section,
    .tabs-section,
    .content-section {
        max-width: 100%;
        padding: 0;
        margin: 30px 0;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
        border-radius: 10px;
    }

    .stat-value {
        font-size: 32px;
    }

    .stat-label {
        font-size: 13px;
    }

    .progress-bar-container {
        height: 20px;
        border-radius: 10px;
    }

    .macros-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .macro-card {
        padding: 20px 15px;
    }

    .macro-value {
        font-size: 24px;
    }

    .tabs-container {
        flex-direction: column;
        border-bottom: none;
    }

    .tab-btn {
        padding: 12px 20px;
        text-align: center;
        border-bottom: 2px solid #e0e0e0;
        border-radius: 8px 8px 0 0;
    }

    .tab-btn.active {
        border-bottom-color: #d32f2f;
        background-color: #f9f9f9;
    }

    .content-section {
        padding: 20px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 24px;
        text-align: center;
    }

    .add-btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    .meals-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .meal-section {
        padding: 20px 15px;
    }

    .meal-section h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .food-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .food-info h4 {
        font-size: 15px;
    }

    .food-info p {
        font-size: 12px;
    }

    .food-calories {
        font-size: 16px;
    }

    .food-actions {
        align-self: flex-end;
    }

    .food-actions button {
        padding: 8px 12px;
        font-size: 13px;
    }

    .meal-total {
        font-size: 16px;
        text-align: center;
    }

    .search-container input {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }

    .database-categories {
        gap: 6px;
        margin-bottom: 20px;
        justify-content: center;
    }

    .category-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1 0 auto;
        min-width: 70px;
        text-align: center;
    }

    .food-database-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .database-food-card {
        padding: 15px;
    }

    .database-food-card h4 {
        font-size: 16px;
    }

    .database-food-card p {
        font-size: 13px;
    }

    .database-food-card .calories {
        font-size: 20px;
    }

    .modal-content {
        width: 95%;
        padding: 25px 20px;
        max-height: 85vh;
    }

    .modal h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .modal-body .form-group {
        margin-bottom: 15px;
    }

    .modal-body label {
        font-size: 13px;
    }

    .modal-body input,
    .modal-body select {
        padding: 10px;
        font-size: 15px;
    }

    .modal-food-list {
        max-height: 150px;
    }

    .modal-food-item {
        padding: 8px;
        font-size: 14px;
    }

    .modal-btn {
        padding: 12px;
        font-size: 16px;
    }

    .close {
        right: 15px;
        top: 10px;
        font-size: 28px;
    }

    .footer {
        margin-top: 50px;
        padding: 10px 0;
    }

    .footer-info {
        font-size: 16px;
        padding: 15px 10px;
    }

    .footer-info p {
        margin: 15px 0;
    }

    .footer-info .info {
        font-size: 14px;
        margin-top: 15px;
    }
}

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    transition: none;
}

.burger-btn:hover {
    background-color: transparent;
    transform: none;
}

.burger-line {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
}

@media screen and (max-width: 767px) {
    .burger-btn {
        display: flex;
        position: absolute;
        right: 30px;
        top: 26%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: 80px 20px 30px;
        gap: 0;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-links li:last-child {
        border-bottom: none;
        margin-top: 20px;
    }

    .nav-links a {
        padding: 15px 0;
        text-align: left;
        font-size: 18px;
    }

    .dropdown-menu,
    .drop-down-menu-second {
        position: static;
        display: none;
        background-color: #f9f9f9;
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .dropdown:hover .dropdown-menu,
    .drop-down-second:hover .drop-down-menu-second {
        display: none;
    }

    .dropdown.active .dropdown-menu,
    .drop-down-second.active .drop-down-menu-second {
        display: block;
    }

    .dropdown-menu a,
    .drop-down-menu-second a {
        padding: 12px 20px;
        font-size: 16px;
        border-bottom: 1px solid #eee;
    }

    .dropdown-menu a:last-child,
    .drop-down-menu-second a:last-child {
        border-bottom: none;
    }

    .dropdown > a,
    .drop-down-second > a {
        position: relative;
        padding-right: 30px;
    }

    .dropdown > a::after,
    .drop-down-second > a::after {
        content: '›';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%) rotate(90deg);
        font-size: 20px;
        transition: transform 0.3s;
    }

    .dropdown.active > a::after,
    .drop-down-second.active > a::after {
        transform: translateY(-50%) rotate(-90deg);
    }

    .nav-links .btn {
        width: 100%;
        margin-top: 10px;
        padding: 15px;
        text-align: center;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }

    .nav-container {
        position: relative;
    }

    .logo {
        margin: 0px 180px 0px 0;
        font-size: 20px;
        padding: 8px 15px;
        letter-spacing: 2px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .burger-btn {
        display: none;
    }
}
