/* General Styles */
:root {
    --nfc-navy: #0a2540;
    --nfc-navy-light: #123a5c;
    --nfc-gold: #c9a227;
    --nfc-gold-light: #e8c547;
    --nfc-slate: #5a6b7d;
    --nfc-bg: #eef2f7;
    --nfc-card-shadow: 0 20px 60px rgba(10, 37, 64, 0.12);
}

body {
    background: radial-gradient(circle at top left, rgba(201, 162, 39, 0.16) 0%, transparent 20%),
                radial-gradient(circle at top right, rgba(10, 37, 64, 0.16) 0%, transparent 18%),
                linear-gradient(160deg, #eef5fb 0%, #dbe9f5 45%, #c8d6e4 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--nfc-navy);
}

.result-container {
    max-width: 760px;
    margin: 48px auto;
    padding: 0 16px 32px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: var(--nfc-card-shadow);
    padding: 2rem 2.25rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -24px;
    right: -48px;
    width: 140px;
    height: 140px;
    background: rgba(201, 162, 39, 0.14);
    border-radius: 50%;
}

.hero-card::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: -32px;
    width: 120px;
    height: 120px;
    background: rgba(10, 37, 64, 0.1);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 2.6rem);
    line-height: 1.05;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--nfc-slate);
    max-width: 680px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(10, 37, 64, 0.08);
    color: var(--nfc-navy);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    z-index: 1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-top: 1.75rem;
    z-index: 1;
    position: relative;
}

.feature-box {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eef3f8;
    padding: 1rem 1rem;
    text-align: center;
    color: var(--nfc-navy);
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.05);
}

.feature-box i {
    font-size: 1.25rem;
    color: var(--nfc-gold);
    margin-bottom: 0.65rem;
}

.feature-box strong {
    display: block;
    margin-top: 0.2rem;
    font-weight: 700;
}

/* University Logo */
.university-logo {
    display: inline-block;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    line-height: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.university-logo .institute-logo {
    max-height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
}

.university-logo i {
    font-size: 2.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Search Section */
.search-section .card {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.search-section .card-body {
    padding: 2rem;
}

/* Result Card */
.result-card .result-card-inner {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(10, 37, 64, 0.08);
    box-shadow: var(--nfc-card-shadow);
}

.result-header {
    background: linear-gradient(135deg, var(--nfc-navy) 0%, var(--nfc-navy-light) 100%);
    color: #fff;
    border-bottom: none;
    position: relative;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.header-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nfc-gold), var(--nfc-gold-light), var(--nfc-gold));
}

.result-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.4;
}

.result-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
    letter-spacing: 0.04em;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nfc-slate);
}

/* Student Info */
.student-info {
    background: #f7f9fc;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e4eaf0;
}

.info-grid {
    display: grid;
    gap: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e8edf2;
    gap: 1rem;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item:first-child {
    padding-top: 0;
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nfc-slate);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nfc-navy);
    text-align: right;
    word-break: break-word;
}

/* Score Section */
.score-section {
    margin: 1.5rem 0;
}

.score-display {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e4eaf0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.score-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--nfc-gold);
    border-radius: 0 0 3px 3px;
}

.score-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.score-obtained {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--nfc-navy);
    letter-spacing: -0.02em;
}

.score-divider {
    font-size: 2rem;
    font-weight: 300;
    color: #b0bec9;
    margin: 0 0.1rem;
}

.score-total {
    font-size: 2rem;
    font-weight: 600;
    color: var(--nfc-slate);
}

.score-caption {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nfc-slate);
    margin-bottom: 1.25rem;
}

.score-progress-wrap {
    max-width: 280px;
    height: 8px;
    background: #e4eaf0;
    border-radius: 100px;
    margin: 0 auto 0.75rem;
    overflow: hidden;
}

.score-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--nfc-navy) 0%, var(--nfc-navy-light) 70%, var(--nfc-gold) 100%);
    border-radius: 100px;
    transition: width 0.8s ease;
    min-width: 4px;
}

.score-percentage {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--nfc-navy-light);
    margin-bottom: 0;
}

/* Footer */
.result-footer {
    background: #f7f9fc;
    border-top: 1px solid #e4eaf0;
    font-size: 0.78rem;
    color: var(--nfc-slate);
    letter-spacing: 0.02em;
}

/* Buttons */
.btn-print {
    background: linear-gradient(135deg, var(--nfc-navy) 0%, var(--nfc-navy-light) 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.btn-print:hover {
    background: linear-gradient(135deg, var(--nfc-navy-light) 0%, #1a4d75 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    animation: fadeIn 0.5s ease;
}

/* Print Styles */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html, body {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .result-container {
        margin: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        width: 100% !important;
        min-height: 100vh;
    }

    .result-card {
        animation: none !important;
        min-height: 100vh;
    }
    
    .result-card .result-card-inner {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .result-header {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
        flex-shrink: 0;
    }

    .university-logo .institute-logo {
        max-height: 120px;
    }

    .result-card .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 2.5rem 3rem !important;
    }

    .student-info {
        margin-bottom: 2.5rem !important;
    }

    .score-section {
        margin: 2rem 0 !important;
    }

    .score-display {
        border: 1px solid #ccc !important;
        padding: 2.5rem 2rem !important;
    }

    .score-obtained {
        font-size: 4rem !important;
    }

    .score-total,
    .score-divider {
        font-size: 2.5rem !important;
    }

    .result-footer {
        flex-shrink: 0;
        margin-top: auto;
        padding: 1.25rem !important;
    }
    
    .btn, .no-print {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .result-container {
        padding: 12px;
        margin: 16px auto;
    }
    
    .search-section .card-body {
        padding: 1.5rem;
    }
    
    .score-obtained {
        font-size: 2.75rem;
    }

    .score-total {
        font-size: 1.5rem;
    }

    .score-divider {
        font-size: 1.5rem;
    }

    .info-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .info-value {
        text-align: left;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Form Focus Effects */
.form-control:focus {
    border-color: var(--nfc-navy-light);
    box-shadow: 0 0 0 0.2rem rgba(10, 37, 64, 0.15);
}

/* Button Hover Effects */
.btn-primary {
    background: linear-gradient(135deg, var(--nfc-navy) 0%, var(--nfc-navy-light) 100%);
    border: none;
    color: #fff;
    border-radius: 999px;
    padding: 0.95rem 1.3rem;
    box-shadow: 0 12px 30px rgba(10, 37, 64, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--nfc-navy-light) 0%, #1a4d75 100%);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(10, 37, 64, 0.2);
}

