<?php
session_start();

if (!isset($_SESSION['student_id'])) {
    header("Location: /rs_lab/student/login.php");
    exit;
}

$name  = $_SESSION['student_name'];
$roll  = $_SESSION['student_id'];
?>
<!DOCTYPE html>
<html>
<head>
    <title>Final Assessment | RS Learning Lab</title>
    <style>
        body{
            margin:0;
            font-family:Arial;
            background:radial-gradient(circle at top,#020617,#0f172a);
            color:#e5e7eb;
        }
        .card{
            width:700px;
            margin:80px auto;
            background:#020617;
            padding:40px;
            border-radius:20px;
            box-shadow:0 0 40px rgba(11,140,159,.35);
        }
        h1{margin-bottom:10px}
        .q{
            margin-top:25px;
        }
        button{
            margin-top:30px;
            padding:14px 30px;
            border:none;
            border-radius:999px;
            background:linear-gradient(135deg,#2563eb,#22c55e);
            color:#020617;
            font-weight:bold;
            cursor:pointer;
        }
    </style>
</head>
<body>

<div class="card">
    <h1>🏁 Final Assessment</h1>
    <p><b>Student:</b> <?= htmlspecialchars($name) ?> (<?= htmlspecialchars($roll) ?>)</p>

    <form method="POST" action="final_submit.php">

        <div class="q">
            <p>1️⃣ What is the output of: <code>print(2 + 3 * 4)</code>?</p>
            <label><input type="radio" name="q1" value="14"> 14</label><br>
            <label><input type="radio" name="q1" value="20"> 20</label>
        </div>

        <div class="q">
            <p>2️⃣ Which keyword is used to define a function in Python?</p>
            <label><input type="radio" name="q2" value="def"> def</label><br>
            <label><input type="radio" name="q2" value="function"> function</label>
        </div>

        <button type="submit">Submit Final Assessment</button>
    </form>
</div>

</body>
</html>