:root {
    --primary-color: #0B2447;
    --secondary-color: #19376D;
    --newCol: #4cc789;
    --accent-color: #576CBC;
    --background-color: #A5D7E8;
    --text-color: #4A4A4A;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, .fee-calc-sec, footer {
    position: relative;
    z-index: 1;
}

header {
    background-color: var(--primary-color);
    padding: 1.5rem 1rem;
    color: var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
    text-align: center;
    font-size: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.footer-info {
    opacity: 0.9;
}

.fee-calc-sec {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.credit-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.credit-inputs input,
.credit-inputs select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.credit-inputs input:focus,
.credit-inputs select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(87, 108, 188, 0.25);
}

.fee-section-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.fee-section-rowContent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.waiver-container,
.scholarship-section,
.late-reg-container {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.section-header i {
    font-size: 1.8rem;
}

.radio-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
}

input[type="radio"] {
    display: none;
}

.radio-custom {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

input[type="radio"]:checked + .radio-custom {
    background-color: var(--accent-color);
    color: var(--white);
}

.calculate-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    margin: 2.5rem auto 0;
    width: 100%;
    max-width: 300px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(11, 36, 71, 0.2);
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(11, 36, 71, 0.3);
}

.calculate-btn i {
    margin-right: 0.5rem;
}

#rslt-container {
    margin-top: 3rem;
}

.rslt-header {
    text-align: center;
    color: var(--primary-color);
    margin: 2.5rem 0 1.5rem;
    font-size: 1.5rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.results-table tr {
    border-bottom: 1px solid #eee;
}

.results-table tr:last-child {
    border-bottom: none;
}

.results-table td {
    padding: 1rem 1.5rem;
}

.results-table td:first-child {
    font-weight: bold;
    color: var(--newCol);
}

.results-table td:last-child {
    text-align: right;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

.total-row {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: bold;
}

.total-row td {
    padding: 1.2rem 1.5rem;
}

.deduction-row {
    color: #e74c3c;
}

.deduction-row td:last-child {
    color: #e74c3c;
}

.installment-table {
    margin-top: 2rem;
}

.installment-table thead {
    background-color: var(--secondary-color);
}

.installment-table th {
    color: var(--white);
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-table tbody tr {
    opacity: 0;
    animation: slideUpIn 0.5s ease-out forwards;
}

@media (max-width: 768px) {
    .fee-calc-sec {
        padding: 1rem;
        margin: 1rem;
    }
    .fee-section-rowContent {
        grid-template-columns: 1fr;
    }
    .credit-inputs {
        gap: 1rem;
    }
    .calculate-btn {
        max-width: 100%;
    }
    .results-table td,
    .installment-table th {
        padding: 0.8rem 1rem;
    }
}