/* quiz-agent.css (Conversational UI) */
.quiz-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(30, 20, 25, 0.96); /* tom mais quente */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.quiz-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.conversational-mode {
    width: 100%;
    max-width: 650px;
    height: 100vh;
    max-height: 850px;
    display: flex;
    flex-direction: column;
    padding: 60px 20px 40px;
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow-y: auto;
}

/* Close Button */
.quiz-close {
    position: absolute;
    top: 24px; right: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-color);
    font-size: 24px;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    z-index: 10;
}
.quiz-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--vibrant-pink);
}

/* Minimal Progress */
.quiz-progress-minimal {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: auto;
}
.quiz-dot-mini {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
}
.quiz-dot-mini.active { background: var(--vibrant-pink); transform: scale(1.3); }
.quiz-dot-mini.completed { background: var(--rose-gold); }

/* Chat Area */
.quiz-chat-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

/* Mascot */
.quiz-mascot-wrapper {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.mascot-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(233, 30, 99, 0.4) 0%, rgba(233, 30, 99, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    animation: glowPulse 2s infinite alternate;
}
@keyframes glowPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 1; }
}

.quiz-mascot {
    font-size: 4.5rem;
    filter: drop-shadow(0 5px 15px rgba(233, 30, 99, 0.5));
    transition: transform 0.3s;
    user-select: none;
    z-index: 1;
}

/* Mascot Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes bounceHappy {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-30px) scale(1.2); }
    50% { transform: translateY(0) scale(0.9); }
    70% { transform: translateY(-15px) scale(1.1); }
    100% { transform: translateY(0) scale(1); }
}
@keyframes shakeThink {
    0%, 100% { transform: rotate(0deg) scale(0.95); }
    25% { transform: rotate(-5deg) scale(0.95); }
    75% { transform: rotate(5deg) scale(0.95); }
}
@keyframes receiveAnswer {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(233,30,99,0.5)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 40px rgba(233,30,99,0.9)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(233,30,99,0.5)); }
}

.quiz-mascot.waiting { animation: float 3s ease-in-out infinite; }
.quiz-mascot.thinking { animation: shakeThink 1.5s ease-in-out infinite; opacity: 0.8; }
.quiz-mascot.talking { animation: pulse 1s ease-in-out infinite; }
.quiz-mascot.receiving { animation: receiveAnswer 0.4s ease-out; }
.quiz-mascot.happy-reaction { animation: bounceHappy 1s ease-out; }
.quiz-mascot.celebrate { animation: bounceHappy 0.6s ease-out infinite; filter: drop-shadow(0 0 30px var(--gold)); }

/* Chat Bubble */
.quiz-chat-bubble-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}
.quiz-chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    border-top-left-radius: 4px;
    padding: 16px 24px;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--text-color);
    max-width: 95%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-dots {
    display: flex; gap: 4px; font-weight: bold;
}
.typing-dots span {
    animation: blink 1.4s infinite both;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

/* Options Area */
.quiz-options-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    margin-bottom: auto;
}

/* Chat Reply Buttons (Pills) */
.chat-reply-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 14px 28px;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.chat-reply-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 20px rgba(233,30,99,0.2);
}

.chat-reply-btn.selected-reply {
    background: linear-gradient(135deg, var(--burgundy), var(--vibrant-pink));
    border-color: transparent;
    box-shadow: 0 4px 25px rgba(233, 30, 99, 0.4);
    color: #FFF;
    transform: scale(1.05);
}

.chat-reply-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.reply-icon { font-size: 1.3rem; }
.check-icon { font-size: 1.1rem; color: #fff; margin-left: 4px; animation: popIn 0.3s ease; }

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Themes specific replies */
.theme-reply {
    flex-direction: column;
    padding: 16px 28px;
    border-radius: 20px;
    gap: 12px;
}
.theme-swatches { display: flex; gap: 6px; }
.theme-swatch {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

/* Input Custom Fields */
.chat-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
}

.chat-text-input, .chat-textarea-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 20px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.chat-text-input:focus, .chat-textarea-input:focus {
    border-color: var(--vibrant-pink);
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.chat-char-counter {
    align-self: flex-end;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: -6px;
    margin-bottom: 6px;
}
.chat-char-counter.warning { color: #FFA726; }
.chat-char-counter.error { color: #EF5350; }

/* Date Picker Wrapper */
.chat-date-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    outline: none;
    text-align: center;
}
.chat-date-input:focus {
    border-color: var(--vibrant-pink);
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.4);
}
.chat-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.confirm-input-btn {
    background: var(--vibrant-pink);
    border: none;
    color: #fff;
    padding: 14px 28px;
    font-weight: 600;
}
.confirm-input-btn:hover {
    background: #c2185b;
}

/* Upload zone and grid inside chat */
.chat-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    margin-top: 5px;
}

.chat-dropzone {
    width: 100%;
    height: 80px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
}
.chat-dropzone:hover, .chat-dropzone.dragover {
    border-color: var(--vibrant-pink);
    background: rgba(233, 30, 99, 0.05);
}
.chat-dropzone span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.chat-thumb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
    padding: 4px;
}
.chat-thumb-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-thumb-remove {
    position: absolute;
    top: 2px; right: 2px;
    width: 18px; height: 18px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.chat-thumb-remove:hover {
    background: var(--vibrant-pink);
}

/* Plans grid in chat options */
.chat-plans-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 550px;
    margin-top: 10px;
}
.chat-plan-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.chat-plan-card:hover {
    border-color: rgba(233, 30, 99, 0.4);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
}
.chat-plan-card.premium {
    border: 1.5px solid var(--rose-gold);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(138, 28, 60, 0.15) 100%);
}
.chat-plan-card.premium:hover {
    border-color: var(--vibrant-pink);
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.2);
}
.chat-plan-badge {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--vibrant-pink);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.5px;
}
.chat-plan-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}
.chat-plan-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 6px 0;
}
.chat-plan-features {
    list-style: none;
    padding: 0;
    margin: 6px 0 12px 0;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-plan-features li {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Background Particles */
.particles-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}
.particle-heart {
    position: absolute;
    font-size: 1.5rem;
    animation: floatParticle linear infinite;
}
@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

/* Music Search Results */
.chat-music-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 4px;
}
.chat-music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}
.chat-music-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.chat-music-item.selected {
    background: linear-gradient(135deg, rgba(138, 28, 60, 0.3), rgba(226, 92, 143, 0.3));
    border-color: var(--vibrant-pink);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}
.chat-music-thumb {
    width: 50px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.chat-music-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-music-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-music-channel {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsiveness */
@media (min-width: 768px) {
    .conversational-mode {
        justify-content: center;
    }
    .quiz-mascot { font-size: 5rem; }
    .quiz-chat-bubble { font-size: 1.5rem; padding: 24px 32px; }
    .chat-reply-btn { font-size: 1.1rem; padding: 14px 28px; }
}
