/* ============================================================
   QUIZ COLLABORATIF - Styles
   ============================================================ */

/* Container */
.qlb-collab-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
   ENTRY CARDS (Créer / Rejoindre)
   ============================================================ */
.qlb-collab-entry-view {
    padding: 20px 0;
}

.qlb-entry-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

.qlb-entry-cards-single {
    justify-content: center;
}

.qlb-entry-cards-single .qlb-entry-card {
    max-width: 420px;
}

.qlb-entry-card {
    flex: 1;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e8e8ee;
    border-radius: 16px;
    padding: 36px 32px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.qlb-entry-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

/* Icons */
.qlb-entry-card-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.qlb-icon-create {
    color: #1a1a2e;
    font-weight: 900;
    font-size: 44px;
}

/* Titles */
.qlb-entry-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px 0;
}

.qlb-entry-card-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0 0 28px 0;
}

/* Body */
.qlb-entry-card-body {
    text-align: left;
}

/* Labels */
.qlb-entry-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    margin-top: 16px;
}

.qlb-entry-label:first-child {
    margin-top: 0;
}

/* Inputs */
.qlb-entry-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}

.qlb-entry-input:focus {
    border-color: #667eea;
    background: #fff;
}

.qlb-entry-input-code {
    text-transform: uppercase;
    text-align: center;
    font-size: 22px;
    letter-spacing: 8px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #555;
    padding: 14px;
}

.qlb-entry-input-code::placeholder {
    letter-spacing: 6px;
    font-weight: 400;
    color: #bbb;
    font-size: 18px;
}

/* Quiz info block (create card) */
.qlb-entry-quiz-info {
    background: #f8f8fc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qlb-entry-quiz-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 600;
}

