/* Global layout */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eef2ff;
    color: #1f2937;
}

a, button, input, select, textarea {
    font-family: inherit;
}

.container {
    max-width: 950px;
    margin: 24px auto;
    padding: 20px;
}

.page {
    max-width: 780px;
    margin: 60px auto;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.card {
    background: #fff;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

h1, h2, h3 {
    margin-top: 0;
}

label {
    display: block;
    margin-top: 14px;
    font-weight: 600;
}

input, textarea, select, button {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin: 8px 0;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

button {
    border: none;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

button:active,
a.button:active {
    transform: scale(0.98);
}

.button {
    background: #2563eb;
}

.button-red { background: #dc2626; }
.button-blue { background: #2563eb; }
.button-yellow { background: #f59e0b; }
.button-green { background: #16a34a; }

.button-small {
    width: auto;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
}

.button-link {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.status {
    margin: 14px 0;
    padding: 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    text-align: center;
}

.message {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #064e3b;
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th, td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

@media (max-width: 680px) {
    .button-grid {
        grid-template-columns: 1fr;
    }
    .page {
        margin: 20px;
    }
    .container {
        margin: 20px;
    }
}

/* Admin specific */
.admin-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-card {
    background: #fafbff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e3e8ff;
}

.room-link {
    color: #1d4ed8;
    text-decoration: none;
}

.button-small {
    width: auto;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 8px;
}

#quiz-card {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#question-panel h2 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 20px;
}

.quiz-button {
    font-size: 20px;
    padding: 30px 20px;
    min-height: 120px;
    border-radius: 16px;
}

@media (max-width: 600px) {
    .quiz-button {
        font-size: 18px;
        padding: 25px 15px;
        min-height: 100px;
    }
}
