/* =========================================================
   GIVEAWAY SYSTEM - CSS TECNOLÓGICO ROXO ADAPTADO
   ========================================================= */

/* Container Principal */
.giveaway-container {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0d2e 50%, #2d1b4e 100%);
    border-radius: 24px;
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 700px;
    box-shadow: 
        0 25px 60px rgba(138, 43, 226, 0.35),
        0 0 120px rgba(147, 51, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 50px rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(147, 51, 234, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
}

/* Efeitos de fundo animados */
.giveaway-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(147, 51, 234, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(138, 43, 226, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: bg-pulse 8s ease-in-out infinite alternate;
}

.giveaway-container::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(147, 51, 234, 0.3) 0%, 
        rgba(168, 85, 247, 0.2) 25%, 
        rgba(138, 43, 226, 0.3) 50%, 
        rgba(147, 51, 234, 0.2) 75%, 
        rgba(168, 85, 247, 0.3) 100%);
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.giveaway-container:hover::after {
    opacity: 1;
}

/* Navegação das Abas */
.giveaway-tabs {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 18px;
    padding: 0.75rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147, 51, 234, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

/* Botões das Abas */
.tab-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    padding: 1.25rem 2rem;
    background: transparent;
    border: none;
    border-radius: 14px;
    color: #a855f7;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: inherit;
    min-height: 60px;
}

/* Efeito de onda nos botões */
.tab-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(147, 51, 234, 0.3), 
        rgba(168, 85, 247, 0.2), 
        transparent);
    transition: left 0.7s ease;
}

.tab-link:hover::before {
    left: 100%;
}

