:root {
    --primary-color: #1a3e72;
    --secondary-color: #f5a623;
    --accent-color: #4a90e2;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.logo {
    height: 60px;
}

h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 600;
}

.subtitle {
    color: var(--dark-color);
    font-size: 16px;
}

.calculator-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.input-section, .results-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex: 1;
}

.input-section {
    max-width: 400px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: var(--accent-color);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

input[type="number"]:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.input-with-default {
    display: flex;
    align-items: center;
}

.input-with-default input {
    flex: 1;
}

.default-value {
    margin-left: 10px;
    display: flex;
    align-items: center;
    color: #666;
}

.total-marks {
    width: 70px;
    margin-left: 5px;
}

.program-selection {
    margin: 25px 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #eee;
    border-radius: 50%;
    transition: var(--transition);
}

.radio-container:hover input ~ .checkmark {
    background-color: #ddd;
}

.radio-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .checkmark:after {
    display: block;
}

.radio-container .checkmark:after {
    top: 7px;
    left: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.calculate-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    background-color: #0d2b56;
    transform: translateY(-2px);
}

.calculate-btn:active {
    transform: translateY(0);
}

.aggregate-result {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.aggregate-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 10px;
}

.merit-prediction {
    margin-bottom: 30px;
}

.merit-range-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.merit-range-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f8f9fa;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
}

.merit-range-value i {
    color: var(--accent-color);
}

.progress-container {
    margin-top: 20px;
    background-color: #f0f2f5;
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #2ecc71);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}


.eligible-programs {
    margin-top: 30px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    position: relative;
    transition: var(--transition);
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 500;
    background-color: #f8f9fa;
}

.tab-btn.active:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-btn .badge {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.program-list {
    max-height: 400px;
    overflow-y: auto;
}

.program-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    transition: var(--transition);
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.program-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.program-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.program-name i {
    color: var(--accent-color);
}

.program-details {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.program-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.program-stats {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.closing-rank {
    color: var(--danger-color);
}

.closing-aggregate {
    color: var(--success-color);
}

.no-programs {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.action-btn:hover {
    background-color: #f8f9fa;
}

.action-btn i {
    font-size: 16px;
}

.reset-btn {
    width: 100%;
    padding: 14px;
    background-color: #0d2b56;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reset-btn:hover {
    background-color: #0d2b56;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.reset-btn:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    margin-top: 30px;
    border-top: 1px solid #eee;
}

.disclaimer {
    font-size: 12px;
    margin-top: 5px;
    color: #999;
}

/* Creator Credit */
footer p:first-of-type {
    font-weight: 500;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.modal input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.modal button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }

    .input-section {
        max-width: 100%;
    }

    .logo-container {
        flex-direction: column;
        text-align: center;
    }

    .program-stats,
    .program-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
    }

    .actions {
        flex-direction: column;
    }

    .aggregate-value {
        font-size: 36px;
    }

    .reset-btn {
        font-size: 14px;
    }

    .tab-btn .badge {
        position: static;
    }

    .modal-content {
        margin-top: 30%;
    }

    .input-with-default {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    }

    .default-value {
    margin-left: 0;
    justify-content: space-between;
    }

    .total-marks {
    width: 100%;
    margin-left: 0;
    }
}

/* Responsive */
/* @media (max-width: 768px) {
    .program-details {
        flex-direction: column;
        gap: 5px;
    }
    
    .program-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .merit-range-value {
        font-size: 20px;
    }
} */