* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 0px;
    max-width: 800px;
    width: 100%;
    overflow: hidden;
}

.header {
    background: #1a1a1a; /* Preto fosco/opaco */
    color: #ffffff; /* Letras brancas */
    padding: 40px 20px 15px 20px;
    text-align: center;
    margin: 0; /* Removendo margem para ocupar toda a largura da caixa */
    width: 100%;
    border-radius: 0px;
}

.header h1 {
    color: #ffffff; /* Letras brancas */
    font-size: 2.2em; /* Tamanho maior e mais proporcional */
    letter-spacing: 2px;
    text-transform: none;
    margin-bottom: 0;
    font-weight: 400;
}

.header .by-text {
    color: #ffffff; /* Letras brancas */
    font-size: 1.3em; /* Levemente maior */
    margin-top: 40px; /* Mais afastado da frase de cima */
    margin-bottom: 0;
    font-family: serif;
    font-style: italic;
    opacity: 0.9;
}

.logo-criart {
    height: 180px; /* Logo um pouco maior */
    margin-top: -45px; /* Mais próximo do "by" */
    margin-bottom: -20px;
    opacity: 1;
    filter: invert(1); /* Inverte a logo preta para branco */
}

.progress-container {
    width: calc(100% - 80px);
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    margin: 10px 40px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    background: linear-gradient(to bottom, #444 0%, #1a1a1a 50%, #222 100%);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
}

.content {
    padding: 20px 40px 0 40px;
}

/* TELA 1: BEM-VINDO */
.tela-boas-vindas {
    text-align: center;
}

.tela-boas-vindas h2 {
    display: none; /* Removed as per image */
}

.tela-boas-vindas .intro-text {
    color: #333;
    font-size: 1.1em;
    line-height: 1.4;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tela-boas-vindas ul {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 30px;
    list-style: none;
}

.tela-boas-vindas li {
    padding: 5px 0;
    color: #333;
    font-size: 1.05em;
    position: relative;
    padding-left: 20px;
}

.tela-boas-vindas li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: bold;
}

.sinceridade-text {
    margin-top: 30px;
    font-size: 1.1em;
    color: #444;
    line-height: 1.4;
}

.btn-container-beige {
    background: #ffffff;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

/* TELA 2: QUIZ */
.tela-quiz {
    display: none;
}

.pergunta-container {
    margin-bottom: 30px;
}

.pergunta-numero {
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 15px;
}

.pergunta-texto {
    font-size: 1.4em;
    color: #1a1a1a;
    margin-bottom: 30px;
    line-height: 1.4;
    font-weight: 500;
}

/* NOVOS ESTILOS INTRO */
.intro-quiz {
    text-align: center;
    padding: 20px;
}

.intro-quiz h1 {
    font-size: 2em;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.intro-descricao {
    font-size: 1.1em;
    color: #444;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.avisos-importantes {
    text-align: left;
    max-width: 480px;
    margin: 0 auto 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.avisos-importantes h3 {
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #1a1a1a;
}

.aviso-item {
    margin-bottom: 10px;
    font-size: 0.92em;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.btn-iniciar {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-iniciar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: #333;
}

/* THUMBNAIL CSS */
.thumbnail-container {
    margin-bottom: 25px;
    text-align: center;
}
.thumbnail {
    width: 160px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.thumbnail:hover {
    transform: scale(1.05);
    border-color: #1a1a1a;
}
.thumbnail.expanded {
    width: 100%;
    height: auto;
    max-width: 550px;
    cursor: zoom-out;
    border-radius: 15px;
}

/* SLIDER - NOVO */
.slider-container {
    width: 100%;
    max-width: 620px; 
    margin: 40px auto 0;
    padding: 35px 25px;
    text-align: center;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    position: relative;
}

.slider {
    width: clamp(260px, calc(100% - 120px), 440px);
    margin: 25px auto;
    display: block;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    background: #f0f0f0;
    outline: none;
    border-radius: 10px;
    opacity: 1;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.5);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #444, #1a1a1a);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 3px solid #fff;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: -2px;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #444, #1a1a1a);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 3px solid #fff;
}

.labels { 
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    justify-items: center;
    width: clamp(320px, 80vw, 520px); 
    margin: 10px auto;
    color: #1a1a1a;
    box-sizing: border-box;
    font-weight: 500;
}

.bottom-labels div {
    text-align: center;
    line-height: 1.1;
    font-size: 0.85em;
}

.mobile-br {
    display: none;
}

.top-labels { font-size: 0.85em; font-weight: bold; }

.slider-value {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #1a1a1a;
    margin-top: 10px;
}

/* Indicador de arraste */
.drag-indicator {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 15px;
    font-size: 0.85em;
}

/* TELA 3: RESULTADO */
.tela-resultado {
    display: none;
}

.resultado-header {
    text-align: center;
    margin-bottom: 30px;
}

.resultado-header h2 {
    color: #1a1a1a;
    font-size: 2.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.resultado-principal {
    background: linear-gradient(135deg, #222 0%, #1a1a1a 100%);
    color: white;
    padding: 50px 40px;
    border-radius: 20px;
    margin-bottom: 35px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
}

.resultado-principal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.resultado-principal h3 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.resultado-principal .percentual {
    font-size: 4em;
    font-weight: 800;
    background: linear-gradient(to bottom, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.resultado-secundario {
    background: #fff;
    padding: 35px;
    border: 1px solid #f0f0f0;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
}

.resultado-secundario h3 {
    font-size: 1.3em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    border-bottom: 3px solid #1a1a1a;
    display: inline-block;
    padding-bottom: 8px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #f5f5f5;
}

.score-item:last-child {
    border-bottom: none;
}

.score-nome {
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-barra {
    flex: 1;
    margin: 0 25px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.score-barra-fill {
    height: 100%;
    background: linear-gradient(90deg, #444, #1a1a1a);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.score-barra-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
}

.ranking-card {
    background: white; 
    padding: 25px; 
    border-radius: 15px; 
    margin-bottom: 20px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.06); 
    border: 1px solid #f0f0f0; 
    transition: transform 0.3s ease;
}

.ranking-card-content {
    display: flex; 
    align-items: center; 
    gap: 20px;
}

.ranking-numero {
    font-size: 1.8em; 
    font-weight: 800; 
    color: #1a1a1a; 
    opacity: 0.2; 
    min-width: 45px;
}

.ranking-info {
    flex: 1;
    min-width: 0; /* Impede que o flex-item estoure */
}

.ranking-nome {
    font-size: 1.2em; 
    font-weight: 700; 
    color: #1a1a1a; 
    letter-spacing: 0.5px; 
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-barra-bg {
    background: #f0f0f0; 
    height: 6px; 
    border-radius: 3px; 
    width: 100%; 
    margin-top: 10px; 
    overflow: hidden;
}

.ranking-barra-fill {
    background: #1a1a1a; 
    height: 100%; 
}

.ranking-valor {
    font-weight: 800; 
    color: #1a1a1a; 
    font-size: 1.5em; 
    min-width: 70px; 
    text-align: right;
}

.score-valor {
    font-weight: 700;
    color: #1a1a1a;
    min-width: 60px;
    text-align: right;
    font-size: 1.1em;
}

.paleta-cores {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    justify-content: center;
}

.cor-box {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cor-box:hover {
    transform: scale(1.1) rotate(2deg);
    z-index: 2;
}

.cor-box:hover::after {
    content: attr(data-hex);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.caracteristicas-list {
    list-style: none;
    margin: 20px 0;
}

.caracteristicas-list li {
    padding: 10px 0;
    color: #555;
    font-size: 1.05em;
}

.caracteristicas-list li:before {
    content: "— ";
    color: #1a1a1a;
    font-weight: bold;
    margin-right: 10px;
}

/* BOTÕES */
.botoes {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.btn {
    padding: 18px 45px;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover {
    background: #222;
    transform: scale(1.02);
}

.btn-secondary {
    background: white;
    color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
    background: #fcfcfc;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* LOADING */
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading.ativo {
    display: block;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a1a1a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.4em;
    }

    .content {
        padding: 15px 15px 0 15px;
    }

    .pergunta-texto {
        font-size: 1.15em;
    }

    .logo-criart {
        height: 110px;
        margin-top: -20px;
        margin-bottom: -15px;
    }

    .slider-container {
        padding: 15px 5px;
    }

    .slider {
        width: 100%;
    }

    .slider::-webkit-slider-thumb {
        margin-top: -10px;
    }

    .labels {
        width: 100%;
        font-size: 0.65em; /* User's optimized size */
        gap: 3px;
        margin-top: 16px;
        display: flex; /* Better for flex: 1 inside */
    }

    .labels div {
        text-align: center;
        flex: 1;
        line-height: 1.25;
        padding: 0 2px;
        min-width: 0;
        word-break: break-word;
    }

    .labels .label-1,
    .labels .label-5 {
        font-weight: 700;
        color: #1a1a1a;
    }

    .botoes {
        gap: 10px;
    }

    .btn {
        padding: 15px 10px;
        font-size: 0.9em;
        flex: 1;
    }

    .progress-container {
        width: calc(100% - 40px);
        margin: 10px 20px;
    }

    .drag-indicator {
        font-size: 0.7em;
        margin-top: 10px;
        opacity: 0.6;
    }

    .ranking-card {
        padding: 15px;
    }

    .ranking-card-content {
        gap: 10px;
    }

    .ranking-numero {
        font-size: 1.4em;
        min-width: 35px;
    }

    .ranking-nome {
        font-size: 1em;
    }

    .ranking-valor {
        font-size: 1.2em;
        min-width: 55px;
    }

    .resultado-principal h3 {
        font-size: 1.8em;
    }

    .resultado-principal .percentual {
        font-size: 3em;
    }

    .resultado-secundario {
        padding: 20px 15px;
    }

    .resultado-composicao h3 {
        font-size: 1.1em;
    }
}

/* MODAL DE VALIDAÇÃO */
.modal-validacao {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-validacao-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease;
}

.modal-validacao-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 30px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.icone-alerta {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.modal-validacao-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}

.modal-validacao-body {
    padding: 30px;
}

.modal-validacao-footer {
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .modal-validacao-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-validacao-footer {
        flex-direction: column;
    }
}

/* DEBUG FINAL */
.debug-final-container {
    margin-top: 80px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #adb5bd;
    border-radius: 15px;
    display: none;
}

.debug-final-container h2 {
    text-align: center;
    color: #495057;
    margin-bottom: 40px;
    font-size: 1.8em;
    font-weight: 300;
    letter-spacing: 1px;
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.debug-score {
    text-align: center;
    padding: 20px 30px;
    border-radius: 12px;
    color: white;
    min-width: 140px;
}

.score-numero {
    font-size: 3em;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 0.9em;
    margin-top: 8px;
    opacity: 0.9;
}

.debug-interpretacao {
    font-size: 1.2em;
    color: #495057;
    text-align: left;
}

.debug-section {
    background: white;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: left;
}

.debug-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.metricas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.metrica-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.95em;
}

.metrica-label {
    color: #666;
}

.metrica-valor {
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.problema-card {
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid;
    text-align: left;
}

.nivel-crítico { background: #ffe6e6; border-color: #dc3545; }
.nivel-alto { background: #fff3cd; border-color: #ffc107; }
.nivel-atenção { background: #d1ecf1; border-color: #17a2b8; }

.problema-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.problema-badge {
    background: rgba(0,0,0,0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.problema-metrica {
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.1em;
}

.problema-contexto,
.problema-impacto,
.problema-sugestao {
    margin-top: 15px;
    line-height: 1.6;
    font-size: 0.95em;
}

.problema-sugestao {
    background: rgba(52, 152, 219, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.observacao-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid #6c757d;
    text-align: left;
}

.observacao-sugestao {
    margin-top: 10px;
    color: #0056b3;
    font-style: italic;
}

.json-data {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    text-align: left;
}

details summary {
    cursor: pointer;
    padding: 12px;
    background: #e9ecef;
    border-radius: 6px;
    font-weight: 600;
    user-select: none;
    text-align: left;
}

@media (max-width: 600px) {
    .debug-header {
        flex-direction: column;
        padding: 20px;
    }
    .debug-final-container {
        padding: 20px 10px;
    }
}