.tab-link:hover {
    color: #c084fc;
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(138, 43, 226, 0.5),
        0 0 40px rgba(147, 51, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Estado ativo do botão */
.tab-link.active {
    background: linear-gradient(135deg, 
        #7c3aed 0%, 
        #9333ea 35%, 
        #a855f7 70%, 
        #c084fc 100%);
    color: #ffffff;
    box-shadow: 
        0 20px 45px rgba(138, 43, 226, 0.7),
        0 0 50px rgba(147, 51, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 4s ease-in-out infinite;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.9), 
        rgba(255, 255, 255, 0.6), 
        transparent);
    border-radius: 4px;
    animation: glow-pulse 2.5s ease-in-out infinite alternate;
}

/* Conteúdo das Abas */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 18px;
    padding: 2.5rem;
    border: 1px solid rgba(147, 51, 234, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Títulos */
.giveaway-container h3 {
    color: #f1f5f9;
    margin: 0 0 24px 0;
    font-weight: 600;
    font-size: 24px;
    background: linear-gradient(135deg, #f1f5f9, #a855f7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Grupos de Campos */
.field-group {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.field-group .group-label {
    display: block;
    color: #cbd5e1;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    flex: 1;
    margin-bottom: 20px;
}

.input-wrapper.single {
    flex: none;
    max-width: 320px;
}

/* LABELS CORRIGIDAS - Estilização aprimorada */
.input-wrapper label {
    display: block;
    color: #a855f7;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 4px;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(138, 43, 226, 0.3));
}

/* Efeito hover nas labels */
.input-wrapper:hover label {
    transform: translateY(-1px);
    filter: drop-shadow(0 2px 4px rgba(138, 43, 226, 0.5));
}

/* Efeito focus nas labels quando input está focado */
.input-wrapper input:focus + label,
.input-wrapper textarea:focus + label {
    color: #c084fc;
    transform: translateY(-2px);
    filter: drop-shadow(0 3px 6px rgba(138, 43, 226, 0.6));
}

/* Labels flutuantes alternativas (se preferir o estilo anterior) */
.input-wrapper.floating label {
    position: absolute;
    top: -12px;
    left: 16px;
    background: linear-gradient(135deg, #0a0a0a, #1a0d2e);
    padding: 4px 12px;
    font-size: 12px;
    color: #a855f7;
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(147, 51, 234, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    backdrop-filter: blur(10px);
    margin-bottom: 0;
    text-transform: uppercase;
    background-clip: initial;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}

/* Inputs e Textareas */
textarea,
input[type="number"] {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(147, 51, 234, 0.4);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 0;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    line-height: 1.5;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

textarea:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 
        0 0 0 4px rgba(168, 85, 247, 0.2),
        0 8px 32px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    background: rgba(0,0,0,0.8);
	color:#ffffff;
}

textarea::placeholder,
input[type="number"]::placeholder {
    color: #64748b;
}

.number-inputs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.number-inputs .input-wrapper {
    min-width: 150px;
}

/* Botão Principal */
.giveaway-button {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 35%, #a855f7 70%, #c084fc 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 
        0 15px 45px rgba(138, 43, 226, 0.5),
        0 0 50px rgba(147, 51, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.giveaway-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.giveaway-button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 
        0 20px 55px rgba(138, 43, 226, 0.6),
        0 0 60px rgba(147, 51, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.giveaway-button:not(:disabled):hover::before {
    left: 100%;
}

.giveaway-button:not(:disabled):active {
    transform: translateY(-1px);
}

.giveaway-button:disabled,
.giveaway-button.disabled {
    background: linear-gradient(135deg, #374151, #4b5563);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Área de Resultado */
.giveaway-result-container {
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid rgba(147, 51, 234, 0.3);
    padding-top: 32px;
    position: relative;
    z-index: 1;
}

.giveaway-result-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

.result-box {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(26, 13, 46, 0.8));
    padding: 32px;
    border-radius: 16px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 20px;
    overflow-wrap: break-word;
    word-break: break-all;
    border: 1px solid rgba(147, 51, 234, 0.4);
    backdrop-filter: blur(20px);
    position: relative;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

#giveaway-result.winner-reveal {
    animation: winnerReveal 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.result-box li {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(147, 51, 234, 0.3);
    font-size: 0.7em;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.result-box li:last-child {
    border-bottom: none;
}

.result-box li:hover {
    background: rgba(147, 51, 234, 0.2);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.result-box li::before {
    content: '🏆';
    margin-right: 12px;
    font-size: 1.4em;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

/* Mensagens de Erro */
.giveaway-error {
    color: #fca5a5;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    backdrop-filter: blur(10px);
    animation: errorShake 0.5s ease;
}

/* Informações de Seleção */
.selection-info {
    font-size: 14px;
    color: #94a3b8;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(168, 85, 247, 0.08));
    border-left: 4px solid #a855f7;
    padding: 16px 20px;
    margin-top: 8px;
    margin-bottom: 24px;
    border-radius: 0 12px 12px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-left: 4px solid #a855f7;
}

/* CAPTCHA Container */
.captcha-container {
    margin: 32px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 320px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(147, 51, 234, 0.3);
    backdrop-filter: blur(10px);
}

/* Scrollbar Styling */
.result-box ul::-webkit-scrollbar {
    width: 8px;
}

.result-box ul::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.result-box ul::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 4px;
}

.result-box ul::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a855f7, #c084fc);
}

/* Animações */
@keyframes bg-pulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.02); }
}

@keyframes glow-pulse {
    0% { 
        opacity: 0.6; 
        transform: translateX(-50%) scaleX(0.8); 
        filter: blur(1px);
    }
    100% { 
        opacity: 1; 
        transform: translateX(-50%) scaleX(1); 
        filter: blur(0px);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(-4px); }
    50% { transform: translateY(-8px); }
}

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

@keyframes winnerReveal {
    0% {
        transform: scale(0.8) rotateY(-15deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotateY(5deg);
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Animação de entrada do sistema */
.giveaway-container {
    animation: fade-in 0.8s ease-out;
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .giveaway-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
        border-radius: 16px;
        background: linear-gradient(135deg, #1a0d2e 0%, #2d1b4e 100%);
        box-shadow: 0 15px 40px rgba(138, 43, 226, 0.3);
    }
    
    /* Remove efeitos pesados no mobile */
    .giveaway-container::before,
    .giveaway-container::after {
        display: none;
    }
    
    .giveaway-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(5px);
    }
    
    .tab-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 48px;
        border-radius: 10px;
        text-transform: none;
        letter-spacing: 0.3px;
    }
    
    /* Simplifica animações no mobile */
    .tab-link::before {
        display: none;
    }
    
    .tab-link:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
    }
    
    .tab-link.active {
        transform: none;
        animation: none;
        box-shadow: 0 8px 20px rgba(138, 43, 226, 0.5);
    }
    
    .tab-link.active::after {
        display: none;
    }
    
    .tab-content {
        padding: 1.5rem;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
    }
    
    .number-inputs {
        flex-direction: column;
        gap: 16px;
    }
    
    .number-inputs .input-wrapper {
        min-width: unset;
    }
    
    .result-box {
        font-size: 1.5em;
        padding: 24px;
    }
    
    .giveaway-container h3 {
        font-size: 20px;
    }
    
    .giveaway-button {
        padding: 16px 24px;
        font-size: 16px;
        text-transform: none;
        letter-spacing: 0.3px;
    }
    
    /* Labels responsivas */
    .input-wrapper label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .input-wrapper.floating label {
        font-size: 11px;
        padding: 3px 8px;
        top: -10px;
    }
}

@media (max-width: 480px) {
    .giveaway-container {
        padding: 1rem;
        margin: 1rem auto;
        border-radius: 12px;
    }
    
    .tab-link {
        padding: 0.6rem 0.8rem;
        gap: 0.5rem;
        min-height: 44px;
        font-size: 0.8rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .result-box {
        font-size: 1.2em;
        padding: 20px;
    }
    
    .giveaway-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Labels ainda menores no mobile */
    .input-wrapper label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .input-wrapper.floating label {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Reduzir animações pesadas em dispositivos de baixa performance */
@media (prefers-reduced-motion: reduce) {
    .giveaway-container::before,
    .tab-link::before,
    .tab-link.active::after,
    .tab-link.active {
        animation: none !important;
    }
    
    .tab-link,
    .tab-content,
    .result-box li,
    .input-wrapper label {
        transition: all 0.2s ease !important;
    }
}

/* Tema escuro aprimorado */
@media (prefers-color-scheme: dark) {
    .giveaway-container {
        background: linear-gradient(135deg, #000000 0%, #1a0d2e 50%, #2d1b4e 100%);
        box-shadow: 
            0 30px 70px rgba(138, 43, 226, 0.5),
            0 0 150px rgba(147, 51, 234, 0.25);
    }
    
    .tab-content {
        background: rgba(0, 0, 0, 0.6);
        color: #f9fafb;
    }
    
    .input-wrapper label {
        background: linear-gradient(135deg, #a855f7, #c084fc);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}