@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

#tlq-quiz-container { font-family: 'Outfit', sans-serif; max-width: 720px; margin: 0 auto; padding: 24px 16px; background: #FAFBFC; min-height: 400px; }
#tlq-quiz-container * { box-sizing: border-box; }

/* Loading */
.tlq-loading { text-align: center; padding: 60px 20px; }
.tlq-spinner { width: 40px; height: 40px; border: 4px solid #E2E8F0; border-top-color: var(--tlq-primary, #DC2626); border-radius: 50%; animation: tlqSpin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes tlqSpin { to { transform: rotate(360deg); } }

/* Animations */
@keyframes tlqFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tlqSlideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes tlqShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes tlqPopIn { 0% { opacity: 0; transform: scale(0.3); } 60% { transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tlqPulse { 0%,100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.8); opacity: 0; } }
@keyframes tlqScaleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes tlqExplSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tlqConfetti { 0% { opacity: 1; transform: translateY(0) rotate(0deg); } 100% { opacity: 0; transform: translateY(300px) rotate(720deg); } }
@keyframes tlqFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Header */
.tlq-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.tlq-logo { display: flex; align-items: center; gap: 10px; }
.tlq-logo-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.tlq-logo-icon svg { stroke: #fff; fill: none; }
.tlq-logo-text { line-height: 1.15; }
.tlq-logo-title { font-weight: 800; font-size: 15px; color: #1a1a2e; letter-spacing: -0.3px; }
.tlq-logo-sub { font-size: 10px; color: #94A3B8; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.tlq-user-badge { display: flex; align-items: center; gap: 8px; }
.tlq-user-info { text-align: right; }
.tlq-user-name { font-size: 12px; font-weight: 700; color: #1a1a2e; line-height: 1.2; }
.tlq-user-city { font-size: 10px; color: #94A3B8; font-weight: 500; }
.tlq-avatar { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; }

/* Card */
.tlq-card { background: #FFFFFF; border-radius: 20px; padding: 32px 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.04); }

/* Form Inputs */
.tlq-input { width: 100%; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; font-family: inherit; border: 1.5px solid #E2E8F0; background: #F8FAFC; outline: none; transition: all 0.2s; color: #1a1a2e; }
.tlq-input:focus { border-color: var(--tlq-primary, #DC2626); background: #fff; box-shadow: 0 0 0 3px rgba(220,38,38,0.1); }
.tlq-input-error { border-color: #FCA5A5 !important; background: #FEF2F2 !important; }

/* Buttons */
.tlq-btn-primary { width: 100%; padding: 16px; font-size: 16px; font-weight: 700; font-family: inherit; color: #fff; border: none; border-radius: 14px; cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px; }
.tlq-btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* Option Buttons */
.tlq-option { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; border: 1.5px solid #E2E8F0; background: #FFFFFF; cursor: pointer; font-family: inherit; text-align: left; width: 100%; transition: all 0.2s; }
.tlq-option:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.tlq-option:disabled { cursor: default; }
.tlq-option-label { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.tlq-option-text { font-size: 14px; font-weight: 500; line-height: 1.4; }

/* Option States */
.tlq-option-correct { background: #F0FDF4; border-color: #86EFAC; }
.tlq-option-correct .tlq-option-label { background: #DCFCE7; color: #16A34A; }
.tlq-option-correct .tlq-option-text { color: #15803D; }
.tlq-option-wrong { background: #FEF2F2; border-color: #FCA5A5; }
.tlq-option-wrong .tlq-option-label { background: #FEE2E2; color: #DC2626; }
.tlq-option-wrong .tlq-option-text { color: #DC2626; }
.tlq-option-dimmed { background: #F8FAFC; }
.tlq-option-dimmed .tlq-option-text { color: #94A3B8; }

/* Explanation */
.tlq-explanation { margin-top: 20px; padding: 16px 18px; border-radius: 14px; animation: tlqExplSlide 0.4s ease; }
.tlq-explanation-correct { background: #F0FDF4; border: 1.5px solid #86EFAC; }
.tlq-explanation-wrong { background: #FEF2F2; border: 1.5px solid #FCA5A5; }

/* Progress */
.tlq-progress-bar { height: 6px; border-radius: 3px; background: #E2E8F0; margin-bottom: 24px; overflow: hidden; }
.tlq-progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* Timer */
.tlq-timer { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; }
.tlq-timer-shake { animation: tlqShake 0.3s ease infinite; background: #FEF2F2; }

/* Category Pills */
.tlq-cat-pill { padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; }

/* Stats Grid */
.tlq-stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }

/* Progress Dots */
.tlq-dots { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.tlq-dot { width: 10px; height: 10px; border-radius: 5px; transition: all 0.3s; }

/* Share Buttons */
.tlq-share-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.tlq-share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; border: none; cursor: pointer; color: #fff; font-family: inherit; transition: all 0.2s; font-size: 11px; font-weight: 700; }
.tlq-share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* Category Selector */
.tlq-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.tlq-cat-card { padding: 18px; border-radius: 14px; border: 2px solid #E2E8F0; background: #fff; cursor: pointer; transition: all 0.2s; text-align: center; }
.tlq-cat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.tlq-cat-card-active { border-color: var(--tlq-primary, #DC2626); background: #FEF2F2; }
.tlq-cat-name { font-size: 14px; font-weight: 700; color: #1a1a2e; margin-top: 8px; }
.tlq-cat-count { font-size: 11px; color: #94A3B8; font-weight: 500; }

/* Review */
.tlq-review-item { padding: 14px; border-radius: 14px; margin-bottom: 10px; }

/* Responsive */
@media (max-width: 600px) {
    #tlq-quiz-container { padding: 16px 12px; }
    .tlq-card { padding: 24px 20px; }
    .tlq-cat-grid { grid-template-columns: 1fr; }
    .tlq-stats-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
}
