/* =====================
   GLOBAL (STUDENT)
===================== */

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* =====================
   CONTAINER (LOGIN + QUIZ)
===================== */

.container {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 30px 28px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    text-align: center;
    animation: fadeIn 0.6s ease;
}

.container h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.container h3 {
    margin: 18px 0;
    color: #444;
}

/* =====================
   LABELS
===================== */

.container label {
    display: block;
    text-align: left;
    margin: 12px 0 4px;
    font-size: 14px;
    color: #555;
}

/* =====================
   INPUTS / SELECT
===================== */

input,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: 0.3s;
}

input:focus,
select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
    outline: none;
}

/* =====================
   BUTTON
===================== */

button {
    margin-top: 18px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
    opacity: 0.95;
}

/* =====================
   MESSAGE
===================== */

#msg {
    margin-top: 10px;
    font-size: 14px;
    color: red;
}

/* =====================
   QUIZ OPTIONS
===================== */

.option {
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: #f1f1f1;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
    font-size: 14px;
}

.option:hover {
    background: #dfe3ff;
}

/* =====================
   PREMIUM CERTIFICATE
===================== */

.certificate {
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
    padding: 50px;
    background: #ffffff;
    border: 10px double #2e7d32;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.certificate::before {
    content: "CERTIFIED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 90px;
    color: rgba(0, 128, 0, 0.08);
    font-weight: bold;
    pointer-events: none;
}

.cert-title {
    font-size: 36px;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 10px;
}

.cert-subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    color: #555;
}

.cert-name {
    font-size: 32px;
    font-weight: bold;
    color: #000;
    margin: 15px 0;
    text-decoration: underline;
}

.cert-details {
    font-size: 16px;
    margin-top: 20px;
    line-height: 1.8;
}

.cert-id {
    margin-top: 25px;
    font-size: 14px;
    color: #444;
}

/* =====================
   CERT FOOTER
===================== */

.cert-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.cert-sign {
    text-align: center;
    width: 40%;
}

.cert-sign hr {
    border: none;
    border-top: 1px solid #333;
    margin-bottom: 5px;
}

/* =====================
   ANIMATION
===================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 480px) {
    .container {
        padding: 24px 20px;
    }

    .container h2 {
        font-size: 22px;
    }

    .certificate {
        padding: 25px;
        margin: 20px;
    }

    .cert-footer {
        flex-direction: column;
        gap: 30px;
    }

    .cert-sign {
        width: 100%;
    }
}

/* =====================
   PRINT (CERTIFICATE)
===================== */

@media print {
    body {
        background: #fff;
    }

    button {
        display: none;
    }

    .certificate {
        margin: 0;
        box-shadow: none;
    }
}
