/* =========================
   RESET + BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #e3f2fd, #ffffff);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

/* =========================
   CONTAINER
========================= */
.container,
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.box,
.login-box {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-align: center;
}

/* =========================
   HEADINGS
========================= */
h1, h2 {
    margin-bottom: 15px;
    color: #1976d2;
}

p {
    margin-bottom: 10px;
}

/* =========================
   BUTTONS
========================= */
.btn,
button {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-student {
    background: #4caf50;
    color: #fff;
}

.btn-teacher {
    background: #ff9800;
    color: #fff;
}

.btn-submit {
    background: #1976d2;
    color: #fff;
}

.btn:hover,
button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* =========================
   FORM INPUTS
========================= */
input,
select {
    width: 100%;
    padding: 11px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #1976d2;
}

/* =========================
   LOGIN ERROR
========================= */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* =========================
   EXAM PAGE
========================= */
form p {
    font-weight: 600;
    margin: 15px 0 8px;
    text-align: left;
}

label {
    display: block;
    text-align: left;
    padding: 8px;
    margin-bottom: 5px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
}

label:hover {
    background: #e3f2fd;
}

/* =========================
   TIMER
========================= */
#timer {
    background: #d32f2f;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
}

/* =========================
   DASHBOARD LIST
========================= */
.list {
    text-align: left;
}

.list a {
    display: block;
    padding: 10px;
    background: #f1f1f1;
    margin-bottom: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
}

.list a:hover {
    background: #e3f2fd;
}

/* =========================
   RANKING
========================= */
.rank {
    text-align: left;
    margin-top: 15px;
}

.rank div {
    padding: 10px;
    border-radius: 8px;
    background: #f5f5f5;
    margin-bottom: 6px;
    font-weight: 600;
}

.rank div:nth-child(1) {
    background: #ffd700;
}

.rank div:nth-child(2) {
    background: #c0c0c0;
}

.rank div:nth-child(3) {
    background: #cd7f32;
}

/* =========================
   MOBILE
========================= */
@media(max-width: 480px) {
    .box,
    .login-box {
        padding: 20px;
    }
}
