/* =========================================
   Glossa Quiz — Frontend Styles
   Author: strkicn.com
   ========================================= */

*, *::before, *::after { box-sizing: border-box; }

.dq-quiz-container {
    max-width: 760px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1d2327;
}

/* ---- Quiz Header ---- */
.dq-quiz-header {
    text-align: center;
    padding: 40px 24px 32px;
    background: linear-gradient(135deg, #0d1b2a 0%, #1b2d45 50%, #1a3a5c 100%);
    border-radius: 20px 20px 0 0;
    color: #fff;
}
.dq-quiz-logo { font-size: 56px; margin-bottom: 14px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
.dq-quiz-header h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); margin: 0 0 12px; color: #fff; font-weight: 700; }
.dq-intro-text { color: rgba(255,255,255,.75); font-size: 15px; max-width: 500px; margin: 0 auto; line-height: 1.6; }

/* ---- Register Card ---- */
.dq-register-card {
    background: #fff;
    border-radius: 0 0 20px 20px;
    padding: 36px 32px 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12);
}
@media (max-width: 500px) {
    .dq-register-card { padding: 24px 18px 24px; }
    .dq-quiz-header { padding: 28px 18px 24px; }
}
.dq-register-card h3 { font-size: 1.35rem; margin: 0 0 6px; color: #1d2327; }
.dq-register-subtitle { color: #6b7280; margin: 0 0 28px; font-size: 14px; }

.dq-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 500px) { .dq-field-row { grid-template-columns: 1fr; gap: 0; } }

.dq-field-group { margin-bottom: 18px; }
.dq-field-group label { display: block; font-weight: 600; margin-bottom: 7px; color: #374151; font-size: 13px; letter-spacing: .3px; }
.dq-field-group input {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    background: #fafafa;
    color: #1d2327;
    -webkit-appearance: none;
}
.dq-field-group input:focus { border-color: #1a5c9a; background: #fff; box-shadow: 0 0 0 3px rgba(26,92,154,.12); }

.dq-error { background: #fee2e2; color: #b91c1c; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }

/* ---- START BUTTON (Modern/Branded) ---- */
.dq-start-btn {
    position: relative;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #1a3a5c 0%, #1b6ca8 50%, #2196e0 100%);
    box-shadow: 0 8px 24px rgba(26, 92, 154, .45), 0 2px 6px rgba(0,0,0,.2);
    transition: transform .2s, box-shadow .2s;
    margin-top: 4px;
}
.dq-start-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(26, 92, 154, .55), 0 4px 8px rgba(0,0,0,.2); }
.dq-start-btn:active { transform: translateY(-1px); }

.dq-start-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 28px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .4px;
    position: relative;
    z-index: 1;
}
.dq-start-btn-inner svg { flex-shrink: 0; }

.dq-start-btn-shine {
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
    transform: skewX(-15deg);
    animation: dq-shine 3s infinite;
}
@keyframes dq-shine {
    0% { left: -75%; }
    50%, 100% { left: 130%; }
}

/* ---- Privacy note ---- */
.dq-privacy-note { text-align: center; color: #9ca3af; font-size: 12px; margin: 14px 0 0; }

/* ---- Quiz Top Bar ---- */
.dq-quiz-topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    border-bottom: 2px solid #f0f0f0;
    gap: 10px;
}
.dq-quiz-progress-info { font-size: 13px; color: #666; white-space: nowrap; }
.dq-quiz-progress-info span { font-weight: 700; color: #1a5c9a; }
.dq-timer { font-size: 14px; font-weight: 700; color: #374151; white-space: nowrap; flex-shrink: 0; }
.dq-timer.dq-timer-warning { color: #dc2626; animation: dq-blink .8s infinite; }
@keyframes dq-blink { 50% { opacity: .5; } }

/* ---- Progress Bar ---- */
.dq-progress-bar-wrap { background: #e5e7eb; height: 5px; }
.dq-progress-bar { height: 100%; background: linear-gradient(90deg, #1a5c9a, #2196e0); transition: width .4s ease; }

/* ---- Question Slide ---- */
.dq-question-slide { background: #fff; padding: 28px 24px 24px; border-radius: 0 0 16px 16px; }
@media (max-width: 500px) { .dq-question-slide { padding: 20px 16px 18px; } }

.dq-question-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.dq-q-num {
    width: 30px; height: 30px; min-width: 30px;
    background: #1a5c9a; color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

/* Level badge */
.dq-level-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.dq-level-a1,.dq-level-a2 { background: #fde8e8; color: #b91c1c; }
.dq-level-b1,.dq-level-b2 { background: #fef3e2; color: #c2410c; }
.dq-level-c1,.dq-level-c2 { background: #dcfce7; color: #166534; }

.dq-question-text { font-size: clamp(1rem, 3.5vw, 1.2rem); font-weight: 600; color: #111; margin-bottom: 22px; line-height: 1.6; }
.dq-answer-hint { color: #6b7280; font-size: 13px; margin-bottom: 14px; font-style: italic; }

/* ---- Answers ---- */
.dq-answers-grid { display: grid; gap: 10px; margin-bottom: 24px; }
.dq-answer-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.dq-answer-option:hover { border-color: #1a5c9a; background: #eff6ff; }
.dq-answer-option input { display: none; }
.dq-answer-option:has(input:checked) { border-color: #1a5c9a; background: #eff6ff; }
.dq-answer-check {
    width: 22px; height: 22px; min-width: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-left: auto;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; flex-shrink: 0;
}
.dq-answer-option:has(input[type="checkbox"]) .dq-answer-check { border-radius: 6px; }
.dq-answer-option:has(input:checked) .dq-answer-check { background: #1a5c9a; border-color: #1a5c9a; }
.dq-answer-option:has(input:checked) .dq-answer-check::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 800; }
.dq-answer-text { flex: 1; font-size: 15px; color: #374151; line-height: 1.4; }

/* ---- Nav buttons ---- */
.dq-question-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.dq-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px;
    border-radius: 11px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.dq-btn-primary { background: linear-gradient(135deg, #1a5c9a, #2196e0); color: #fff; }
.dq-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,92,154,.4); }
.dq-btn-secondary { background: #f3f4f6; color: #374151; border: 2px solid #e5e7eb; }
.dq-btn-secondary:hover { background: #e5e7eb; }
.dq-btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.dq-btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(5,150,105,.4); }

@media (max-width: 400px) {
    .dq-btn { padding: 11px 16px; font-size: 14px; }
}

/* ---- Loading ---- */
.dq-loading-wrap { text-align: center; padding: 80px 20px; background:#fff; border-radius:16px; }
.dq-spinner {
    width: 56px; height: 56px;
    border: 5px solid #e5e7eb; border-top-color: #1a5c9a;
    border-radius: 50%;
    animation: dq-spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes dq-spin { to { transform: rotate(360deg); } }

/* ---- Results Header ---- */
.dq-results-header {
    text-align: center;
    padding: 36px 20px 20px;
    background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
    border-radius: 16px 16px 0 0;
    color: #fff;
}
.dq-trophy { font-size: 52px; margin-bottom: 10px; }
.dq-results-header h2 { color: #fff; margin: 0 0 8px; font-size: clamp(1.4rem, 5vw, 1.9rem); }
.dq-results-name { color: rgba(255,255,255,.8); font-size: 16px; margin: 0; }

/* ---- Score wrap ---- */
.dq-results-score-wrap {
    display: flex; gap: 32px; align-items: center;
    padding: 28px 24px;
    background: #fff;
    flex-wrap: wrap;
}
@media (max-width: 480px) {
    .dq-results-score-wrap { flex-direction: column; align-items: center; gap: 20px; padding: 20px 18px; }
}
.dq-score-circle { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.dq-score-circle svg { width: 100%; height: 100%; }
.dq-score-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.dq-score-center span { display: block; font-size: 1.8rem; font-weight: 800; color: #1d2327; }
.dq-score-center small { color: #6b7280; font-size: 13px; }
.dq-results-details { flex: 1; min-width: 200px; width: 100%; }
.dq-result-item { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid #f0f0f0; gap: 12px; }
.dq-result-item:last-child { border-bottom: none; }
.dq-ri-label { color: #6b7280; font-size: 13px; }
.dq-ri-value { font-weight: 700; color: #1d2327; font-size: 15px; text-align: right; }

/* ---- Motivation Box ---- */
.dq-motivation-box {
    background: linear-gradient(135deg, #f0f7ff, #e8f3ff);
    border-left: 5px solid #1a5c9a;
    padding: 24px 22px;
    display: flex;
    gap: 16px;
}
@media (max-width: 480px) {
    .dq-motivation-box { flex-direction: column; gap: 12px; padding: 20px 16px; }
}
.dq-motivation-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }
.dq-motivation-content h3 { margin: 0 0 10px; color: #1d2327; font-size: 1rem; line-height: 1.5; }
.dq-motivation-content p { color: #374151; line-height: 1.7; margin: 0 0 10px; font-size: 14px; }
.dq-benefits-list { list-style: none; padding: 0; margin: 10px 0; }
.dq-benefits-list li { padding: 5px 0; color: #374151; font-size: 14px; line-height: 1.5; }
.dq-bonus-box {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 2px solid #fed7aa;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 14px;
    color: #c2410c;
    font-size: 14px;
    line-height: 1.5;
}

/* ---- CTA Section ---- */
.dq-contact-cta {
    background: #fff;
    text-align: center;
    padding: 28px 20px 24px;
    border-top: 2px solid #f0f0f0;
}
.dq-btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 460px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #dc5a00, #f07200);
    color: #fff;
    font-size: clamp(15px, 4vw, 18px);
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(220, 90, 0, .4);
    transition: transform .2s, box-shadow .2s;
    letter-spacing: .3px;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.dq-btn-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(220, 90, 0, .5); }
.dq-btn-cta:active { transform: translateY(-1px); }
@media (max-width: 420px) {
    .dq-btn-cta { padding: 16px 18px; font-size: 15px; }
}
.dq-cta-note { color: #6b7280; font-size: 13px; margin: 12px 0 0; }

/* ---- Confirmed ---- */
.dq-contact-confirmed {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #6ee7b7;
    border-radius: 0 0 16px 16px;
    text-align: center;
    padding: 36px 24px;
}
.dq-confirmed-icon { font-size: 56px; margin-bottom: 14px; }
.dq-contact-confirmed h3 { color: #065f46; font-size: clamp(1.2rem, 4vw, 1.5rem); margin: 0 0 10px; }
.dq-contact-confirmed p { color: #047857; margin: 0 0 8px; font-size: 15px; line-height: 1.6; }

/* ---- GDPR Consent ---- */
.dq-gdpr-wrap {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f8faff;
    border: 2px solid #e0e8f5;
    border-radius: 10px;
}
.dq-gdpr-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}
.dq-gdpr-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    cursor: pointer;
    accent-color: #1a5c9a;
    border-radius: 4px;
}
.dq-gdpr-label a {
    color: #1a5c9a;
    text-decoration: underline;
    font-weight: 600;
}
.dq-gdpr-label a:hover { color: #0f3460; }

/* ---- GDPR v2.1 custom checkbox ---- */
.dq-gdpr-wrap {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f0f7ff;
    border: 2px solid #bdd7f5;
    border-radius: 10px;
}
.dq-gdpr-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
}
/* Hide native checkbox */
.dq-gdpr-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* Custom box */
.dq-gdpr-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #1a5c9a;
    border-radius: 6px;
    background: #fff;
    transition: background .2s, border-color .2s;
    margin-top: 1px;
}
.dq-gdpr-box::after {
    content: '';
    display: none;
    width: 6px;
    height: 11px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-2px);
}
/* Checked state */
.dq-gdpr-label input:checked ~ .dq-gdpr-box {
    background: #1a5c9a;
    border-color: #1a5c9a;
}
.dq-gdpr-label input:checked ~ .dq-gdpr-box::after {
    display: block;
}
.dq-gdpr-text {
    font-size: 13px;
    color: #374151;
}
.dq-gdpr-text a {
    color: #1a5c9a;
    font-weight: 600;
    text-decoration: underline;
}