.qlb-entry-quiz-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Buttons */
.qlb-entry-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qlb-entry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qlb-entry-btn-create {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.qlb-entry-btn-create:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.qlb-entry-btn-join {
    background: #27ae60;
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.qlb-entry-btn-join:hover:not(:disabled) {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Error message */
.qlb-entry-error {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 700px) {
    .qlb-entry-cards {
        flex-direction: column;
        align-items: center;
    }
    .qlb-entry-card {
        max-width: 100%;
        width: 100%;
    }
}

/* ============================================================
   LIVE VIEW BUTTONS
   ============================================================ */
.qlb-collab-btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.qlb-collab-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qlb-collab-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.qlb-collab-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.qlb-collab-btn-secondary {
    background: #f0f0f5;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qlb-collab-btn-secondary:hover:not(:disabled) {
    background: #e4e4ec;
}

/* ============================================================
   LOBBY
   ============================================================ */
.qlb-lobby {
    text-align: center;
    padding: 20px;
}

.qlb-lobby-header h2 {
    font-size: 26px;
    color: #1a1a2e;
    margin: 0 0 20px 0;
}

.qlb-lobby-code-section {
    background: #f8f8fc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: inline-block;
}

.qlb-lobby-code-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.qlb-lobby-code {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.qlb-lobby-code-copyable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.qlb-lobby-code-copyable:hover {
    opacity: 0.7;
}

.qlb-lobby-code-copy-hint {
    font-size: 18px;
    margin-left: 6px;
    color: #667eea;
}

.qlb-lobby-code span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 60px;
    background: white;
    border: 2px solid #e0e0e5;
    border-radius: 10px;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    font-family: 'Courier New', monospace;
}

.qlb-lobby-qr {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.qlb-lobby-qr svg {
    width: 180px;
    height: 180px;
}

.qlb-qr-clickable {
    cursor: pointer;
    transition: transform 0.2s;
}

.qlb-qr-clickable:hover {
    transform: scale(1.05);
}

/* QR Fullscreen overlay */
.qlb-qr-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    cursor: pointer;
    animation: qlb-fade-in 0.2s ease;
}

@keyframes qlb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qlb-qr-fullscreen-inner {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.qlb-qr-fullscreen-inner svg {
    width: 70vmin;
    height: 70vmin;
    max-width: 500px;
    max-height: 500px;
}

.qlb-lobby-join-url {
    font-size: 12px;
    color: #999;
    word-break: break-all;
    max-width: 300px;
    margin: 0 auto;
}

.qlb-lobby-waiting-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: qlb-pulse 2s ease-in-out infinite;
}

@keyframes qlb-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Player bubbles */
.qlb-lobby-players {
    margin: 24px 0;
}

.qlb-lobby-players h3 {
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
}

.qlb-player-bubbles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.qlb-player-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 16px;
    color: white;
    min-width: 70px;
    animation: qlb-pop-in 0.3s ease-out;
}

@keyframes qlb-pop-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.qlb-player-bubble-initial {
    font-size: 24px;
    font-weight: 700;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qlb-player-bubble-name {
    font-size: 13px;
    font-weight: 600;
}

.qlb-player-bubble-me {
    font-size: 10px;
    background: rgba(255,255,255,0.3);
    padding: 1px 8px;
    border-radius: 10px;
}

.qlb-waiting-text {
    color: #999;
    font-style: italic;
    margin-top: 20px;
}

/* ============================================================
   QUESTION VIEW
   ============================================================ */
.qlb-question-view {
    padding: 20px;
}

.qlb-progress {
    height: 6px;
    background: #e8e8f0;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.qlb-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.qlb-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.qlb-question-number {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

.qlb-instruction {
    background: #fff3cd;
    color: #856404;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.qlb-question-text {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* ============================================================
   SESSION CODE BAR (admin, during game)
   ============================================================ */
.qlb-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    margin-bottom: 16px;
    background: #f8f8fc;
    border: 1px solid #e8e8f0;
    border-radius: 10px;
}

.qlb-session-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.qlb-session-bar-left:hover {
    opacity: 0.7;
}

.qlb-session-bar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
}

.qlb-session-bar-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 4px;
}

.qlb-session-bar-copy {
    font-size: 14px;
    color: #667eea;
    min-width: 55px;
    text-align: right;
}

.qlb-close-session {
    padding: 6px 14px;
    border: 1px solid #e0e0e5;
    border-radius: 8px;
    background: white;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.qlb-close-session:hover {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff5f5;
}

.qlb-collab-btn-danger {
    background: white;
    color: #999;
    border: 1px solid #e0e0e5;
    box-shadow: none;
    font-size: 14px;
}

.qlb-collab-btn-danger:hover:not(:disabled) {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff5f5;
}

/* ============================================================
   PLAYER TRACKER (visible par tous)
   ============================================================ */
.qlb-player-tracker {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8f8fc;
    border: 1px solid #e8e8f0;
    border-radius: 12px;
}

.qlb-tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.qlb-tracker-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
}

.qlb-tracker-count {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    background: #eef0ff;
    padding: 2px 10px;
    border-radius: 20px;
}

.qlb-tracker-count-done {
    color: #27ae60;
    background: #eafaf1;
}

.qlb-tracker-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qlb-tracker-player {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 5px;
    border-radius: 20px;
    background: white;
    border: 1px solid #e8e8f0;
    transition: all 0.3s;
}

.qlb-tracker-waiting {
    opacity: 0.4;
}

.qlb-tracker-answered {
    opacity: 1;
    border-color: #c8d6e5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.qlb-tracker-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.qlb-tracker-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.qlb-tracker-check {
    font-size: 12px;
    color: #27ae60;
    font-weight: 700;
}

/* Answer cards */
.qlb-answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.qlb-answer-card {
    padding: 16px 20px;
    border: 2px solid #e8e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: white;
}

.qlb-answer-card:hover:not(.qlb-answered-disabled):not(.qlb-answer-revealed):not(.qlb-answer-revealed-players) {
    border-color: #667eea;
    background: #f8f8ff;
}

.qlb-answer-card.qlb-selected {
    border-color: #667eea;
    background: #eef0ff;
}

.qlb-answer-card.qlb-answered-disabled {
    cursor: default;
    opacity: 0.7;
}

.qlb-answer-card.qlb-my-choice {
    border-color: #667eea !important;
    border-width: 3px;
    opacity: 1 !important;
}

.qlb-checkbox {
    font-size: 20px;
    flex-shrink: 0;
}

.qlb-answer-text {
    flex: 1;
    font-size: 16px;
    color: #333;
}

.qlb-answer-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Answer with player circles */
.qlb-answer-revealed-players,
.qlb-answer-revealed {
    cursor: default;
}

.qlb-answer-revealed.qlb-correct {
    border-color: #27ae60;
    background: #f0fff4;
}

.qlb-answer-revealed.qlb-incorrect {
    border-color: #e0e0e5;
    background: #fafafa;
}

.qlb-answer-revealed.qlb-incorrect.qlb-my-choice {
    border-color: #e74c3c !important;
    background: #fff5f5;
}

/* Player circles next to answers */
.qlb-answer-players {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.qlb-answer-count {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 32px;
    text-align: center;
}

.qlb-answer-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-width: 240px;
}

.qlb-player-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qlb-player-circle-more {
    background: #6b7280 !important;
    font-size: 11px;
}

.qlb-player-circle-lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.qlb-player-circle-name {
    font-size: 12px;
    color: #666;
    margin-right: 6px;
}

/* Explanation */
.qlb-explanation {
    padding: 14px 18px;
    background: #e8f4fc;
    border: 1px solid #b8daef;
    border-radius: 10px;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Waiting spinner */
.qlb-waiting-others {
    text-align: center;
    padding: 24px;
    color: #888;
}

.qlb-waiting-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e8e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: qlb-spin 0.8s linear infinite;
}

@keyframes qlb-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   ADMIN CONTROLS
   ============================================================ */
.qlb-admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ============================================================
   SCORES
   ============================================================ */
.qlb-scores-view {
    padding: 20px;
    text-align: center;
}

.qlb-scores-title {
    font-size: 24px;
    color: #1a1a2e;
    margin: 0 0 24px 0;
}

.qlb-scores-list {
    max-width: 500px;
    margin: 0 auto 24px;
}

.qlb-score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 6px;
    background: #f8f8fc;
    transition: all 0.3s;
}

.qlb-score-row.qlb-score-me {
    background: #eef0ff;
    border: 2px solid #667eea;
}

.qlb-score-rank {
    font-size: 20px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.qlb-score-player {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.qlb-score-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.qlb-score-value {
    font-weight: 700;
    font-size: 16px;
    color: #667eea;
}

/* ============================================================
   FINISHED / PODIUM
   ============================================================ */
.qlb-finished-view {
    padding: 20px;
    text-align: center;
}

.qlb-finished-hero {
    margin-bottom: 30px;
}

.qlb-finished-icon {
    font-size: 60px;
    margin-bottom: 10px;
    animation: qlb-bounce 0.6s ease-out;
}

@keyframes qlb-bounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.qlb-finished-hero h2 {
    font-size: 28px;
    color: #1a1a2e;
    margin: 0;
}

.qlb-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 30px;
    min-height: 200px;
}

.qlb-podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border-radius: 16px;
    background: #f8f8fc;
    min-width: 100px;
}

.qlb-podium-1 {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3c4 100%);
    border: 2px solid #ffd700;
    order: 2;
    padding-bottom: 30px;
}

