/**
 * PowerPix - Social Hub Styles
 * Estilos para Hub de Resultados, Galeria de Ganhadores e Perfis Públicos
 */

/* ==================== DROPDOWN DE CONCURSOS ==================== */

.contest-selector-wrapper {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #1E1E1E 0%, #2A2A2A 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contest-selector-wrapper label {
    display: block;
    color: #F5C542;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

#contest-selector {
    width: 100%;
    padding: 12px 16px;
    background: #2A2A2A;
    color: #FFF;
    border: 2px solid rgba(245, 197, 66, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#contest-selector:hover {
    border-color: #F5C542;
    background: #333;
}

#contest-selector:focus {
    outline: none;
    border-color: #F5C542;
    box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.1);
}

/* ==================== NÚMEROS SORTEADOS ==================== */

.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #FFF;
    margin: 0 0 8px 0;
}

.result-header .text-muted {
    color: #888;
    font-size: 13px;
}

.drawn-numbers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.numbers-white,
.numbers-red {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ball-white {
    background: linear-gradient(135deg, #FFF 0%, #E0E0E0 100%);
    color: #1A1A1A;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.ball-red {
    background: linear-gradient(135deg, #E11D48 0%, #9F1239 100%);
    color: #FFF;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.plus {
    font-size: 24px;
    font-weight: 700;
    color: #888;
    margin: 0 8px;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== ESTATÍSTICAS DO CONCURSO ==================== */

.contest-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #2A2A2A 0%, #1E1E1E 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card i {
    font-size: 24px;
    color: #F5C542;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #FFF;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== GALERIA DE GANHADORES ==================== */

.gallery-title {
    font-size: 16px;
    font-weight: 700;
    color: #F5C542;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.winner-card {
    background: linear-gradient(135deg, #1E1E1E 0%, #2A2A2A 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F5C542 0%, #FFB300 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(245, 197, 66, 0.2);
    border-color: rgba(245, 197, 66, 0.3);
}

.winner-card:hover::before {
    opacity: 1;
}

.winner-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.winner-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #F5C542;
}

.winner-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #F5C542 0%, #FFB300 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1A1A1A;
}

.winner-badge i {
    color: #1A1A1A;
    font-size: 12px;
}

.winner-name {
    font-size: 16px;
    font-weight: 700;
    color: #FFF;
    margin: 0 0 8px 0;
}

.winner-prize {
    font-size: 20px;
    font-weight: 800;
    color: #4CAF50;
    margin-bottom: 4px;
}

.winner-hits {
    font-size: 12px;
    color: #888;
    margin-bottom: 16px;
}

.btn-view-profile {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #F5C542 0%, #FFB300 100%);
    color: #1A1A1A;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view-profile:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 197, 66, 0.4);
}

.no-winners {
    text-align: center;
    padding: 48px 24px;
    color: #888;
}

.no-winners i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ==================== MODAL DE PERFIL PÚBLICO ==================== */

#profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 20px;
}

#profile-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.profile-modal-content {
    background: #1A1A1A;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    margin: auto;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.profile-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #FFF;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.profile-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.profile-header {
    text-align: center;
    padding: 32px 24px 24px;
    background: linear-gradient(135deg, #2A2A2A 0%, #1E1E1E 100%);
    border-radius: 16px 16px 0 0;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #F5C542;
    box-shadow: 0 8px 24px rgba(245, 197, 66, 0.3);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 24px;
    font-weight: 800;
    color: #FFF;
    margin: 0 0 8px 0;
}

.profile-member-since {
    color: #888;
    font-size: 13px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 24px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-badge.stat-primary {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.1) 0%, rgba(255, 179, 0, 0.1) 100%);
    border-color: rgba(245, 197, 66, 0.3);
}

.stat-badge i {
    font-size: 24px;
    color: #F5C542;
}

.win-breakdown {
    padding: 0 24px 24px;
}

.win-breakdown h4 {
    font-size: 14px;
    font-weight: 700;
    color: #F5C542;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-item.has-wins {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.tier-name {
    font-size: 13px;
    color: #CCC;
    font-weight: 600;
}

.tier-count {
    font-size: 16px;
    font-weight: 800;
    color: #4CAF50;
}

.winning-history {
    padding: 0 24px 24px;
}

.winning-history h4 {
    font-size: 14px;
    font-weight: 700;
    color: #F5C542;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.history-bet-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 16px;
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bet-contest {
    font-size: 13px;
    font-weight: 700;
    color: #FFF;
}

.bet-date {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.bet-tier {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.bet-tier.sena {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.bet-tier.quina {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.bet-tier.quadra {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.bet-numbers {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mini-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mini-ball-red {
    background: linear-gradient(135deg, #E11D48 0%, #9F1239 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.plus-mini {
    font-size: 14px;
    color: #888;
    margin: 0 4px;
    display: inline-flex;
    align-items: center;
}

.bet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bet-prize {
    font-size: 14px;
    font-weight: 700;
    color: #4CAF50;
}

.btn-copy-bet {
    padding: 8px 16px;
    background: linear-gradient(135deg, #F5C542 0%, #FFB300 100%);
    color: #1A1A1A;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy-bet:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 197, 66, 0.4);
}

/* ==================== ANIMAÇÕES ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ==================== RESPONSIVIDADE ==================== */

@media (max-width: 768px) {
    .winners-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .ball {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
