* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f6f7fb;
    color: #222
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px
}

.nav {
    background: #1f2937;
    color: #fff
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.brand {
    font-weight: 700;
    padding: 10px 0
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 12px
}

.user {
    opacity: .9
}

.footer {
    padding: 16px;
    text-align: center;
    color: #666
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06)
}

h1,
h2,
h3 {
    margin: 0 0 12px
}

form {
    display: grid;
    gap: 12px
}

label {
    font-weight: 600
}

input[type=text],
input[type=password],
input[type=number],
input[type=file] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    background: #fff
}

button,
.button {
    border: none;
    background: #111827;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block
}

button[disabled] {
    opacity: .5;
    cursor: not-allowed
}

button.primary {
    background: #2563eb
}

.flash {
    margin-bottom: 8px
}

.flash-item {
    background: #fde68a;
    color: #7c2d12;
    padding: 8px 10px;
    border-radius: 6px;
    margin: 6px 0
}

.q-header {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.question {
    font-size: 1.1rem;
    margin: 12px 0
}

.q-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 6px;
    background: #fff
}

.options {
    display: grid;
    gap: 10px
}

.option {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px
}

.opt-key {
    font-weight: 700;
    min-width: 22px
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

.table {
    width: 100%;
    border-collapse: collapse
}

.table th,
.table td {
    border-bottom: 1px solid #eee;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top
}

.score {
    font-size: 1.2rem
}

.timer {
    font-weight: 700;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.row .col {
    flex: 1 1 300px
}