/* Team Shuffle Interface Styles */

.pre-match-confirmation {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h2 {
    color: #2196F3;
    margin-bottom: 10px;
}

.instruction {
    color: #666;
    font-size: 16px;
    margin-top: 10px;
}

.teams-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.team-box {
    flex: 1;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
}

.team-1 {
    border: 3px solid #4CAF50;
}

.team-2 {
    border: 3px solid #2196F3;
}

.team-box h3 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 16px;
    text-transform: uppercase;
    color: #666;
}

.player-slot {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    min-height: 60px;
    transition: all 0.2s ease;
    border: 2px solid #2196F3;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.player-slot:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    background: #e3f2fd;
}

.player-slot.dragging {
    background: #E3F2FD;
    border: 2px dashed #90CAF9;
    opacity: 0.5;
}

.player-slot.dragging .player-name {
    color: #90CAF9;
}

.player-slot.dragging .drag-handle {
    color: #90CAF9;
}

.player-slot.drop-target {
    background: #E3F2FD;
    border-color: #1976D2;
    border-style: dashed;
    transform: scale(1.02);
}

.player-slot.drop-target-hover {
    background: #BBDEFB;
    border-color: #1565C0;
    border-style: solid;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

@keyframes pulse-drag {
    0%, 100% { box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4); }
    50% { box-shadow: 0 8px 30px rgba(33, 150, 243, 0.6); }
}

/* Floating clone that follows finger on mobile */
.floating-clone {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    background: #2196F3;
    border: 2px solid #1565C0;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(33, 150, 243, 0.5);
    transform: scale(1.05) rotate(2deg);
    opacity: 0.95;
}

.floating-clone .player-name {
    color: white;
}

.floating-clone .drag-handle {
    color: rgba(255, 255, 255, 0.8);
}

.player-slot.swapped {
    animation: flash 0.4s ease;
}

@keyframes flash {
    0%, 100% { background: white; }
    50% { background: #FFF9C4; }
}

.player-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.drag-handle {
    font-size: 20px;
    color: #999;
    cursor: grab;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.vs-divider {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    flex-shrink: 0;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-large {
    flex: 1;
    padding: 15px 40px;
    font-size: 18px;
}

.flash-messages {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    margin: 20px 0;
}

.flash-message {
    color: #856404;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .teams-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .team-box {
        width: 95%;
        max-width: 400px;
    }

    .vs-divider {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .player-slot {
        min-height: 70px; /* Larger touch targets */
        padding: 20px 15px;
    }

    .btn-large {
        padding: 18px 30px;
        font-size: 16px;
    }
}
