/* ===== Thisgun Quiz - Common Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

.tgq-wrap {
    font-family: 'Noto Sans KR', sans-serif;
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ===== Start Screen ===== */
.tgq-start {
    text-align: center;
    padding: 40px 20px;
    border-radius: 20px;
    background: var(--tgq-bg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.tgq-start-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    animation: tgq-bounce 2s infinite;
}
.tgq-start h2 {
    font-size: 28px;
    font-weight: 900;
    color: var(--tgq-primary);
    margin-bottom: 12px;
}
.tgq-start p {
    font-size: 16px;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.6;
}
.tgq-start-btn {
    display: inline-block;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: var(--tgq-gradient);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.tgq-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ===== Progress Bar ===== */
.tgq-progress {
    display: none;
    margin-bottom: 24px;
}
.tgq-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.tgq-progress-fill {
    height: 100%;
    background: var(--tgq-gradient);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}
.tgq-progress-text {
    text-align: center;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* ===== Question Screen ===== */
.tgq-question-wrap {
    display: none;
}
.tgq-question-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    animation: tgq-slideIn 0.4s ease;
}
.tgq-q-number {
    display: inline-block;
    background: var(--tgq-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.tgq-q-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.5;
}
.tgq-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tgq-answer-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    line-height: 1.4;
    font-family: 'Noto Sans KR', sans-serif;
}
.tgq-answer-btn:hover {
    background: var(--tgq-light);
    border-color: var(--tgq-primary);
    transform: translateX(4px);
}
.tgq-answer-btn:active {
    transform: scale(0.98);
}
.tgq-answer-btn.selected {
    background: var(--tgq-gradient);
    color: #fff;
    border-color: transparent;
}

/* ===== Back Button ===== */
.tgq-back-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    background: transparent;
    border: 1px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}
.tgq-back-btn:hover {
    color: #555;
    border-color: #999;
    background: #f8f9fa;
}

/* ===== Result Screen ===== */
.tgq-result {
    display: none;
    text-align: center;
    animation: tgq-fadeIn 0.6s ease;
}
.tgq-result-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.tgq-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--tgq-gradient);
}
.tgq-result-emoji {
    font-size: 72px;
    margin-bottom: 8px;
    animation: tgq-bounce 1.5s infinite;
}
.tgq-result-type {
    font-size: 28px;
    font-weight: 900;
    color: var(--tgq-primary);
    margin-bottom: 4px;
}
.tgq-result-subtitle {
    font-size: 16px;
    color: #888;
    margin-bottom: 20px;
}
.tgq-result-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: left;
    padding: 0 8px;
}
.tgq-result-section {
    text-align: left;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 14px;
}
.tgq-result-section h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--tgq-primary);
    margin-bottom: 8px;
}
.tgq-result-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tgq-result-section li {
    font-size: 14px;
    color: #555;
    padding: 4px 0;
    line-height: 1.5;
}
.tgq-result-section li::before {
    content: '• ';
    color: var(--tgq-primary);
    font-weight: 700;
}
.tgq-result-section p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}
.tgq-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}
.tgq-share-btn, .tgq-retry-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}
.tgq-share-btn {
    background: var(--tgq-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.tgq-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.tgq-retry-btn {
    background: #f0f0f0;
    color: #555;
}
.tgq-retry-btn:hover {
    background: #e0e0e0;
}
.tgq-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}
.tgq-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Confetti Animation ===== */
.tgq-confetti-wrap {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}
.tgq-confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    top: -10px;
    animation: tgq-confettiFall 3s ease-in forwards;
}

/* ===== Color Circle for Color Quiz ===== */
.tgq-color-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: tgq-pulse 2s infinite;
}

/* ===== Animations ===== */
@keyframes tgq-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes tgq-slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes tgq-fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes tgq-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes tgq-confettiFall {
    0% { top: -10px; opacity: 1; }
    100% { top: 110vh; opacity: 0; }
}

