/* TEAM SECTION - LAYOUT REDESIGN */

/* Better Grid Layout for Team Slots */
.team-slots-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 35px;
}

/* Improved Team Slot Design */
.team-slot-new {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.95) 0%, rgba(10, 20, 40, 0.98) 100%);
    border-radius: 24px;
    padding: 25px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.team-slot-new::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.1) 0%, transparent 70%);
    animation: slotGlow 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes slotGlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
    50% { transform: translate(30px, -30px) rotate(180deg); opacity: 0.8; }
}

.team-slot-new:hover {
    transform: translateY(-8px);
    border-color: rgba(79, 195, 247, 0.7);
    box-shadow: 0 12px 40px rgba(79, 195, 247, 0.4);
}

.team-slot-new.selected {
    border-color: rgba(255, 193, 7, 0.8);
    box-shadow: 0 12px 40px rgba(255, 193, 7, 0.5);
}

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

.slot-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #4fc3f7;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3) 0%, rgba(0, 188, 212, 0.3) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(79, 195, 247, 0.5);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

.position-toggle {
    padding: 10px 18px;
    border-radius: 14px;
    border: 2px solid;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.position-toggle.attack {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(211, 47, 47, 0.3) 100%);
    border-color: rgba(244, 67, 54, 0.6);
    color: #ff5252;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.position-toggle.defense {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3) 0%, rgba(25, 118, 210, 0.3) 100%);
    border-color: rgba(33, 150, 243, 0.6);
    color: #42a5f5;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.position-toggle:hover {
    transform: scale(1.08);
}

.toggle-icon {
    font-size: 1.1rem;
}

/* Slot Content Improvements */
.slot-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 18px;
    border: 2px dashed rgba(79, 195, 247, 0.3);
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.slot-content.empty {
    min-height: 200px;
}

.slot-content.filled {
    border-style: solid;
    border-color: rgba(79, 195, 247, 0.6);
    background: rgba(0, 0, 0, 0.5);
}

.slot-content.drag-over {
    border-color: rgba(255, 193, 7, 0.8);
    background: rgba(255, 193, 7, 0.1);
    transform: scale(1.02);
}

/* Slot Stats Display */
.slot-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.stat-value {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    font-weight: 900;
    color: #4fc3f7;
    font-size: 1rem;
    border: 2px solid rgba(79, 195, 247, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Team Management Container */
.team-management-container {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.95) 0%, rgba(20, 30, 50, 0.98) 100%);
    border-radius: 24px;
    padding: 35px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 35px;
}

/* Available Creatures Section */
.available-creatures-section {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.95) 0%, rgba(20, 30, 50, 0.98) 100%);
    border-radius: 24px;
    padding: 35px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.available-creatures-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid rgba(79, 195, 247, 0.3);
}

.available-creatures-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filters Row */
.team-filters-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.filter-select:focus {
    outline: none;
    border-color: rgba(79, 195, 247, 0.8);
}

/* Responsive */
@media (max-width: 1400px) {
    .team-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .team-slots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .team-slots-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team-slot-new {
        min-height: 300px;
    }
    
    .position-toggle {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}
