
:root {
    --primary-color: #3A76F7;
    --primary-light: #89cff0;
    --background-start: #F4F7FC;
    --background-end: #E9F0FA;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(58, 118, 247, 0.2);
    --text-color: #2D3748;
    --text-light: #718096;
    --shadow-color: rgba(58, 118, 247, 0.15);
    --success-color: #38A169;
    --warning-color: #D69E2E;
    --danger-color: #E53E3E;
    --electric-blue: #00BFFF; /* New Highlight Color */
}

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

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background-image: linear-gradient(135deg, var(--background-start) 0%, var(--background-end) 100%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { max-width: 900px; margin: 1rem auto; padding: 0 1rem; flex-grow: 1; }

.main-header { text-align: center; padding: 3rem 1rem 2rem; }
.main-header h1 {
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.05);
}


.tabs-container { background: rgba(255,255,255,0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 50px; margin: 0 auto 1.5rem auto; width: fit-content; padding: 0.5rem; border: 1px solid var(--card-border); }
.main-nav { display: flex; flex-wrap: wrap; justify-content: center; }
.nav-link { color: var(--text-light); text-decoration: none; padding: 0.75rem 1.5rem; border-radius: 50px; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); font-weight: 600; white-space: nowrap; }
.nav-link.active { background-color: var(--primary-color); color: #fff; box-shadow: 0 4px 15px -5px var(--primary-color); }

.glass-card, article.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        0px 2.8px 2.2px rgba(58, 118, 247, 0.02),
        0px 6.7px 5.3px rgba(58, 118, 247, 0.028),
        0px 12.5px 10px rgba(58, 118, 247, 0.035),
        0px 22.3px 17.9px rgba(58, 118, 247, 0.042),
        0px 41.8px 33.4px rgba(58, 118, 247, 0.05),
        0px 100px 80px rgba(58, 118, 247, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover, article.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0px 3.8px 3.2px rgba(58, 118, 247, 0.025),
        0px 8.7px 7.3px rgba(58, 118, 247, 0.035),
        0px 15.5px 14px rgba(58, 118, 247, 0.045),
        0px 27.3px 22.9px rgba(58, 118, 247, 0.055),
        0px 51.8px 43.4px rgba(58, 118, 247, 0.065),
        0px 120px 100px rgba(58, 118, 247, 0.09);
}

.tool-section { display: none; animation: fadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.tool-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tool-section h2 { text-align: center; margin-bottom: 0.5rem; font-weight: 700; color: var(--text-color); font-size: 1.5rem; }
.tool-section > article > p { text-align: center; color: var(--text-light); margin-bottom: 2.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-light); }
input[type="number"], input[type="text"], select, textarea { width: 100%; padding: 0.9rem 1rem; background: #F4F7FC; border: 1px solid #E2E8F0; border-radius: 12px; color: var(--text-color); font-size: 1rem; transition: all 0.3s; }
input[type="number"]:focus, input[type="text"]:focus, select:focus, textarea:focus { background: #fff; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--shadow-color); outline: none; }
select option { background-color: #fff; }

.radio-group { display: flex; gap: 1rem; align-items: center; }
.radio-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; cursor: pointer; }

.btn-primary, .btn-secondary, .btn-tertiary, .btn-share { width: 100%; padding: 1rem 1.5rem; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; margin-top: 1rem; text-transform: uppercase; border: none; }
.btn-primary { background-image: linear-gradient(45deg, var(--primary-color) 0%, var(--primary-light) 100%); color: #fff; box-shadow: 0 4px 20px -5px var(--primary-color); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 7px 25px -8px var(--primary-color); }
.btn-secondary { background: #E9F0FA; color: var(--text-light); }
.btn-secondary:hover { background: #DDE5F1; color: var(--text-color); }
.btn-tertiary { background: transparent; color: var(--text-light); text-decoration: underline; font-size: 0.9rem; margin-top: 0; padding: 0.5rem; width: auto; }
.btn-tertiary:hover { color: var(--primary-color); }

.btn-share { background: var(--success-color); color: #fff; margin-top: 1rem; background-image: linear-gradient(45deg, var(--success-color) 0%, #68D391 100%);}
.btn-share:hover { transform: translateY(-2px); box-shadow: 0 4px 15px -5px var(--success-color); }

.formula-comment { font-size: 0.8rem; color: #A0AEC0; margin-top: 2rem; text-align: center; border-top: 1px solid #E2E8F0; padding-top: 1rem; }

.results-card { margin-top: 2.5rem; background: linear-gradient(135deg, var(--background-start) 0%, #fff 100%); padding: 2.5rem; border-radius: 16px; display: none; animation: fadeIn 0.5s; text-align: center; border: 1px solid #fff; box-shadow: 0 4px 20px -10px var(--shadow-color); }
.results-card h3, .results-card h4 { margin-bottom: 0.5rem; color: var(--primary-color); }
.results-card p { margin-bottom: 1rem; color: var(--text-light); }
.results-card .share-button-container { margin-top: 1rem; }

/* --- Protein Section --- */
.pro-tip { margin-top: 2.5rem; padding: 1.5rem; background-color: #E9F0FA; border-radius: 12px; border-left: 5px solid var(--electric-blue); }
#protein-result .protein-total { font-size: 3.5rem; font-weight: 700; color: var(--electric-blue); }
#protein-result .meal-timing h4 { color: var(--electric-blue); }

/* --- GYM RAT PACK --- */
#volume-result .volume-total { font-size: 3.5rem; font-weight: 700; color: var(--primary-color); }
#bf-result svg { width: 100px; height: 200px; margin: 0 auto; display: block; } 
#bf-result .body-shape { transition: all 0.5s ease; fill: var(--primary-color); }
#ffmi-result .ffmi-scale { display: flex; justify-content: space-between; margin-top: 1.5rem; padding: 0.5rem; border-radius: 10px; background: #E9F0FA; }
#ffmi-result .ffmi-scale div { text-align: center; flex: 1; padding: 0.5rem; font-weight: 600; border-radius: 8px; }
#ffmi-result .ffmi-scale .active { background: var(--primary-color); color: #fff; }
#orm-result table { width: 100%; margin-top: 1rem; border-collapse: collapse; text-.align: left; }
#orm-result th, #orm-result td { padding: 0.75rem; border-bottom: 1px solid #E2E8F0; }
#orm-result th { color: var(--text-light); }

.timer-input-container { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.timer-input-container input { width: 80px; text-align: center; font-size: 1.5rem; padding: 0.5rem; }
.timer-input-container span { font-size: 1.5rem; color: var(--text-light); }

.timer-display { font-size: 5rem; text-align: center; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: 2px; color: var(--text-color); }
.timer-controls { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.timer-controls .btn-primary, .timer-controls .btn-secondary { width: auto; }
.rest-counter { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; color: var(--text-light); }
.rest-counter p { margin: 0; }

.popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); z-index: 100; width: 90%; max-width: 400px; text-align: center; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s, visibility 0.3s; }
.popup.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

#drinks-container .drink { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 1rem; align-items: center; margin-bottom: 1rem;}
#add-bac-drink { width: auto; padding: 0.5rem 1rem; margin-top: 0; }
#drinks-container .drink button { background-color: var(--danger-color); color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; }

#calorie-display { font-size: 2rem; font-weight: 700; color: var(--success-color); }
.warning-text { color: var(--warning-color); font-weight: 600; text-align: center; }

.contact-email-link { 
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}
.contact-email-link:hover { background-color: #2c5282; }

footer.main-footer { text-align: center; padding: 2rem 1rem; background-color: var(--background-end); margin-top: auto; }
footer.main-footer nav a { color: var(--text-light); text-decoration: none; margin: 0 1rem; }
footer.main-footer nav a:hover { color: var(--primary-color); }
footer.main-footer p { margin-top: 1rem; font-size: 0.9rem; color: #A0AEC0; }

@media (max-width: 768px) {
    .tabs-container { width: auto; border-radius: 20px; }
    .main-nav { justify-content: flex-start; overflow-x: auto; padding: 0.5rem; }
    #drinks-container .drink { grid-template-columns: 1fr 1fr; }
    #drinks-container .drink button { grid-column: span 2; }
}
@media (max-width: 600px) {
    .main-header h1 { font-size: 2.5rem; }
    .glass-card, article.glass-card { padding: 1.5rem; border-radius: 20px; }
    .timer-display { font-size: 3.5rem; }
    .timer-input-container input { width: 60px; font-size: 1.2rem; }
    footer.main-footer nav { display: flex; flex-direction: column; gap: 0.5rem; }
}
