/* Import Google Font: Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- General Theme & Body --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f4f8;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-size: 16px;
}

/* --- Container / Card Styling --- */
.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    transition: transform 0.3s ease;
}

h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    color: #004a99;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 30px;
}

p {
    line-height: 1.7;
    color: #555;
}

hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 30px 0;
}

/* --- Form & Input Styling --- */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #343a40;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box; /* Important for padding */
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
    outline: none;
}

/* --- Button Styling --- */
.btn {
    display: block;
    width: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-submit {
    background: linear-gradient(90deg, #28a745, #218838);
}
.btn-submit:hover {
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* --- Quiz Question Styling --- */
.soalan-block {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}
.soalan-teks {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 20px;
}
.pilihan-label {
    display: block;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}
.pilihan-label:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}
.pilihan-label input[type="radio"] {
    display: none; /* Hide the default radio button */
}
.pilihan-teks {
    font-size: 16px;
}
/* Style for selected answer */
input[type="radio"]:checked + .pilihan-teks {
    font-weight: 600;
    color: #007bff;
}
input[type="radio"]:checked + .pilihan-teks::before {
    content: '✔ ';
    font-weight: bold;
}

/* --- Result Page Styling --- */
.header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.skor {
    font-size: 3em;
    font-weight: 700;
    color: #0056b3;
    margin: 10px 0;
}
.soalan-review {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.status-betul {
    color: #28a745;
    font-weight: 600;
}
.status-salah {
    color: #dc3545;
    font-weight: 600;
}
.jawapan-betul {
    font-weight: 600;
    color: #28a745;
}
.maklum-balas {
    background-color: #e6f7ff;
    border-left: 5px solid #007bff;
    padding: 15px;
    margin-top: 15px;
    color: #004085;
    border-radius: 0 8px 8px 0;
}

/* --- Admin Page --- */
.login-container { max-width: 450px; text-align: center; }
.results-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.results-table th, .results-table td { border: 1px solid #dee2e6; padding: 12px 15px; text-align: left; }
.results-table th { background-color: #0056b3; color: white; font-weight: 600; }
.results-table tr:nth-child(even) { background-color: #f8f9fa; }
.logout-link { display: inline-block; margin-bottom: 20px; color: #dc3545; text-decoration: none; font-weight: 500;}

/* --- Admin Dashboard Styling --- */
.dashboard-menu {
    margin-top: 40px;
}
.menu-btn {
    width: 80%;
    margin: 10px auto;
    padding: 20px;
    font-size: 20px;
}
.back-link {
    display: inline-block;
    margin-bottom: 25px;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}
.back-link:hover {
    text-decoration: underline;
}

.logout-link {
    font-size: 14px;
    text-decoration: none;
    color: #dc3545;
    font-weight: 500;
}
