/* CSS/bac-calculator.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bac-calculator-wrapper {
    background: linear-gradient(145deg, #e0eafc 0%, #cfdef3 100%);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

/* main card container */
.calculator-card {
    max-width: 560px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.calculator-card:hover {
    transform: scale(1.01);
}

/* header */
.calc-header {
    background: #4169E1;
    padding: 1.5rem 2rem;
    color: white;
}

.calc-header h1 {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 0.4rem;
}

.calc-header p {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
}

/* form content */
.calc-body {
    padding: 2rem 2rem 2rem 2rem;
}

.input-group {
    margin-bottom: 1.8rem;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1f2f4e;
}

.label-text {
    font-size: 1rem;
}

.weight-badge {
    background: #eef2fa;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e3a6f;
}

input[type="number"] {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 1.2rem;
    background: #fefefe;
    transition: all 0.2s;
    font-weight: 500;
    color: #0a1c2f;
    outline: none;
}

input[type="number"]:focus {
    border-color: #2c5a9e;
    box-shadow: 0 0 0 3px rgba(44, 90, 158, 0.2);
    background: #fff;
}

.helper-note {
    font-size: 0.7rem;
    color: #5a6e8a;
    margin-top: 0.4rem;
    margin-left: 0.5rem;
}

.calculate-btn {
    background: #1e3a5f;
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 2rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 14px rgba(0, 30, 60, 0.2);
}

.calculate-btn:hover {
    background: #0f2b48;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.calculate-btn:active {
    transform: translateY(1px);
}

.result-panel {
    background: #f0f5fe;
    border-radius: 1.5rem;
    padding: 1.3rem 1.5rem;
    margin-top: 1.2rem;
    border-left: 6px solid #1e3a5f;
    transition: all 0.2s ease;
}

.grade-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.grade-label {
    font-weight: 600;
    color: #1e2f4e;
}

.final-grade-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0f3b6f;
    letter-spacing: -0.5px;
}

.mention-box {
    background: #ffffffd9;
    border-radius: 2rem;
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #1f3a5f;
    box-shadow: inset 0 1px 2px #0001, 0 1px 2px white;
}

.mention-highlight {
    font-weight: 800;
    color: #1e5f3e;
}

.error-message {
    color: #c7254e;
    background: #f8e7ea;
    border-radius: 1.5rem;
    padding: 0.7rem;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

hr {
    margin: 1rem 0;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

footer {
    font-size: 0.7rem;
    text-align: center;
    padding: 1rem;
    color: #5b6f8c;
    background: #fafcff;
    border-top: 1px solid #e9edf2;
}

@media (max-width: 480px) {
    .calc-body {
        padding: 1.5rem;
    }
    .calc-header h1 {
        font-size: 1.5rem;
    }
    .final-grade-value {
        font-size: 1.5rem;
    }
}