/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background: #f8faff;
    display: flex;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 750px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== HEADER ===== */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 20px 0;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo .doc { color: #0f172a; }
.logo .fe { color: #3b82f6; }

.subtitle {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
}

.home-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.home-link:hover {
    transform: scale(1.05);
}

.home-icon-circle {
    background: #eef5ff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}

.home-link:hover .home-icon-circle {
    background: #dbeafe;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.home-icon-circle svg {
    width: 26px;
    height: 26px;
    stroke: #3b82f6;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== CALCULATOR CARD ===== */
.calculator-card {
    width: 100%;
    background: white;
    border-radius: 28px;
    padding: 28px 24px 36px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

.calculator-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.calc-sub {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
}

.form-group .unit {
    font-weight: 400;
    color: #94a3b8;
    font-size: 13px;
    margin-left: 4px;
}

input, select {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #fcfcff;
    transition: 0.2s;
    color: #0f172a;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder {
    color: #b0b9c7;
    font-weight: 400;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
    background: white;
}

/* ===== TOGGLE ===== */
.toggle-wrapper {
    margin-bottom: 10px;
}

.toggle-btn {
    display: inline-flex;
    background: #f1f4f9;
    border-radius: 40px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    user-select: none;
}

.toggle-option {
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
}

.toggle-option.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dual-input {
    display: flex;
    gap: 10px;
}

.dual-input input {
    flex: 1;
}

/* ===== SELECT ===== */
select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #fcfcff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

select option {
    white-space: normal;
    word-break: break-word;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
}
/* ===== GENDER – NO RADIO, CLEAN BUTTONS ===== */
.gender-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gender-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;

    padding: 10px 24px;
    background: #f8fafc;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #1e293b;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    min-height: 48px;
    min-width: 100px;
    user-select: none;
}

.gender-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #0f172a;
}

.gender-btn:hover {
    background: #f1f5f9;
}

/* ===== BUTTON ===== */
.btn-calc {
    width: 100%;
    padding: 16px;
    background: #3b82f6;
    border: none;
    border-radius: 40px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-calc:hover { background: #2563eb; }
.btn-calc:active { transform: scale(0.98); }

/* ===== RESULT ===== */
.result-area {
    background: #f8fafc;
    border-radius: 24px;
    padding: 20px 20px 16px;
    border: 1px solid #eef2f7;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9edf2;
}

.result-item:last-of-type { border-bottom: none; }

.result-label { font-weight: 500; color: #475569; }
.result-value { font-weight: 700; color: #0f172a; font-size: 18px; }
.result-note { font-size: 13px; color: #94a3b8; margin-top: 12px; text-align: center; }

/* ===== FORMULA BLOG ===== */
.formula-blog {
    width: 100%;
    background: white;
    border-radius: 28px;
    padding: 28px 24px 36px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
}

.formula-blog h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.formula-blog > p {
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.6;
}

.formula-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border-left: 4px solid #3b82f6;
}

.formula-card h4 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.formula-card p {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.calc-box {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: #1e293b;
    border: 1px solid #eef2f7;
    font-family: monospace;
    overflow-x: auto;
    white-space: nowrap;
}

.calc-box::-webkit-scrollbar {
    height: 6px;
}
.calc-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.calc-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.note-box {
    background: #eff6ff;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 14px;
    color: #1e293b;
    border: 1px solid #bfdbfe;
    margin-top: 8px;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 550px) {
    body { padding: 12px; }
    .container { max-width: 100%; }
    .header { padding: 8px 0 14px 0; }
    .logo { font-size: 28px; }
    .subtitle { font-size: 13px; }
    .calculator-card, .formula-blog { padding: 18px 14px 24px; }
    .toggle-option { padding: 4px 12px; font-size: 13px; }
    .dual-input { flex-direction: column; gap: 6px; }
    input, select { padding: 10px 12px; font-size: 14px; }
    select option { font-size: 13px; padding: 4px 8px; min-height: 26px; }
    
    .gender-btn {
        padding: 8px 18px;
        font-size: 14px;
        min-height: 42px;
        min-width: 80px;
     
    }
    
    .btn-calc { font-size: 16px; padding: 14px; }
    .home-icon-circle { width: 40px; height: 40px; }
    .home-icon-circle svg { width: 20px; height: 20px; }
    .result-value { font-size: 16px; }
    .calc-box { font-size: 13px; padding: 10px 14px; }
}

@media (min-width: 769px) {
    .container { max-width: 750px; }
    .calculator-card, .formula-blog { padding: 36px 32px 40px; }
    .header { padding: 16px 0 24px 0; }
    .logo { font-size: 36px; }
    .subtitle { font-size: 15px; }
}

#bfGroup {
    transition: all 0.3s ease;
    overflow: hidden;
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 14px 0 20px 0;
    padding: 12px 14px;

    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 14px;

    font-size: 13px;
    color: #475569;

    line-height: 1.4;
}

.privacy-icon {
    font-size: 16px;
}

.privacy-text {
    font-weight: 500;
}

#errorBox {

    animation: fadeIn .25s ease;

}


@keyframes fadeIn {

from {

opacity:0;
transform:translateY(-5px);

}


to {

opacity:1;
transform:translateY(0);

}

}

/* faq section */
.faq-section {
    margin-top: 40px;
    padding: 25px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.faq-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
}

.faq-item {
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.faq-answer {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}