* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html,
body {
    height: 100%;
}

.top-banner,
.bottom-banner {
    min-height: 90px;
    max-height: 250px;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ad-space {
    background: #ddd;
    color: #333;
    border: 1px dashed #888;
    width: 95%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0066cc;
    color: #fff;
    padding: 10px 20px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    transition: color .3s;
}

.nav-links a:hover {
    color: #010056;
}

.hamburger {
    display: none;
    font-size: 22px;
    cursor: pointer;
}

.main-container {
    display: flex;
    min-height: 66vh;
}

.left-banner {
    min-width: 160px;
    max-width: 300px;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    flex-shrink: 0;
}

.protein-tool-section {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 24px 24px;
    background: linear-gradient(120deg, #e3f2fd 0%, #f5f5f5 100%);
}

.protein-card {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.protein-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    position: relative;
    flex-wrap: wrap;
}

.protein-title {
    color: #0066cc;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.protein-info-trigger {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #0066cc;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #e3f2fd 70%);
    color: #0066cc;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: transform .35s cubic-bezier(.42, 0, .58, 1), box-shadow .35s, background .4s;
}

.protein-info-trigger:hover,
.protein-info-trigger:focus-visible {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    outline: none;
}

.protein-info-trigger:active {
    transform: scale(.95);
}

.protein-info-flyout {
    position: absolute;
    top: 55px;
    left: 0;
    z-index: 50;
    background: #ffffffee;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #c5d8e6;
    border-radius: 18px;
    padding: 18px 20px 16px;
    width: min(620px, 90vw);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.98);
    transition: opacity .5s cubic-bezier(.42, 0, .58, 1), transform .55s cubic-bezier(.42, 0, .58, 1);
}

.protein-info-flyout h2 {
    font-size: 1.2rem;
    color: #0066cc;
    margin-bottom: 6px;
}

.protein-info-flyout p {
    font-size: .92rem;
    color: #222;
    line-height: 1.35;
    margin-bottom: 10px;
}

.protein-info-flyout .protein-sub {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #444;
    margin-top: -2px;
}

.protein-info-flyout .protein-disclaimer {
    font-size: .6rem;
    letter-spacing: .5px;
    color: #555;
    text-transform: uppercase;
    opacity: .9;
}

.protein-title-row:hover .protein-info-flyout,
.protein-info-trigger:focus+.protein-info-flyout,
.protein-info-trigger:focus-visible+.protein-info-flyout {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.protein-interaction-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 26px;
    flex-wrap: wrap;
}

@media (min-width:901px) {
    .protein-interaction-row {
        flex-wrap: nowrap;
    }
}

.protein-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #e3f2fd;
    border-radius: 14px;
    padding: 18px 16px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.protein-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.protein-form label {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 2px;
}

.protein-form .input-row {
    display: flex;
    gap: 8px;
}

.protein-form input[type=number] {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid #b0bec5;
    font-size: 1rem;
    background: #f7fafd;
    color: #222;
    transition: border .3s;
}

.protein-form input[type=number]:focus {
    border: 1.5px solid #0066cc;
}

.protein-form select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1.5px solid #b0bec5;
    background: #e3f2fd;
    color: #222;
    font-size: 1rem;
    transition: border .3s;
}

.protein-form select:focus {
    border: 1.5px solid #0066cc;
}

.method-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    background: #d6eafc;
    padding: 10px 10px 8px;
    border-radius: 10px;
}

.method-options label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .4px;
    color: #004d80;
}

.protein-btn {
    margin-top: 6px;
    padding: 10px 0;
    background: linear-gradient(90deg, #0066cc 60%, #333 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    transition: background .3s, transform .2s;
}

.protein-btn:hover {
    background: linear-gradient(90deg, #004080 60%, #111 100%);
    transform: translateY(-2px) scale(1.03);
}

.protein-result-container {
    margin-top: 0;
    width: 100%;
    background: linear-gradient(140deg, #f0f7ff 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(.95) translateY(40px);
    pointer-events: none;
    transition: opacity .7s cubic-bezier(.42, 0, .58, 1), transform .7s cubic-bezier(.42, 0, .58, 1);
}

.protein-result-container.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    animation: popResult 1.1s cubic-bezier(.42, 0, .58, 1);
}

.protein-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
    width: 100%;
}

.protein-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 4px;
    letter-spacing: 1px;
    animation: fadeInNum 1.2s cubic-bezier(.42, 0, .58, 1);
}

.protein-label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #0066cc;
}

.protein-progress-wrapper {
    width: 100%;
}

.protein-progress-bar {
    width: 100%;
    height: 14px;
    background: #cfd8dc;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.protein-progress {
    height: 100%;
    width: 0;
    border-radius: 10px;
    background: #2196f3;
    transition: width 1.2s cubic-bezier(.42, 0, .58, 1), background .3s;
}

.protein-scale {
    display: flex;
    justify-content: space-between;
    font-size: .65rem;
    color: #555;
    letter-spacing: .5px;
    margin-top: -2px;
}

.protein-breakdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.protein-breakdown .row {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    background: #e3f2fd;
    padding: 6px 8px;
    border-radius: 8px;
    align-items: center;
}

.protein-breakdown .row span.method {
    font-weight: 600;
    color: #004d80;
    font-size: .65rem;
    letter-spacing: .5px;
}

.protein-extra {
    margin-top: 8px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.protein-extra .stat {
    background: #eef7ff;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: .68rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.protein-extra .stat span.label {
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    color: #0066cc;
    font-size: .55rem;
}

.protein-extra .stat span.value {
    font-weight: 700;
    font-size: .85rem;
    color: #222;
}

.protein-tips {
    font-size: .72rem;
    color: #333;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
    animation: fadeInTips 1.1s cubic-bezier(.42, 0, .58, 1);
}

.protein-disclaimer-bottom {
    margin-top: 8px;
    font-size: .56rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #555;
    opacity: .85;
    text-align: center;
}

/* Hide bottom banner on desktop (850px and above) */
@media (min-width:850px) {
    .bottom-banner {
        display: none;
    }
}

/* Hide left banner on mobile (below 900px) */
@media (max-width:900px) {
    .left-banner {
        display: none;
    }

    /* Show bottom banner on mobile */
    .bottom-banner {
        display: flex;
    }

    .protein-tool-section {
        padding: 30px 18px 18px;
    }
}

@media (max-width:700px) {
    .protein-form {
        max-width: 100%;
    }

    .protein-result-container {
        max-width: 100%;
    }

    .protein-interaction-row {
        flex-direction: column;
    }

    .protein-title {
        font-size: 1.65rem;
    }
}

@keyframes popResult {
    0% {
        opacity: 0;
        transform: scale(.8) translateY(60px);
    }

    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInNum {
    from {
        opacity: 0;
        transform: scale(.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInTips {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width:850px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 10px;
        background: #0066cc;
        position: absolute;
        top: 157px;
        width: 60%;
        padding: 10px 0 10px 12px;
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }
}

.layout-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-row {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
}

.scroll-panel {
    background: linear-gradient(120deg, #e3f2fd 0%, #f5f5f5 100%);
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 30% 0;
}