/* Cores da AcheNoPão */
:root {
    --primary-blue: #1e3a8a;
    --primary-yellow: #fbbf24;
    --light-blue: #3b82f6;
    --dark-blue: #1e40af;
    --light-yellow: #fcd34d;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
    --success: #10b981;
    --error: #ef4444;
    --border: #e2e8f0;
}

/* Container principal */
.sorteio-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header */
.sorteio-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-yellow);
    position: relative;
}

.sorteio-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
}

.sorteio-header h2 {
    color: var(--primary-blue);
    font-size: 2.2em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.sorteio-header p {
    color: var(--gray);
    font-size: 1.1em;
    margin: 0;
}

/* Formulário */
.sorteio-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--dark-gray);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--dark-gray);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--light-blue);
}

.form-group input.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--light-gray);
}

/* Seções especiais */
.anunciantes-section,
.challenge-section {
    background: linear-gradient(135deg, var(--light-gray) 0%, rgba(251, 191, 36, 0.05) 100%);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    position: relative;
}

.anunciantes-section::before,
.challenge-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--primary-yellow) 100%);
    border-radius: 0 0 0 15px;
}

.anunciantes-section h3,
.challenge-section h3 {
    color: var(--primary-blue);
    font-size: 1.3em;
    margin: 0 0 20px 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.anunciantes-section h3::before {
    content: '🏪';
    font-size: 1.2em;
}

.challenge-section h3::before {
    content: '🔒';
    font-size: 1.2em;
}

/* Botão de submit */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(30, 58, 138, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mensagens */
.sorteio-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.sorteio-message.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sorteio-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.sorteio-message i {
    font-size: 1.2em;
}

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

/* Ícones */
.icon-check::before {
    content: '✓';
}

.icon-error::before {
    content: '✗';
}

/* Responsividade */
@media (max-width: 768px) {
    .sorteio-container {
        padding: 20px;
        margin: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sorteio-header h2 {
        font-size: 1.8em;
    }
    
    .anunciantes-section,
    .challenge-section {
        padding: 20px;
    }
    
    .btn-submit {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .sorteio-container {
        padding: 15px;
    }
    
    .sorteio-header h2 {
        font-size: 1.6em;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 14px;
        font-size: 0.95em;
    }
    
    .anunciantes-section,
    .challenge-section {
        padding: 15px;
    }
    
    .anunciantes-section h3,
    .challenge-section h3 {
        font-size: 1.1em;
    }
}

/* Animações de entrada */
.sorteio-container {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de loading para campos */
.form-group.loading select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath fill='%2364748b' d='M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

/* Placeholder styling */
.form-group input::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

/* Focus visible para acessibilidade */
.btn-submit:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible {
    outline: 2px solid var(--primary-yellow);
    outline-offset: 2px;
}