:root {
    --duffy-blue: #1b63f2;
    --duffy-green: #58cc02;
    --duffy-text: #3c3c3c;
    --duffy-gray: #afafaf;
    --duffy-border: #e5e5e5;
}

.duffy-v3-root {
    all: initial; display: block; max-width: 800px; margin: 20px auto;
    font-family: sans-serif; color: var(--duffy-text); padding: 0 15px;
}
.duffy-v3-root * { box-sizing: border-box; }

/* Menu Superior (Abas) */
.duffy-navbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--duffy-border);
    padding-bottom: 10px;
}

.nav-item {
    background: none; border: none; cursor: pointer;
    padding: 10px 20px; border-radius: 15px;
    font-weight: 800; font-size: 13px; color: var(--duffy-gray);
    display: flex; flex-direction: column; align-items: center;
    transition: 0.2s;
}

.nav-item span { font-size: 20px; margin-bottom: 4px; }
.nav-item:hover { background: #f7f7f7; color: var(--duffy-text); }
.nav-item.active { color: var(--duffy-blue); background: #eff6ff; }

/* Banner e Listagem */
.duffy-hero-banner {
    background: linear-gradient(135deg, #1b63f2 0%, #1547b8 100%);
    border-radius: 24px; padding: 30px; color: white; margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(27, 99, 242, 0.1);
}
.rank-badge { background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; }

.duffy-lesson-item {
    background: white; border: 2px solid var(--duffy-border);
    border-bottom: 5px solid var(--duffy-border); border-radius: 20px;
    padding: 15px 20px; display: flex; align-items: center; gap: 20px;
    margin-bottom: 15px; cursor: pointer;
}
.duffy-lesson-item:active { transform: translateY(2px); border-bottom-width: 2px; }
.lesson-check { width: 40px; height: 40px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; }
.completed .lesson-check { background: var(--duffy-green); }

/* Exercícios */
.btn-verify {
    background: var(--duffy-green); border: none; border-bottom: 5px solid #46a302;
    color: white; border-radius: 15px; padding: 15px; width: 100%;
    font-size: 18px; font-weight: 800; cursor: pointer; margin-top: 20px;
}
.btn-verify:disabled { background: #e5e5e5; border-bottom-color: #ccc; color: #afafaf; }
.option-button {
    background: white; border: 2px solid var(--duffy-border); border-bottom: 4px solid var(--duffy-border);
    border-radius: 15px; padding: 12px 20px; font-size: 16px; font-weight: 600; width: 100%; text-align: left; margin-bottom: 10px; cursor: pointer;
}
.option-button.selected { background: #ddf4ff; border-color: #1899d6; color: #1899d6; }


/* Container de Construção (Slots) */
.duffy-sentence-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 60px;
    padding: 15px;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 30px;
    justify-content: center;
}

/* Blocos de Palavras */
.duffy-word-btn {
    background: white;
    border: 2px solid #e5e5e5;
    border-bottom: 4px solid #e5e5e5;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.1s;
}
.duffy-word-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.duffy-word-btn.used { opacity: 0.3; cursor: default; pointer-events: none; background: #eee; }

/* Barra de Feedback  */

/* Barra de Feedback Centralizada  */
.duffy-feedback-bar {
    position: fixed;
    bottom: -200px; /* Escondido */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 9999;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

/* Sobe até quase o meio da tela */
.duffy-feedback-bar.show { 
    bottom: 100px; 
}

.duffy-feedback-bar.correct { 
    background-color: #d7ffb8; 
    color: #58a700; 
    border: 3px solid #58a700; 
}

.duffy-feedback-bar.wrong { 
    background-color: #ffdfe0; 
    color: #ea2b2b; 
    border: 3px solid #ea2b2b; 
}

/* Tela de Vitória Final */
.duffy-victory-screen {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

.victory-trophy {
    font-size: 100px;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-30px);}
    60% {transform: translateY(-15px);}
}

.victory-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.stat-box {
    background: white;
    border: 2px solid #e5e5e5;
    padding: 20px;
    border-radius: 20px;
    min-width: 120px;
}


/* Trava de Tela durante o feedback */
.duffy-screen-lock {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9998;
    display: none;
}