/* --- Wrapper --- */
#bmi-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #111827; /* Gray 900 */
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #374151; /* Gray 700 */
    color: white;
    gap: 20px;
}

/* --- Toggle Buttons --- */
.bmi-toggle-container {
    display: flex;
    background-color: #1f2937;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #374151;
    width: 100%;
}

.bmi-toggle-btn {
    flex: 1;
    background: transparent;
    color: #9ca3af;
    border: none;
    padding: 10px;
    font-family: inherit;
    font-size: 0.6rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.bmi-toggle-btn.active {
    background-color: #374151;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* --- Inputs --- */
.bmi-inputs {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bmi-input-group {
    background-color: #1f2937;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #374151;
}

.bmi-input-group label {
    font-size: 0.7rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.bmi-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmi-row.hidden {
    display: none;
}

.bmi-input {
    background-color: #111827;
    border: 2px solid #4b5563;
    color: white;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 4px;
    flex: 1;
    text-align: right;
    outline: none;
    width: 100%;
}

.bmi-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.bmi-unit {
    color: #6b7280;
    font-size: 0.8rem;
    width: 30px;
}

/* --- Display --- */
.bmi-display-container {
    background-color: #000;
    border: 4px solid #333;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    text-align: center;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* Glass effect */
.bmi-display-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
    pointer-events: none;
}

.bmi-label {
    font-size: 0.6rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.bmi-result-val {
    font-size: 3rem;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: color 0.3s;
}

.bmi-category {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 5px;
    font-weight: bold;
}

.bmi-category.blue { color: #3b82f6; text-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
.bmi-category.green { color: #10b981; text-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
.bmi-category.yellow { color: #f59e0b; text-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
.bmi-category.red { color: #ef4444; text-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }

/* --- Gauge --- */
.bmi-gauge-wrapper {
    width: 100%;
    position: relative;
    height: 40px;
    margin-top: 10px;
}

.bmi-gauge-bar {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, 
        #3b82f6 0%, 
        #3b82f6 25%, 
        #10b981 25%, 
        #10b981 50%, 
        #f59e0b 50%, 
        #f59e0b 75%, 
        #ef4444 75%, 
        #ef4444 100%
    );
    margin-top: 10px;
    border: 1px solid #374151;
}

.bmi-gauge-marker {
    position: absolute;
    top: 5px; /* Above bar */
    left: 0%;
    width: 4px;
    height: 20px;
    background-color: white;
    border: 1px solid black;
    transform: translateX(-50%);
    transition: left 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.bmi-gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 25%; /* Align with color breaks roughly */
    font-size: 0.5rem;
    color: #6b7280;
}

/* --- Reset Button --- */
.bmi-btn-reset {
    width: 100%;
    background-color: #ef4444;
    color: #7f1d1d;
    border: none;
    border-bottom: 4px solid #b91c1c;
    border-radius: 4px;
    padding: 15px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.1s;
}

.bmi-btn-reset:active {
    transform: translateY(4px);
    border-bottom: none;
    margin-bottom: 4px;
}