/* ==========================================
   TEAM SECTION - MODERN PREMIUM STYLE
   ========================================== */

/* Power Display - Estilo Moderno */
.team-power-display {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border: 3px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.team-power-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: powerPulse 4s ease-in-out infinite;
}

@keyframes powerPulse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(20px, -20px) scale(1.1); opacity: 0.8; }
}

.power-box {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.power-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.6));
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { 
        filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.6));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 6px 12px rgba(255, 215, 0, 0.9));
        transform: scale(1.1);
    }
}

.power-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.power-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.power-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 3px 10px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
    font-family: 'Nunito', sans-serif;
}

/* Team Grid Moderno */
.team-grid-new {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Slots Premium */
.team-slot-new {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.8) 0%, rgba(20, 30, 50, 0.9) 100%);
    border-radius: 20px;
    padding: 15px;
    flex: 0 0 clamp(150px, 15vw, 190px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.team-slot-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.6s ease;
}

.team-slot-new:hover::before {
    left: 100%;
}

.team-slot-new:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(79, 195, 247, 0.7);
    box-shadow: 0 10px 30px rgba(79, 195, 247, 0.4), 0 0 25px rgba(79, 195, 247, 0.3);
}

.team-slot-new.selected {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

/* Slot Header */
.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.slot-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 3px 8px rgba(79, 195, 247, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Position Toggle - Estilo Moderno */
.position-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.position-toggle.attack {
    border-color: rgba(244, 67, 54, 0.6);
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(198, 40, 40, 0.4) 100%);
}

.position-toggle.attack:hover {
    border-color: rgba(244, 67, 54, 0.9);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.position-toggle.defense {
    border-color: rgba(33, 150, 243, 0.6);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3) 0%, rgba(13, 71, 161, 0.4) 100%);
}

.position-toggle.defense:hover {
    border-color: rgba(33, 150, 243, 0.9);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.toggle-icon {
    font-size: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.toggle-text {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Slot Content - Área de Drop */
.team-slot-new .slot-content {
    aspect-ratio: 2/3;
    background: rgba(0, 0, 0, 0.4);
    border: 3px dashed rgba(79, 195, 247, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-slot-new .slot-content.empty {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.team-slot-new .slot-content:hover {
    border-style: solid;
    border-color: rgba(79, 195, 247, 0.7);
    background: rgba(79, 195, 247, 0.1);
    transform: scale(1.02);
}

.team-slot-new .slot-content.drag-over {
    border-color: #4fc3f7;
    border-style: solid;
    background: rgba(79, 195, 247, 0.2);
    box-shadow: inset 0 0 20px rgba(79, 195, 247, 0.3);
}

.team-slot-new .slot-content.filled {
    border: none;
    padding: 0;
    background: transparent;
}

.slot-plus {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    transition: all 0.3s ease;
}

.team-slot-new .slot-content:hover .slot-plus {
    color: rgba(79, 195, 247, 0.8);
    transform: scale(1.2) rotate(90deg);
}

/* Slot Stats */
.team-slot-new .slot-stats {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    font-weight: 600;
}

.team-slot-new .slot-stats .stat-value {
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Mini Creature in Slot */
.team-slot-new .mini-creature {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.95) 0%, rgba(10, 20, 40, 0.98) 100%);
    border-radius: 16px;
}

.team-slot-new .creature-sprite-img {
    width: 120px;
    height: 120px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.team-slot-new .creature-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Available Creatures Section */
.available-creatures {
    margin-top: 30px;
}

.available-creatures h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filtros Visuais para Team */
.available-creatures .visual-filters-section {
    margin-bottom: 20px;
}

.available-creatures .filter-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.available-creatures .visual-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.available-creatures .filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.8) 0%, rgba(20, 30, 50, 0.9) 100%);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 90px;
    position: relative;
    overflow: hidden;
}

.available-creatures .filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

.available-creatures .filter-btn:hover::before {
    left: 100%;
}

.available-creatures .filter-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 0 8px 20px rgba(79, 195, 247, 0.3);
}

.available-creatures .filter-btn.active {
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    border-color: rgba(79, 195, 247, 0.8);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.available-creatures .filter-btn .filter-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.available-creatures .filter-btn:hover .filter-icon {
    transform: scale(1.2) rotate(-5deg);
}

.available-creatures .filter-btn.active .filter-icon {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.available-creatures .filter-btn .filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

/* Team Sort Bar */
.team-sort-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(30, 40, 70, 0.6);
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid rgba(79, 195, 247, 0.2);
    flex-wrap: wrap;
}

.team-sort-bar label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.team-sort-bar .filter-select {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.team-sort-bar .filter-select:hover {
    border-color: rgba(79, 195, 247, 0.6);
    background: rgba(0, 0, 0, 0.6);
}

.team-sort-bar .filter-select:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.4);
}

/* Creature Grid Premium */
.creatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    animation: gridFadeIn 0.5s ease;
}

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

/* Team Instructions */
.team-instructions {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.5;
}

/* Responsividade */
@media (max-width: 1200px) {
    .team-grid-new {
        gap: 12px;
    }
    
    .team-slot-new {
        flex: 0 0 clamp(140px, 18vw, 180px);
    }
}

@media (max-width: 768px) {
    .power-value {
        font-size: 2rem;
    }
    
    .power-icon {
        font-size: 2.5rem;
    }
    
    .team-grid-new {
        gap: 10px;
    }
    
    .team-slot-new {
        flex: 0 0 clamp(120px, 28vw, 170px);
        padding: 12px;
    }
    
    .slot-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .position-toggle {
        padding: 4px 8px;
        font-size: 0.6rem;
    }
    
    .toggle-text {
        display: none;
    }
    
    .team-creatures-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .team-power-display {
        padding: 15px;
    }
    
    .power-box {
        gap: 15px;
    }
    
    .power-value {
        font-size: 1.8rem;
    }
    
    .team-slot-new {
        flex: 0 0 clamp(100px, 40vw, 140px);
        padding: 10px;
    }
    
    .team-creatures-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
}
