* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Version badge (bottom-left) */
#version-badge {
    position: fixed;
    left: 10px;
    bottom: 10px;
    padding: 6px 10px;
    background: rgba(32,33,36,0.7);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    border-radius: 6px;
    z-index: 1000;
    pointer-events: none;
}

body {
    background-color: #f0f2f5;
    height: 100vh;
    overflow: hidden;
    touch-action: manipulation;
}

/* Allow scrolling on landing, auth, confirm, and unlock screens */
body.allow-scroll {
    overflow: auto;
    height: auto;
}

/* Invert filter applied to the whole game screen during waiting state */
.invert-colors {
    filter: invert(1) hue-rotate(180deg);
}

.container {
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.screen {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    text-align: center;
}

/* Decorative collage background for the configuration screen */
#config-screen {
    overflow: hidden;
    padding: 20px;
}

#config-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('collage-time.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

/* Ensure foreground content sits above the decorative background */
#config-screen > * {
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}

/* Treat \n characters in textContent as line breaks */
.nl-preline {
    white-space: pre-line;
}

h1 {
    color: #1a73e8;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

h2 {
    color: #202124;
    margin-bottom: 30px;
    font-size: 1.8rem;
    line-height: 1.4;
}

button {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    background-color: #1557b0;
}

#players-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* children will enable */
}

#waiting-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #202124;
    background: rgba(255,255,255,0.85);
    padding: 20px 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 5;
}

.player {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 0;
    margin: 0;
    padding: 8px;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.player-button {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background-color: #e8f0fe;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #1a73e8;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, background-color 0.2s;
}

.player-button:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.player-button.active {
    transform: scale(0.95);
    filter: brightness(0.9);
    outline: 6px solid #ff9800;
    outline-offset: 4px;
}

.hold-feedback {
    font-size: 0.9rem;
    margin-top: 10px;
    color: #5f6368;
}

.score {
    font-size: 1.2rem;
    color: #5f6368;
    margin-top: 15px;
}

/* Center container */
#center-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 720px;
}

#timer {
    font-size: 3rem;
    font-weight: bold;
    color: #1a73e8;
    margin: 20px 0;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#result {
    margin-top: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#result-text {
    margin-bottom: 20px;
    color: #202124;
    font-size: 1.3rem;
}

#result-table-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0 16px;
}

#result-table {
    border-collapse: collapse;
    font-size: 0.95rem;
    color: #202124;
    min-width: 320px;
}

#result-table th,
#result-table td {
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 10px;
    text-align: left;
}

#result-table th {
    font-weight: 700;
    color: #5f6368;
}

#result-table tr:last-child td {
    border-bottom: none;
}

.instructions {
    margin-top: 30px;
    text-align: left;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    color: #1a73e8;
    margin-bottom: 10px;
}

.instructions p {
    margin: 8px 0;
    color: #5f6368;
}

/* Config screen */
.config {
    margin: 20px auto 0;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 520px;
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.config-row label {
    font-weight: 600;
    color: #202124;
}

.config-row select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
}

.player-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-color-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
    outline: 3px solid;
    outline-offset: 2px;
}

.names-grid input[type="text"] {
    padding: 10px 12px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
}

/* ── Landing Page ───────────────────────────────────── */

#landing-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    height: auto;
    padding: 0;
}

.landing-hero {
    width: 100%;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 50%, #1565c0 100%);
    color: #fff;
    padding: 60px 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

.landing-hero h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 12px;
    position: relative;
}

.landing-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    position: relative;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.landing-tagline {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 28px;
    position: relative;
}

.landing-cta {
    background: #fff;
    color: #1a73e8;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 16px 48px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.landing-cta:active {
    transform: scale(0.97);
    background: #e8f0fe;
}

.landing-content {
    max-width: 720px;
    width: 100%;
    padding: 0 20px 40px;
}

.landing-section {
    margin-top: 40px;
}