.qlb-podium-2 {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px solid #c0c0c0;
    order: 1;
}

.qlb-podium-3 {
    background: linear-gradient(135deg, #fef0e5 0%, #fde4cc 100%);
    border: 2px solid #cd7f32;
    order: 3;
}

.qlb-podium-medal {
    font-size: 32px;
}

.qlb-podium-name {
    font-weight: 700;
    color: #333;
    font-size: 15px;
}

.qlb-podium-score {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.qlb-scores-rest {
    margin-top: 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .qlb-entry-card-title {
        font-size: 19px;
    }

    .qlb-lobby-code span {
        width: 42px;
        height: 50px;
        font-size: 22px;
    }

    .qlb-question-text {
        font-size: 17px;
    }

    .qlb-answer-card {
        padding: 12px 14px;
    }

    .qlb-answer-text {
        font-size: 14px;
    }

    .qlb-podium {
        gap: 6px;
    }

    .qlb-podium-place {
        min-width: 80px;
        padding: 14px 10px;
    }

    .qlb-admin-controls {
        flex-direction: column;
    }

    .qlb-admin-controls .qlb-collab-btn {
        width: 100%;
    }

    .qlb-player-circle-name {
        display: none;
    }

    .qlb-tracker-name {
        display: none;
    }

    .qlb-tracker-player {
        padding: 4px;
    }
}

/* =====================================================
   ADHOC (Quiz perso depuis fichier)
   ===================================================== */

/* Carte spéciale dans le hub */
.quiz-hub-item-adhoc {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
}
.quiz-hub-item-adhoc:hover {
    border-color: #4f46e5 !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25) !important;
}
.quiz-hub-item-image-adhoc {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.quiz-hub-item-image-adhoc span {
    color: white;
}

/* Modal overlay */
.qlb-adhoc-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: qlb-fade-in 0.2s ease;
}
.qlb-adhoc-modal-inner {
    background: white;
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.qlb-adhoc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
.qlb-adhoc-modal-close:hover {
    background: #e5e7eb;
    color: #111;
}

/* Container */
.qlb-adhoc-container {
    max-width: 100%;
}
.qlb-adhoc-header {
    text-align: center;
    margin-bottom: 24px;
}
.qlb-adhoc-header h2 {
    font-size: 24px;
    margin: 0 0 8px 0;
    color: #1a1a2e;
}
.qlb-adhoc-header p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

/* Template box */
.qlb-adhoc-template-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fef3c7;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #fde68a;
}
.qlb-adhoc-template-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.qlb-adhoc-template-text {
    flex: 1;
}
.qlb-adhoc-template-text strong {
    display: block;
    color: #92400e;
    font-size: 14px;
}
.qlb-adhoc-template-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #78716c;
}

/* Dropzone */
.qlb-adhoc-dropzone {
    border: 3px dashed #c7d2fe;
    border-radius: 16px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbff;
}
.qlb-adhoc-dropzone:hover,
.qlb-adhoc-dropzone.qlb-adhoc-dragover {
    border-color: #667eea;
    background: #eef2ff;
    transform: scale(1.01);
}
.qlb-adhoc-dropzone-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.qlb-adhoc-dropzone-text strong {
    display: block;
    font-size: 16px;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.qlb-adhoc-dropzone-text p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}
.qlb-adhoc-browse-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.qlb-adhoc-browse-btn:hover {
    background: #4f46e5;
}

/* Preview */
.qlb-adhoc-title-field {
    margin-bottom: 20px;
}
.qlb-adhoc-title-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.qlb-adhoc-title-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.qlb-adhoc-title-field input:focus {
    outline: none;
    border-color: #667eea;
}
.qlb-adhoc-preview {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 4px;
}
.qlb-adhoc-preview-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}
.qlb-adhoc-preview-q {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
    margin-bottom: 8px;
}
.qlb-adhoc-preview-num {
    color: #667eea;
    margin-right: 6px;
}
.qlb-adhoc-preview-answers {
    list-style: none;
    padding: 0;
    margin: 0;
}
.qlb-adhoc-preview-answers li {
    font-size: 13px;
    color: #6b7280;
    padding: 3px 0;
}
.qlb-adhoc-preview-answers li.qlb-adhoc-correct {
    color: #059669;
    font-weight: 600;
}
.qlb-adhoc-warnings {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #92400e;
}
.qlb-adhoc-warnings ul {
    margin: 6px 0 0 20px;
    padding: 0;
}

/* Actions */
.qlb-adhoc-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.qlb-adhoc-actions button {
    flex: 1;
}

/* Error */
.qlb-adhoc-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
}

/* Login required */
.qlb-adhoc-login-required {
    text-align: center;
    padding: 60px 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .qlb-adhoc-modal-inner {
        padding: 20px;
        max-height: 95vh;
    }
    .qlb-adhoc-dropzone {
        padding: 30px 15px;
    }
    .qlb-adhoc-actions {
        flex-direction: column;
    }
}
