/* Reset e Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabeçalho */
.survey-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #667eea;
}

.survey-header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.survey-header h2 {
    color: #764ba2;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Grupos de Perguntas */
.question-group {
    margin-bottom: 35px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}

.question-group:hover {
    background: #f0f2f5;
    transform: translateX(5px);
}

.question-label {
    display: block;
    font-size: 1.15em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.question-label.required::after {
    content: " *";
    color: #dc3545;
}

.question-hint {
    font-size: 0.9em;
    color: #666;
    margin-top: -10px;
    margin-bottom: 15px;
    font-style: italic;
}

/* Inputs de Texto */
input[type="email"],
input[type="text"],
textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(3px);
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.radio-option span {
    font-size: 1em;
    color: #333;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #e8ecff;
    font-weight: 600;
}

/* Campo "Outro" */
#outro-input {
    margin-top: 10px;
    margin-left: 32px;
    width: calc(100% - 32px);
}

#outro-input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-option span {
    font-size: 1em;
    color: #333;
}

.checkbox-option:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: #e8ecff;
    font-weight: 600;
}

/* Mensagens de Erro */
.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8d7da;
    border-radius: 5px;
    border-left: 3px solid #dc3545;
}

/* Botão de Envio */
.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ==================== ESTILOS DA ROLETA ==================== */

.roleta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    perspective: 1000px;
}

.wheel-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

/* Ponteiro/Indicador */
.wheel-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3em;
    color: #667eea;
    z-index: 100;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

/* Roleta */
.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 10px solid #fff;
    transform: rotate(0deg);
}

/* Segmentos da Roleta */
.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    background: var(--color);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    transform: rotate(calc(var(--i) * 60deg));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
}

.wheel-segment span {
    display: block;
    color: white;
    font-weight: bold;
    font-size: 0.85em;
    text-align: left;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transform: rotate(-30deg) translateX(30px);
    width: 120px;
    line-height: 1.2;
}

/* Botão Central de Girar */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spin-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    border: 5px solid white;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.spin-button:hover:not(.disabled) {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.spin-button:active:not(.disabled) {
    transform: scale(0.95);
}

.spin-button.disabled {
    background: #999;
    cursor: not-allowed;
}

.spin-button:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Caixa de Resultado */
.result-box {
    display: none;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 3px solid #667eea;
    margin-top: 30px;
    animation: slideUp 0.5s ease-out;
}

.result-box.show {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-box h3 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 15px;
}

.premio-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 20px;
}

.info-text {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.modal-prize {
    font-size: 1.8em;
    font-weight: bold;
    color: #764ba2;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 3px solid #667eea;
}

.modal-message {
    color: #666;
    font-size: 1.1em;
    margin: 20px 0;
}

/* Botões */
.btn-print,
.btn-close-modal {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.btn-print {
    background: #28a745;
    color: white;
}

.btn-print:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-close-modal {
    background: #6c757d;
    color: white;
}

.btn-close-modal:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .survey-header h1 {
        font-size: 2em;
    }

    .survey-header h2 {
        font-size: 1.4em;
    }

    .wheel-wrapper {
        width: 300px;
        height: 300px;
    }

    .wheel-segment span {
        font-size: 0.7em;
        width: 90px;
        transform: rotate(-30deg) translateX(20px);
    }

    .spin-button {
        width: 80px;
        height: 80px;
        font-size: 1em;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 2em;
    }

    .modal-prize {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .wheel-wrapper {
        width: 250px;
        height: 250px;
    }

    .wheel-segment span {
        font-size: 0.6em;
        width: 70px;
        transform: rotate(-30deg) translateX(15px);
    }

    .spin-button {
        width: 70px;
        height: 70px;
        font-size: 0.9em;
    }
}

/* Estilo de Impressão */
@media print {
    body {
        background: white;
    }

    .container {
        box-shadow: none;
    }

    .wheel-container,
    .btn-print,
    .btn-close-modal {
        display: none;
    }

    .result-box {
        display: block !important;
        border: 2px solid #000;
        page-break-inside: avoid;
    }
}
