* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevenir zoom em inputs iOS */
@supports (-webkit-touch-callout: none) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
}

@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: stretch;
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
}

.container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    min-height: 600px;
}

/* Mobile: container ocupa toda tela */
@media (max-width: 480px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
        display: block;
        box-shadow: none;
        overflow: hidden;
        position: relative;
    }
}

.screen {
    display: none;
    padding: 40px;
    min-height: 600px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 480px) {
    .screen {
        padding: 20px 15px;
        min-height: 100vh;
        max-height: 100vh;
        display: none;
        flex-direction: column;
        -webkit-overflow-scrolling: touch;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@media (max-width: 480px) {
    .screen.active {
        display: flex;
        position: relative;
        z-index: 10;
    }
    
    .screen:not(.active) {
        display: none !important;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tela de Boas-vindas */
.welcome-content {
    text-align: center;
    padding: 40px 20px;
}

@media (max-width: 480px) {
    .welcome-content {
        padding: 30px 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        min-height: 100%;
    }
}

.title {
    font-size: 3em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    line-height: 1.2;
    font-weight: 700;
}

@media (max-width: 480px) {
    .title {
        font-size: 2em;
        margin-bottom: 20px;
        line-height: 1.1;
    }
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 1em;
        margin-bottom: 25px;
        padding: 0 10px;
    }
}

.info-box {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .info-box {
        gap: 12px;
        margin: 30px 10px;
        justify-content: space-between;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.info-item:hover {
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .info-item {
        padding: 18px 12px;
        flex: 1;
        min-width: 0;
        border-radius: 12px;
        gap: 8px;
    }
}

.info-icon {
    font-size: 2.5em;
}

@media (max-width: 480px) {
    .info-icon {
        font-size: 2em;
    }
    
    .info-item span:not(.info-icon) {
        font-size: 0.85em;
        font-weight: 600;
        color: #495057;
    }
}

.disclaimer {
    margin-top: 30px;
    font-size: 0.9em;
    color: #999;
    font-style: italic;
}

/* Botões */
.btn {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 480px) {
    .btn {
        padding: 18px 30px;
        font-size: 1em;
        width: 100%;
        max-width: 100%;
        min-height: 52px;
        border-radius: 15px;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Tela de Perguntas */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 480px) {
    .question-header {
        margin-bottom: 20px;
        gap: 15px;
        flex-direction: column;
        align-items: stretch;
    }
}

.progress-container {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 480px) {
    .progress-container {
        min-width: 0;
        width: 100%;
    }
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-counter {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
}

@media (max-width: 480px) {
    .timer-container {
        font-size: 1em;
        justify-content: center;
        padding: 10px 0;
    }
}

.timer-icon {
    font-size: 1.5em;
}

.question-content {
    margin: 40px 0;
    min-height: 300px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 480px) {
    .question-content {
        margin: 25px 0;
        min-height: auto;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.question-text {
    font-size: 1.3em;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #333;
    font-weight: 500;
    word-wrap: break-word;
}

@media (max-width: 480px) {
    .question-text {
        font-size: 1.15em;
        line-height: 1.7;
        margin-bottom: 25px;
        color: #2c3e50;
        font-weight: 600;
    }
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    text-align: left;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    word-wrap: break-word;
}

@media (max-width: 480px) {
    .option-btn {
        padding: 18px 16px;
        font-size: 1em;
        min-height: 56px;
        display: flex;
        align-items: center;
        border-radius: 12px;
        background: white;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        border: 2px solid #e9ecef;
    }
    
    .option-btn:active {
        transform: scale(0.98);
    }
}

.option-btn:hover {
    background: #e8e9ff;
    border-color: #667eea;
    transform: translateX(5px);
}

.option-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.number-input-container {
    margin-top: 30px;
}

.number-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2em;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

@media (max-width: 480px) {
    .number-input {
        padding: 18px 16px;
        font-size: 1.1em;
        min-height: 52px;
    }
}

.number-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pattern-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    display: grid;
    gap: 20px;
    justify-items: center;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 400px;
}

.pattern-item {
    width: 100px;
    height: 100px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    background: white;
}

.pattern-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.pattern-item.selected {
    border-color: #667eea;
    background: #e8e9ff;
    transform: scale(1.1);
}

.question-footer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

@media (max-width: 480px) {
    .question-footer {
        margin-top: 20px;
        padding-bottom: 10px;
    }
    
    .question-footer .btn {
        width: 100%;
        max-width: none;
    }
}

/* Tela de Resultados */
.results-content {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
    .results-content {
        padding: 25px 15px;
        justify-content: flex-start;
    }
}

.iq-circle {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 40px;
}

@media (max-width: 480px) {
    .iq-circle {
        width: 200px;
        height: 200px;
        margin: 0 auto 30px;
    }
}

.iq-circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.iq-circle-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 15;
}

.iq-circle-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 15;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 2s ease;
}

.iq-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.iq-number {
    font-size: 4em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

@media (max-width: 480px) {
    .iq-number {
        font-size: 3em;
    }
    
    .iq-label {
        font-size: 1.3em;
    }
}

.iq-label {
    font-size: 1.5em;
    color: #666;
    font-weight: 600;
}

.results-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #333;
}

@media (max-width: 480px) {
    .results-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

@media (max-width: 480px) {
    .results-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 25px 0;
    }
}

@media (max-width: 360px) {
    .results-stats {
        gap: 6px;
        margin: 20px 0;
    }
    
    .stat-item {
        padding: 10px 6px;
        min-height: 85px;
    }
    
    .stat-label {
        font-size: 0.65em;
    }
    
    .stat-value {
        font-size: 1.2em;
    }
}

.stat-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    align-items: center;
    text-align: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .stat-item {
        padding: 12px 8px;
        border-radius: 10px;
        gap: 6px;
        min-height: 90px;
    }
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .stat-label {
        font-size: 0.7em;
        letter-spacing: 0.5px;
        line-height: 1.2;
    }
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1.3em;
        font-weight: 800;
    }
}

.iq-category {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #e8e9ff 0%, #f0f1ff 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

@media (max-width: 480px) {
    .iq-category {
        font-size: 1.3em;
        margin: 20px 0;
        padding: 15px;
        border-radius: 10px;
    }
}

.iq-description {
    font-size: 1.1em;
    line-height: 1.8;
    color: #666;
    margin: 20px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    word-wrap: break-word;
}

@media (max-width: 480px) {
    .iq-description {
        font-size: 0.95em;
        line-height: 1.6;
        margin: 15px 0;
        padding: 0 10px;
    }
}

.results-actions {
    margin-top: 40px;
}

/* Gradiente SVG */
.iq-circle-svg defs {
    display: block;
}

/* Responsividade para tablets */
@media (max-width: 768px) {
    .title {
        font-size: 2.2em;
    }
    
    .question-content {
        min-height: 250px;
    }
    
    .question-text {
        font-size: 1.15em;
    }
    
    .iq-circle {
        width: 220px;
        height: 220px;
    }
    
    .iq-number {
        font-size: 3.2em;
    }
}

/* Responsividade para smartphones pequenos */
@media (max-width: 360px) {
    .title {
        font-size: 1.5em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .info-item {
        padding: 12px 8px;
        font-size: 0.85em;
    }
    
    .info-icon {
        font-size: 2em;
    }
    
    .question-text {
        font-size: 1em;
    }
    
    .option-btn {
        font-size: 0.9em;
        padding: 16px 12px;
    }
    
    .iq-circle {
        width: 150px;
        height: 150px;
    }
    
    .iq-number {
        font-size: 2em;
    }
    
.iq-label {
    font-size: 1.2em;
    }
}

/* Tela de Nome */
.name-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    min-height: 100%;
    flex: 1;
}

@media (max-width: 480px) {
    .name-content {
        padding: 30px 15px;
        justify-content: center;
    }
}

.name-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

@media (max-width: 480px) {
    .name-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
}

.name-subtitle {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 40px;
}

@media (max-width: 480px) {
    .name-subtitle {
        font-size: 1em;
        margin-bottom: 30px;
        padding: 0 10px;
    }
}

.name-input-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.name-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.2em;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
}

.name-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

@media (max-width: 480px) {
    .name-input {
        padding: 18px 16px;
        font-size: 1.1em;
        min-height: 52px;
    }
}

.name-actions {
    width: 100%;
    max-width: 400px;
}

.name-actions .btn {
    width: 100%;
}

/* Ações de Resultados */
.results-actions {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

@media (max-width: 480px) {
    .results-actions {
        margin-top: 30px;
        gap: 12px;
    }
    
    .results-actions .btn {
        width: 100%;
        max-width: 100%;
    }
}

/* Feedback de Compartilhamento */
.share-feedback {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    font-size: 1em;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}

.share-feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .share-feedback {
        bottom: 20px;
        padding: 15px 25px;
        font-size: 0.9em;
        border-radius: 15px;
    }
}

