/* THE TOWN QUIZ CSS - Baseado no single-quiz.css do BBB */

/* Variáveis CSS para The Town */
:root {
    --thetown-primary: #FF6B35;     /* Laranja vibrante */
    --thetown-secondary: #1DB954;   /* Verde Spotify */
    --thetown-dark: #191414;        /* Preto Spotify */
    --thetown-light: #F7F3F0;       /* Background claro */
    --thetown-accent: #FFD700;      /* Dourado */
}

/* Seção principal do quiz */
.quiz-section.thetown-section {
    background: linear-gradient(135deg, var(--thetown-light) 0%, #fff 50%, var(--thetown-light) 100%);
    padding: 16px;
    min-height: 100vh;
}

.quiz-container {
    align-items: flex-start;
    display: flex;
    justify-content: center;
}

/* Steps do quiz - adaptado para tema musical */
.quiz-step {
    align-items: center;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='41' fill='none'%3E%3Cpath fill='%23FF6B35' d='M0-17h412v57.9S29.717-9.916 0 15v-32Z'/%3E%3C/svg%3E") 0 0 no-repeat,
                url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='36' fill='none'%3E%3Cpath stroke='%23FFD700' stroke-width='2' d='M412 34.998S29.717-16.856 0 7.5'/%3E%3C/svg%3E") left 20px no-repeat,
                var(--thetown-light);
    border: 1px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.1);
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 0;
    margin: 0;
    max-width: 0;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    transform: translateX(100vw);
    transition: transform 0.4s ease-in-out, opacity 0.3s ease;
    visibility: hidden;
    width: 100%;
}

.quiz-step.active {
    height: auto;
    margin: 100px auto 24px;
    max-width: 100%;
    opacity: 1;
    padding: 64px 16px 32px;
    pointer-events: all;
    transform: translateX(0);
    visibility: visible;
}

/* Responsivo */
@media screen and (min-width: 768px) {
    .quiz-step.active {
        background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1232' height='89' fill='none'%3E%3Cpath fill='%23FF6B35' d='M0-17h1440V89S103.866-31.189 0 14.425V-17Z'/%3E%3C/svg%3E") 0 0 no-repeat,
                    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1232' height='85' fill='none'%3E%3Cpath stroke='%23FFD700' stroke-width='2' d='M1440 84S103.866-33.489 0 11.1'/%3E%3C/svg%3E") left 20px no-repeat,
                    var(--thetown-light);
        margin: 120px auto 80px;
        max-width: 1200px;
        padding: 80px 32px 48px;
    }
}

@media screen and (min-width: 1024px) {
    .quiz-step.active {
        max-width: 1200px;
        padding: 112px 32px 56px;
    }
    
    /* Adicionar elementos musicais no desktop */
    .quiz-step.one.active,
    .quiz-step.three.active {
        background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1232' height='89' fill='none'%3E%3Cpath fill='%23FF6B35' d='M0-17h1440V89S103.866-31.189 0 14.425V-17Z'/%3E%3C/svg%3E") 0 0 no-repeat,
                    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1232' height='85' fill='none'%3E%3Cpath stroke='%23FFD700' stroke-width='2' d='M1440 84S103.866-33.489 0 11.1'/%3E%3C/svg%3E") left 20px no-repeat,
                    var(--thetown-light);
    }
}

/* Wrapper de texto - adaptado para tema musical */
.quiz-text-wrapper {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    margin: 0 auto;
    max-width: 500px;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .quiz-text-wrapper {
        max-width: 700px;
    }
}

.quiz-text-title {
    color: var(--thetown-primary);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .quiz-text-title {
        font-size: 36px;
    }
}

.quiz-text-subtitle {
    color: var(--thetown-dark);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.8;
    text-align: center;
}

/* Formulário */
.quiz-form-wrapper {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    width: 100%;
}

@media screen and (min-width: 768px) {
    .quiz-form-wrapper {
        max-width: 500px;
        padding: 24px;
    }
}