.landing-section-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.landing-section h2 {
    color: #1a73e8;
    font-size: 1.6rem;
    margin-bottom: 20px;
}

/* How it works steps */
.landing-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.landing-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #1a73e8;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-text strong {
    color: #202124;
    font-size: 1.05rem;
}

.step-text span {
    color: #5f6368;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Getting started info cards */
.landing-info-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: left;
    border-left: 4px solid #1a73e8;
}

.info-card h3 {
    color: #202124;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.info-card p {
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Features grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-item {
    background: #fff;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.95rem;
    font-weight: 600;
    color: #202124;
    text-align: center;
}

.landing-bottom-cta {
    margin-top: 40px;
    padding-bottom: 20px;
    text-align: center;
}

/* ── Auth Screen ─────────────────────────────────────── */

#auth-screen,
#unlock-screen,
#confirm-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.auth-header {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #e8f0fe;
    border: 2px solid #1a73e8;
    color: #1a73e8;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:active {
    background: #c5dafa;
    transform: translateY(-50%) scale(0.93);
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: #5f6368;
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-card {
    margin: 20px auto 0;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin: 0;
    border-radius: 0;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    padding: 12px 14px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    border-color: #1a73e8;
}

.auth-form button {
    margin: 4px 0 0;
}

.auth-error {
    background: #fce8e6;
    color: #c5221f;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.auth-success {
    background: #e6f4ea;
    color: #137333;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* ── Email Confirmation Screen ───────────────────────── */

.confirm-container {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.confirm-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.confirm-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 28px 24px;
    margin-top: 20px;
    text-align: center;
}

.confirm-lead {
    font-size: 1.1rem;
    color: #202124;
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 24px;
}

.confirm-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

.confirm-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #1a73e8;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.confirm-step span {
    color: #202124;
    font-size: 0.95rem;
    line-height: 1.4;
}

.confirm-note {
    background: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
}

.confirm-note strong {
    color: #202124;
}

.confirm-note em {
    color: #1a73e8;
    font-style: normal;
    font-weight: 500;
}

/* ── Unlock Screen ────────────────────────────────────── */

.unlock-container {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.unlock-lead {
    font-size: 1.1rem;
    color: #202124;
    margin-bottom: 8px;
}

.unlock-info {
    font-size: 0.95rem;
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 20px;
}

.unlock-help {
    font-size: 0.85rem;
    color: #5f6368;
    margin-top: 16px;
    line-height: 1.4;
}

/* ── User Badge (top-right) ──────────────────────────── */

#user-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: rgba(32,33,36,0.85);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    border-radius: 6px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

#user-badge.hidden {
    display: none !important;
}

#settings-btn,
#logout-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    margin: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
    border-radius: 4px;
}

#settings-btn:hover,
#settings-btn:active,
#logout-btn:hover,
#logout-btn:active {
    opacity: 1;
    background: rgba(255,255,255,0.15);
}

#settings-btn {
    font-size: 15px;
}

/* ── Account Settings Screen ─────────────────────────── */

#account-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

.account-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.account-container h1 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.account-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px 24px;
    margin-bottom: 16px;
    text-align: left;
}

.account-section h2 {
    font-size: 1.15rem;
    margin: 0 0 6px 0;
    color: #202124;
}

.account-section-desc {
    font-size: 0.9rem;
    color: #5f6368;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.account-info-row:last-child {
    border-bottom: none;
}

.account-label {
    font-weight: 600;
    color: #5f6368;
    font-size: 0.9rem;
}

.account-value {
    color: #202124;
    font-size: 0.9rem;
    text-align: right;
    word-break: break-all;
}

.account-inline-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.account-inline-form input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.account-inline-form input:focus {
    border-color: #1a73e8;
}

