/* --- Global & Theme Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: #0f172a; 
    background-image: radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.1) 0, transparent 50%), 
                      radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.1) 0, transparent 50%);
    background-attachment: fixed;
    color: #f1f5f9;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(16px);
    padding: 10px 5%; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); height: 70px; position: sticky; top: 0; z-index: 1000;
}
.navbar .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; height: 100%; }
.navbar .logo .icon-box {
    width: 40px; height: 40px; border-radius: 8px; background: transparent;
    display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 5px; 
}
.navbar .logo .icon-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.navbar .logo-text { font-size: 1.5rem; font-weight: 700; color: #3b82f6; display: flex; align-items: center; line-height: 1; }

/* Logo Animation */
.logo-letter {
    display: inline-block; opacity: 0; transform: translate(0, 0);
    animation-duration: 0.5s; animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes comeFromTop { 0% { opacity: 0; transform: translateY(-30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes comeFromBottom { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes comeFromRight { 0% { opacity: 0; transform: translateX(30px); } 100% { opacity: 1; transform: translateX(0); } }
.anim-top { animation-name: comeFromTop; }
.anim-bottom { animation-name: comeFromBottom; }
.anim-right { animation-name: comeFromRight; }


/* Main Container */
.main-container { max-width: 600px; width: 95%; margin: 60px auto; padding: 0; flex: 1; }

/* Tool Container */
.tool-container {
    position: relative; padding: 40px 30px; border-radius: 20px; overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #1e1b4b 75%, #0f172a 100%);
    background-size: 400% 400%; animation: gradientFlowNormal 15s ease infinite; 
    border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
@keyframes gradientFlowNormal { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Header */
.tool-header {
    display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 40px; padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: relative; z-index: 2;
}
.tool-logo {
    width: 64px; height: 64px; border-radius: 14px; background: transparent; 
    border: 1px solid rgba(255, 255, 255, 0.2); overflow: hidden; flex-shrink: 0;
}
.tool-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-title { margin: 0; color: #ffffff; font-size: 1.8rem; font-weight: 600; }


/* --- Calculator Styles --- */
.calculator-box { position: relative; z-index: 2; }

.input-section { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.input-group { display: flex; flex-direction: column; gap: 10px; }

.label-txt { font-weight: 500; color: #cbd5e1; font-size: 1rem; display: flex; align-items: center; gap: 8px; }

input[type="number"] {
    width: 100%; padding: 15px; background-color: rgba(15, 23, 42, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px;
    color: #ffffff; outline: none; transition: 0.3s; font-size: 1rem;
}
input[type="number"]:focus { border-color: #3b82f6; background-color: rgba(15, 23, 42, 0.9); }

.height-inputs { display: flex; gap: 15px; }
.height-inputs input { flex: 1; }

/* Buttons */
.action-buttons { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; }
.btn {
    padding: 12px 30px; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 10px; transition: transform 0.2s; min-width: 140px; justify-content: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #2563eb, #6366f1); color: white; }
.btn-secondary { background: #334155; color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover { background-color: #ef4444; color: white; border-color: #ef4444; }

/* --- Result Section --- */
.result-section { animation: slideUp 0.5s ease; text-align: center; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.bmi-result-card {
    background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px; padding: 25px; display: flex; flex-direction: column; align-items: center; gap: 15px;
}

/* Circular BMI Display */
.bmi-circle {
    width: 120px; height: 120px; border-radius: 50%;
    border: 8px solid #3b82f6; /* Dynamic Color */
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(15, 23, 42, 0.8); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}
#bmiValue { font-size: 2.5rem; font-weight: 700; color: white; line-height: 1; }
.bmi-circle small { font-size: 0.8rem; color: #94a3b8; text-transform: uppercase; }

.bmi-status { font-size: 1.5rem; font-weight: 600; margin-top: 5px; }
.bmi-advice { color: #cbd5e1; font-size: 0.95rem; }

/* Suggestion Box */
.suggestion-box {
    margin-top: 20px; background: rgba(15, 23, 42, 0.6); border-radius: 10px;
    padding: 15px; border: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 15px; text-align: left;
}
.suggestion-box i { font-size: 1.5rem; color: #3b82f6; }
.suggestion-box span { color: #f1f5f9; font-size: 0.9rem; line-height: 1.5; }

/* Dynamic Status Colors */
.status-normal { color: #22c55e; border-color: #22c55e !important; }
.status-warning { color: #f59e0b; border-color: #f59e0b !important; }
.status-danger { color: #ef4444; border-color: #ef4444 !important; }

/* Footer */
footer {
    text-align: center; padding: 25px; color: #94a3b8; background-color: #0b0f19;
    margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile */
@media (max-width: 500px) {
    .tool-container { padding: 20px; }
}