.quiz-form-group {
    align-items: center;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.quiz-form-group.name,
.quiz-form-group.email {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
}

.quiz-form-group.checkbox {
    align-items: flex-start;
    gap: 20px;
}

.quiz-form-label {
    color: var(--thetown-dark);
    display: flex;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.quiz-form-label.privacy,
.quiz-form-label.comunications {
    align-items: flex-start;
}

.quiz-form-label a {
    color: var(--thetown-primary);
    margin-left: 4px;
    text-decoration: underline;
    transition: color 0.2s ease;
}

@media screen and (min-width: 1024px) {
    .quiz-form-label a {
        text-decoration: none;
    }
    
    .quiz-form-label a:hover {
        color: var(--thetown-secondary);
        text-decoration: underline;
    }
}

.quiz-form-input {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-bottom-color: #e0e0e0;
    border-radius: 8px;
    color: var(--thetown-dark);
    font-size: 14px;
    font-weight: 500;
    height: 48px;
    line-height: 1.4;
    padding: 12px 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.quiz-form-input:focus {
    border-color: var(--thetown-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.quiz-form-input::placeholder {
    color: var(--thetown-dark);
    font-size: 14px;
    font-weight: 400;
    opacity: 0.6;
}

.quiz-form-input.error {
    background: #ffebee;
    border-color: #f44336;
}

/* Checkbox customizado */
.quiz-form-checkbox {
    height: 0;
    width: 0;
}

.quiz-form-checkbox-i {
    border: 2px solid var(--thetown-primary);
    border-radius: 6px;
    display: block;
    height: 20px;
    margin-right: 12px;
    min-height: 20px;
    min-width: 20px;
    position: relative;
    transition: all 0.2s ease;
    width: 20px;
}

.quiz-form-checkbox:checked ~ i {
    background-color: var(--thetown-primary);
}

.quiz-form-checkbox:checked ~ i:after {
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1.5 3.5 5 7l5.5-5.5'/%3E%3C/svg%3E") no-repeat 50%;
    background-size: contain;
    content: "";
    height: 12px;
    left: 50%;
    opacity: 1;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
}

/* Lista de opções do quiz */
.quiz-card-list {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
    width: 100%;
}

@media screen and (min-width: 768px) {
    .quiz-card-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
        max-width: 800px;
    }
}

.quiz-card-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    min-height: 120px;
    padding: 20px;
    transition: all 0.3s ease;
    width: 100%;
}

@media screen and (min-width: 768px) {
    .quiz-card-item {
        max-width: 180px;
        width: calc(50% - 10px);
    }
}

.quiz-card-item:hover {
    border-color: var(--thetown-primary);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

.quiz-card-item.selected {
    background: var(--thetown-primary);
    border-color: var(--thetown-primary);
    color: white;
}

.quiz-card-button {
    width: 100%;
}

.quiz-card-button button {
    align-items: center;
    background: transparent;
    border: 2px solid var(--thetown-primary);
    border-radius: 12px;
    color: var(--thetown-primary);
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    height: 48px;
    justify-content: center;
    line-height: 1.4;
    position: relative;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.quiz-card-button button:hover {
    background-color: var(--thetown-primary);
    color: white;
}

.quiz-card-button button.selected {
    background-color: var(--thetown-secondary);
    border-color: var(--thetown-secondary);
    color: white;
}

/* Botões de submit */
.quiz-submit-wrapper {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px auto 0;
    width: 100%;
}

.quiz-submit-button {
    align-items: center;
    background-color: var(--thetown-primary);
    border: 2px solid var(--thetown-primary);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    font-size: 16px;
    font-weight: 600;
    height: 56px;
    justify-content: center;
    line-height: 1.4;
    max-width: 400px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.quiz-submit-button:hover {
    background-color: #e55a2b;
    transform: translateY(-1px);
}

.quiz-submit-button:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.quiz-submit-button.inverse {
    background-color: transparent;
    color: var(--thetown-primary);
}

.quiz-submit-button.inverse:hover {
    background-color: var(--thetown-primary);
    color: white;
}

.quiz-submit-button.active {
    background-color: var(--thetown-secondary);
    border-color: var(--thetown-secondary);
}

.quiz-submit-button.active:hover {
    background-color: #1ed760;
}

/* Player Spotify */
.spotify-player-container {
    background: var(--thetown-dark);
    border-radius: 16px;
    margin: 24px auto;
    max-width: 500px;
    overflow: hidden;
    padding: 8px;
    width: 100%;
}

.spotify-player-container iframe {
    border-radius: 12px;
    height: 380px;
    width: 100%;
}

/* Mensagens de erro */
.quiz-form-error-message {
    color: #f44336;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-step.active .quiz-text-wrapper,
.quiz-step.active .quiz-form-wrapper,
.quiz-step.active .quiz-card-list {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsividade específica para The Town */
@media screen and (max-width: 480px) {
    .quiz-text-title {
        font-size: 24px;
    }
    
    .quiz-step.active {
        padding: 48px 12px 24px;
    }
    
    .quiz-card-list {
        gap: 12px;
    }
    
    .quiz-card-item {
        min-height: 100px;
        padding: 16px;
    }
}