#post-6696 h1{
    background: #000;
    padding: 5px;
    text-align: center;
    color: #fff;
    border-radius: 7px;
}

.cgpa-result-title {
    font-size: 30px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #000000;
}

.btn-action {
    display: inline-block;
    margin: 10px 10px;
    padding: 10px 16px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s ease;
}

.btn-action:hover {
    background: #004999;
}


.form-group {
    margin-bottom: 20px;
}

/* Inputs */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #000;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #003366;
    outline: none;
}

/* Validation Feedback */
.has-error {
    border: 1px solid #e63946 !important;
    background-color: #fff5f5 !important;
    animation: shake 0.3s ease-in-out;
}
.has-success {
    border: 1px solid #2a9d8f !important;
    background-color: #f0fdf4 !important;
}
.error-feedback,
.valid-feedback {
    display: block;
    font-size: 13px;
    margin-top: 5px;
}
.error-feedback {
    color: #e63946;
    font-weight: 500;
}
.valid-feedback {
    color: #2a9d8f;
    font-weight: 500;
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Submit Button */
.btn-submit {
    display: inline-block;
    padding: 12px 28px;
    font-size: 16px;
    background: linear-gradient(to right, #003366, #00509e);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: linear-gradient(to right, #00509e, #003366);
}

/* Result Section */
.cgpa-final-score {
    font-size: 30px;
    margin: 25px 0;
    text-align: center;
    color: #000000;
    font-weight: 900;
}

.cgpa-breakdown-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    margin-bottom: 0;
    min-width: 320px;
}

.scrollable-table {
    overflow: auto;
}

.cgpa-breakdown-table th,
.cgpa-breakdown-table td {
    border: 1px solid #000;
    padding: 7px;
    font-size: 15px;
    text-align: center;
}

.cgpa-breakdown-table th {
    background: #f1f1f178;
    font-weight: 600;
}


.student-info p {
    color: #000;
    margin: 6px 0;
    font-size: 16px;
}

.cgpa-formula-info {
    margin-top: 35px;
}


.formula-info-title {
    font-size: 23px;
    font-weight: bold;
    margin-bottom: 5px;
}

.formula-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 5px;
    font-size: 18px;
}

.formula-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 1px;
    margin-bottom: 8px;;
}

.formula-fraction::after {
    content: "";
    display: block;
    width: 100%;
    border-bottom: 2px solid #000;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

.formula-equals {
    position: relative;
    top: -5px;
    font-size: 25px;
}

.formula-result {
    font-weight: bold;
    font-size: 22px;
    color: #000;
    position: relative;
    top: -5px;
}

.notic-about-calculation p {
    margin-top: 35px;
    margin-bottom: 0;
    white-space: normal;
    text-align: justify;
}


/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
        .btn-action {
        display: none !important;
    }

    .cgpa-result-box,
    .cgpa-result-box * {
        visibility: visible;
    }

    .cgpa-result-box {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none;
        padding: 0;
    }

    /* Hide all noise */
    nav, header, footer, .site-footer, .site-header, .adsbygoogle,
    .widget, .menu, .sidebar, .btn-submit {
        display: none !important;
    }
}