.account-inline-form button {
    padding: 10px 20px;
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.account-action-btn {
    width: 100%;
    padding: 12px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0;
}

.account-action-btn:active {
    background: #1557b0;
}

.account-action-btn:disabled {
    background: #94bff8;
    cursor: default;
}

.account-success {
    background: #e6f4ea;
    color: #137333;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
}

.account-success.hidden {
    display: none;
}

/* ── Custom Questions Screen ──────────────────────────── */

#questions-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

.questions-header {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 16px;
}

.questions-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.questions-loading {
    color: #5f6368;
    font-size: 1.1rem;
    margin-top: 40px;
}

.qset-actions-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 600px;
    justify-content: center;
}

.btn-secondary {
    background: #fff;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    font-weight: 600;
}

.btn-secondary:active {
    background: #e8f0fe;
}

.btn-danger {
    background: #c5221f;
    color: #fff;
    border: none;
}

.btn-danger:active {
    background: #a11b18;
}

.delete-btn {
    background: none;
    color: #c5221f;
    border: none;
    font-size: 1.2rem;
    padding: 4px 8px;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.delete-btn:active {
    background: rgba(197,34,31,0.1);
}

.qset-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.qset-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: default;
}

.qset-card-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.qset-card-name {
    font-weight: 700;
    color: #202124;
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qset-card-meta {
    color: #5f6368;
    font-size: 0.85rem;
    margin-top: 2px;
}

.qset-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.qset-edit-btn {
    background: none;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    font-size: 0.85rem;
    padding: 6px 14px;
    margin: 0;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.qset-edit-btn:active {
    background: #e8f0fe;
}

.qset-empty-state {
    background: #fff;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: #5f6368;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.qset-empty-state p {
    margin: 4px 0;
    line-height: 1.5;
}

/* Question items inside set editor */
.question-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 8px;
}

.question-item-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.question-item-text {
    flex: 1;
    min-width: 0;
    color: #202124;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-item-answer {
    flex-shrink: 0;
    background: #1a73e8;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 36px;
    text-align: center;
}

.question-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.qi-edit-btn {
    background: none;
    color: #1a73e8;
    border: none;
    font-size: 0.8rem;
    padding: 4px 8px;
    margin: 0;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

.qi-edit-btn:active {
    background: #e8f0fe;
}

.qi-delete-btn {
    font-size: 1rem;
}

.qi-promote-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #1a73e8;
}

.admin-section {
    border-top: 2px solid #e8eaed;
}

.admin-code-display {
    background: #e8f0fe;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.admin-code-display button {
    font-size: 0.8rem;
    padding: 6px 12px;
    margin: 0;
    white-space: nowrap;
}

.set-editor-meta {
    color: #5f6368;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.set-editor-add {
    margin-bottom: 16px;
}

/* Share code display */
.share-section {
    text-align: center;
}

.share-code-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #1a73e8;
    background: #e8f0fe;
    padding: 14px 24px;
    border-radius: 10px;
    margin-bottom: 8px;
    text-align: center;
}

/* Question set message toast */
.qset-message {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.qset-message-error {
    background: #fce8e6;
    color: #c5221f;
}

.qset-message-success {
    background: #e6f4ea;
    color: #137333;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 1024px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .player {
        padding: 8px;
    }

    .player-button {
        width: 110px;
        height: 110px;
        font-size: 1rem;
    }

    .landing-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .landing-hero {
        padding: 40px 16px 36px;
    }

    .landing-hero h1 {
        font-size: 2rem;
    }

    .landing-icon {
        font-size: 3rem;
    }

    .landing-tagline {
        font-size: 1.1rem;
    }

    .landing-cta {
        font-size: 1.1rem;
        padding: 14px 36px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .auth-header h1 {
        font-size: 1.6rem;
    }

    .back-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .questions-header h1 {
        font-size: 1.5rem;
    }

    .qset-card {
        padding: 12px 14px;
    }

    .question-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .question-item-text {
        font-size: 0.85rem;
    }

    .share-code-display {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }

    .account-container h1 {
        font-size: 1.5rem;
    }

    .account-section {
        padding: 16px 18px;
    }

    .account-inline-form {
        flex-direction: column;
    }
}
