:root {
    --primary: #ff3f04;
    --secondary: #3f726e;
    --dark: #101828;
    --muted: #667085;
    --light: #f6f8fb;
    --border: #e7edf3;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, "Noto Sans Bengali", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 63, 4, 0.10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(63, 114, 110, 0.12), transparent 30%),
        var(--light);
    color: var(--dark);
}

.result-page {
    min-height: 100vh;
    padding: 40px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-card {
    width: 100%;
    max-width: 520px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 16px 45px rgba(16, 40, 38, 0.08);
}

.result-wide {
    max-width: 1100px;
}

.result-header {
    text-align: center;
    margin-bottom: 28px;
}

.result-logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.result-header h1,
.report-header h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 900;
    color: var(--dark);
}

.result-header p,
.report-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--dark);
}

.form-group label i {
    color: var(--primary);
}

.form-control {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
    background: #fff;
    transition: 0.25s ease;
}

.form-control:focus {
    border-color: rgba(255, 63, 4, 0.45);
    box-shadow: 0 0 0 4px rgba(255, 63, 4, 0.08);
}

.search-btn,
.back-btn,
.print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    border-radius: 16px;
    padding: 0 20px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    transition: 0.25s ease;
}

.search-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #ff7a45);
    color: #fff;
    font-size: 16px;
}

.search-btn:hover,
.back-btn:hover,
.print-btn:hover {
    transform: translateY(-2px);
}

.back-btn {
    background: var(--secondary);
    color: #fff;
}

.print-btn {
    background: var(--dark);
    color: #fff;
}

.result-alert {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.10);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.18);
    font-weight: 800;
    margin-bottom: 18px;
}

.report-header {
    position: relative;
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.report-header .print-btn {
    position: absolute;
    right: 0;
    top: 0;
}

.student-info-grid,
.summary-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.student-info-grid {
    grid-template-columns: repeat(4, 1fr);
}

.summary-grid {
    grid-template-columns: repeat(4, 1fr);
}

.student-info-grid div,
.summary-grid div {
    background: #fbfcfd;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.student-info-grid span,
.summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.student-info-grid strong,
.summary-grid strong {
    display: block;
    color: var(--dark);
    font-size: 16px;
    font-weight: 900;
}

.summary-grid strong {
    font-size: 24px;
}

.passed {
    color: #16a34a !important;
}

.failed {
    color: #dc2626 !important;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.result-table th {
    background: var(--secondary);
    color: #fff;
    padding: 13px 12px;
    font-size: 13px;
    text-align: left;
}

.result-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
    vertical-align: top;
}

.result-table tbody tr:nth-child(even) {
    background: #fbfcfd;
}

.result-table td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.result-footer {
    margin-top: 24px;
}

@media (max-width: 900px) {
    .student-info-grid,
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-header .print-btn {
        position: static;
        margin-top: 14px;
    }
}

@media (max-width: 576px) {
    .result-page {
        padding: 24px 12px;
    }

    .result-card {
        padding: 24px;
        border-radius: 22px;
    }

    .student-info-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .result-header h1,
    .report-header h1 {
        font-size: 24px;
    }
}

@media print {
    body {
        background: #fff;
    }

    .result-page {
        padding: 0;
        display: block;
    }

    .result-card {
        max-width: 100%;
        border: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .print-btn,
    .back-btn,
    .result-footer {
        display: none !important;
    }

    .result-table th {
        background: #f1f5f9 !important;
        color: #000 !important;
    }
}