/* ==========================
   RESET & BASE STYLES
========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #f4f7fb;
    color: #333;
}

/* ==========================
   PAGE LAYOUT
========================== */
.compare-page {
    min-height: 100vh;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.compare-container {
    width: 100%;
    max-width: 1100px;
}

/* ==========================
   COMPARISON CARD
========================== */
.compare-card {
    background: #fff;
    border-radius: 18px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.04);
}

.compare-header {
    text-align: center;
    margin-bottom: 40px;
}

.compare-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color:#1A8CFF;
    margin-bottom: 10px;
}

.compare-header p {
    color: #64748b;
    font-size: 1rem;
    max-width: 700px;
    margin: auto;
    line-height: 1.6;
}

/* ==========================
   INPUTS & AUTOCOMPLETE
========================== */
.compare-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 35px;
}

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-wrapper label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
}

.autocomplete-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #d8dee9;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
    background: #fff;
}

.autocomplete-wrapper input:focus {
    border-color: #1A8CFF;
    box-shadow: 0 0 0 4px rgba(26,140,255,0.12);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: 0.2s;
}

.autocomplete-item:hover {
    background: #f5f9ff;
    color: #1A8CFF;
}

.no-result {
    color: #94a3b8;
    padding: 12px 16px;
    cursor: default;
}

/* ==========================
   BUTTONS
========================== */
.predict-button-container {
    display: flex;
    justify-content: center;
}

.btn {
    height: 54px;
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 10px;
    background:#1A8CFF;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,119,255,0.25);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: #f1f5f9;
    color: #333;
    border: 1px solid #dbe2ea;
    height: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #e9eef5;
    box-shadow: none;
    transform: none;
}

/* ==========================
   LOADER ANIMATION
========================== */
.loader-container {
    display: none;
    text-align: center;
    padding: 50px 20px;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 6px solid #e9ecef;
    border-top: 6px solid #1A8CFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================
   THE COMPARISON TABLE GRID
========================== */
.comparison-results {
    display: none;
    margin-top: 40px;
    background: #fff;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.btn-pdf {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 10px;
    background: #1A8CFF;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 119, 255, 0.3);
    touch-action: manipulation;
}

.btn-pdf:hover,
.btn-pdf:focus,
.btn-pdf:active {
    background: #0077ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 140, 255, 0.4);
}

.btn-pdf:focus {
    outline: none;
}

.btn-pdf:active {
    transform: translateY(0);
}

/* Border box outline enclosing the data matrix */
.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #cbd5e1; 
    border-radius: 12px;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

.comparison-table thead {
    background: #0f172a;
    color: #ffffff;
}

.comparison-table th {
    padding: 18px 20px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #334155;
    color: #ffffff;
}

.feature-header {
    background:#1A8CFF;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.college-header {
    background:#1A8CFF;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Grid-line separators between elements */
.comparison-table th:not(:last-child),
.comparison-table td:not(:last-child) {
    border-right: 1px solid #cbd5e1;
}

.comparison-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #cbd5e1;
    text-align: center;
    font-size: 0.95rem;
    color: #1e293b;
    vertical-align: middle;
}

/* Clean bottom borders */
.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Features Category Left Column Highlight */
.comparison-table td.feature-column {
    text-align: left;
    font-weight: 600;
    background: #f8fafc;
    color: #0f172a;
}

/* Zebra alternating rows */
.comparison-table tr:nth-child(even) td:not(.feature-column) {
    background: #fdfefe;
}
.comparison-table tr:nth-child(even) td.feature-column {
    background: #ecf1f6;
}

.comparison-table tr:hover td {
    background: #f0f7ff !important;
}

/* ==========================
   DATA PILL BADGES
========================== */
.table-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* ==========================
   RESPONSIVE DESIGN
========================== */
@media(max-width:768px){
    .compare-card {
        padding: 30px 20px;
    }

    .compare-header h1 {
        font-size: 1.8rem;
    }

    .compare-inputs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .btn {
        max-width: none;
    }

    .comparison-results h2 {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}