/* ===== Theme Variables ===== */
.tgq-theme-mbti {
    --tgq-primary: #6c5ce7;
    --tgq-gradient: linear-gradient(135deg, #6c5ce7, #4facfe);
    --tgq-light: #f0edff;
    --tgq-bg: linear-gradient(135deg, #f5f3ff, #e8f4fd);
}
.tgq-theme-love {
    --tgq-primary: #e84393;
    --tgq-gradient: linear-gradient(135deg, #e84393, #fd79a8);
    --tgq-light: #ffeef5;
    --tgq-bg: linear-gradient(135deg, #fff0f6, #ffe8ef);
}
.tgq-theme-past {
    --tgq-primary: #6c5ce7;
    --tgq-gradient: linear-gradient(135deg, #2d1b69, #b8860b);
    --tgq-light: #f0edff;
    --tgq-bg: linear-gradient(135deg, #1a0a3e, #2d1b69);
}
.tgq-theme-past .tgq-start { color: #f0e6d3; }
.tgq-theme-past .tgq-start h2 { color: #ffd700; }
.tgq-theme-past .tgq-start p { color: #c9b896; }
.tgq-theme-past .tgq-q-text { color: #333; }

.tgq-theme-color {
    --tgq-primary: #e17055;
    --tgq-gradient: linear-gradient(135deg, #e17055, #fdcb6e, #00b894, #6c5ce7);
    --tgq-light: #fff5f0;
    --tgq-bg: linear-gradient(135deg, #ffecd2, #fcb69f, #a8edea);
}
.tgq-theme-animal {
    --tgq-primary: #00b894;
    --tgq-gradient: linear-gradient(135deg, #00b894, #55a3a4);
    --tgq-light: #e8faf5;
    --tgq-bg: linear-gradient(135deg, #e8faf5, #d4f1e8);
}

/* ===== History Section ===== */
.tgq-history-section { margin-top: 30px; }
.tgq-history-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.tgq-history-empty { color: #999; text-align: center; padding: 20px; }
.tgq-history-item { background: #f8f9fa; border-radius: 12px; padding: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.tgq-history-item:hover { background: #e9ecef; }
.tgq-history-emoji { font-size: 28px; }
.tgq-history-info { flex: 1; }
.tgq-history-name { font-weight: 600; font-size: 15px; }
.tgq-history-date { font-size: 12px; color: #999; margin-top: 2px; }
.tgq-history-detail-btn { background: none; border: 1px solid #ddd; color: #888; cursor: pointer; font-size: 12px; padding: 4px 10px; border-radius: 6px; transition: all 0.2s; font-family: 'Noto Sans KR', sans-serif; }
.tgq-history-detail-btn:hover { color: var(--tgq-primary, #6c5ce7); border-color: var(--tgq-primary, #6c5ce7); }
.tgq-history-delete { background: none; border: none; color: #ccc; cursor: pointer; font-size: 18px; padding: 4px 8px; }
.tgq-history-delete:hover { color: #e74c3c; }
.tgq-history-login-msg { font-size: 13px; color: #999; text-align: center; margin-top: 8px; font-style: italic; }
.tgq-history-detail { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; margin-top: -6px; }
.tgq-history-detail-content { font-size: 13px; color: #555; line-height: 1.6; }
.tgq-history-detail-row { padding: 2px 0; }
.tgq-history-detail-key { font-weight: 600; color: #333; }
.tgq-history-detail-val { color: #666; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .tgq-wrap { padding: 12px; }
    .tgq-start h2 { font-size: 22px; }
    .tgq-q-text { font-size: 17px; }
    .tgq-answer-btn { font-size: 14px; padding: 14px 16px; }
    .tgq-result-type { font-size: 22px; }
    .tgq-result-emoji { font-size: 56px; }
    .tgq-result-actions { flex-direction: column; }
    .tgq-share-btn, .tgq-retry-btn { width: 100%; }
}
