/* Reset and Base Styles */
* {
  margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e2e8f0 100%);
    background-attachment: fixed;
  color: #333;
    line-height: 1.6;
    
    /* Smooth appearance animation */
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth page load animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
        transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    
    /* Subtle container animation */
    animation: containerSlideIn 1s ease-out 0.2s both;
}

/* Container slide-in animation */
@keyframes containerSlideIn {
  from {
    opacity: 0;
        transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header Styles - 3D Enhanced */
header {
    background: linear-gradient(145deg, #2c5aa0, #1e3a8a);
    color: white;
    padding: 20px 0;
  margin-bottom: 30px;
    border-radius: 12px;
    position: relative;
  overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 10px 20px rgba(44, 90, 160, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Subtle inner glow */
    background-image: linear-gradient(145deg, #2c5aa0, #1e3a8a),
                      radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

/* Add animated background pattern */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
    flex-wrap: wrap;
}



h1 {
    font-size: 2.5rem;
  font-weight: bold;
    text-align: center;
    margin: 0;
    position: relative;
    z-index: 1;
    
    /* 3D Text Effects */
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.1);
    
    /* Subtle glow effect */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

h2 {
    font-size: 1.8rem;
    color: #2c5aa0;
    margin-bottom: 20px;
  text-align: center;
}

/* Section Styles - 3D Enhanced */
.selection-section {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
  padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    position: relative;
    
    /* 3D Effects */
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateZ(0) perspective(1000px);
}

/* Player Grid */
.players-grid {
  display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.player-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 6px;
    text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
  font-weight: 500;
    min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  word-wrap: break-word;
    line-height: 1.2;
    position: relative;
    
    /* 3D Effects */
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    
    transform: translateZ(0) perspective(1000px);
}

.player-card:hover {
    transform: translateY(-3px) translateZ(10px) perspective(1000px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.1),
        0 3px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border-color: #cbd5e1;
}

.player-card.selected {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    border-color: #1d4ed8;
    
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.player-card.selected:hover {
    transform: translateY(-3px) translateZ(10px) perspective(1000px);
    background: linear-gradient(145deg, #60a5fa, #1d4ed8);
    
    box-shadow: 
        0 6px 12px rgba(59, 130, 246, 0.4),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Lane Grid */
.lanes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.lane-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px solid #e0e0e0;
  border-radius: 10px;
    padding: 20px;
  text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2rem;
  font-weight: bold;
    position: relative;
    
    /* 3D Effects */
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    
    transform: translateZ(0) perspective(1000px);
}

.lane-card:hover {
    transform: translateY(-4px) translateZ(15px) perspective(1000px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border-color: #cbd5e1;
}

.lane-card.selected {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
    border-color: #b91c1c;
    
    box-shadow: 
        0 6px 12px rgba(239, 68, 68, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lane-card.selected:hover {
    transform: translateY(-4px) translateZ(15px) perspective(1000px);
    background: linear-gradient(145deg, #f87171, #b91c1c);
    
    box-shadow: 
        0 8px 16px rgba(239, 68, 68, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Counter Styles */
.counter {
  text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5aa0;
    padding: 10px;
    background: #f8fafc;
  border-radius: 8px;
}

/* Button Styles - 3D Enhanced */
.assign-btn, .confirm-btn, .export-btn, .whatsapp-btn {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 10px;
    position: relative;
    overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 8px 16px rgba(59, 130, 246, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Light reflection on top */
    background-image: linear-gradient(145deg, #3b82f6, #1d4ed8),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

/* Special red style for compose teams button */
#compose-teams-btn.assign-btn {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    box-shadow: 
        0 8px 16px rgba(239, 68, 68, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background-image: linear-gradient(145deg, #ef4444, #dc2626),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

#compose-teams-btn.assign-btn:hover {
    background: linear-gradient(145deg, #f87171, #ef4444);
    box-shadow: 
        0 12px 24px rgba(239, 68, 68, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Animated shine effect */
.assign-btn::before, .confirm-btn::before, .export-btn::before, .whatsapp-btn::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.5s ease;
}

.assign-btn:hover, .confirm-btn:hover, .export-btn:hover, .whatsapp-btn:hover {
    transform: translateY(-4px) translateZ(20px) perspective(1000px);
    box-shadow: 
        0 12px 24px rgba(59, 130, 246, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    background: linear-gradient(145deg, #60a5fa, #2563eb);
}

.assign-btn:hover::before, .confirm-btn:hover::before, .export-btn:hover::before, .whatsapp-btn:hover::before {
    left: 100%;
}

.assign-btn:active, .confirm-btn:active, .export-btn:active, .whatsapp-btn:active {
    transform: translateY(-1px) translateZ(5px) perspective(1000px);
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.assign-btn:disabled {
    background: linear-gradient(145deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    transform: none;
    box-shadow: 
        0 2px 4px rgba(156, 163, 175, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* WhatsApp Button Special Styling */
.whatsapp-btn {
    background: linear-gradient(145deg, #25d366, #128c7e) !important;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 10px;
    position: relative;
    overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 8px 16px rgba(37, 211, 102, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Light reflection on top */
    background-image: linear-gradient(145deg, #25d366, #128c7e),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

.whatsapp-btn:hover {
    transform: translateY(-4px) translateZ(20px) perspective(1000px);
    box-shadow: 
        0 12px 24px rgba(37, 211, 102, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    background: linear-gradient(145deg, #2ed573, #1e9b6b) !important;
}

.whatsapp-btn:active {
    transform: translateY(-1px) translateZ(5px) perspective(1000px);
    box-shadow: 
        0 4px 8px rgba(37, 211, 102, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Edit and Apply Button Styles - 3D Enhanced */
.edit-btn {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 10px;
    position: relative;
    overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 6px 12px rgba(245, 158, 11, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    background-image: linear-gradient(145deg, #f59e0b, #d97706),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

.edit-btn::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.5s ease;
}

.edit-btn:hover {
    transform: translateY(-3px) translateZ(15px) perspective(1000px);
    box-shadow: 
        0 8px 16px rgba(245, 158, 11, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    background: linear-gradient(145deg, #fbbf24, #ea580c);
}

.edit-btn:hover::before {
    left: 100%;
}

.edit-btn:active {
    transform: translateY(-1px) translateZ(5px) perspective(1000px);
    box-shadow: 
        0 3px 6px rgba(245, 158, 11, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Recompose Button Styles - 3D Enhanced */
.recompose-btn {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 10px;
    position: relative;
    overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 8px 16px rgba(239, 68, 68, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Light reflection on top */
    background-image: linear-gradient(145deg, #ef4444, #dc2626),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

/* Animated shine effect */
.recompose-btn::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.5s ease;
}

.recompose-btn:hover {
    transform: translateY(-4px) translateZ(20px) perspective(1000px);
    box-shadow: 
        0 12px 24px rgba(239, 68, 68, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    background: linear-gradient(145deg, #f87171, #ef4444);
}

.recompose-btn:hover::before {
    left: 100%;
}

.recompose-btn:active {
    transform: translateY(-1px) translateZ(5px) perspective(1000px);
    box-shadow: 
        0 4px 8px rgba(239, 68, 68, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apply-btn {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 10px;
    position: relative;
    overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 6px 12px rgba(59, 130, 246, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    background-image: linear-gradient(145deg, #3b82f6, #2563eb),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

.apply-btn::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.5s ease;
}

.apply-btn:hover {
    transform: translateY(-3px) translateZ(15px) perspective(1000px);
    box-shadow: 
        0 9px 18px rgba(59, 130, 246, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    background: linear-gradient(145deg, #60a5fa, #1d4ed8);
}

.apply-btn:hover::before {
    left: 100%;
}

.apply-btn:active {
    transform: translateY(-1px) translateZ(5px) perspective(1000px);
    box-shadow: 
        0 3px 6px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.composition-buttons {
    text-align: center;
    margin-top: 20px;
    gap: 10px;
}

/* Manual Composition Section */
#manual-composition-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

#manual-composition-controls {
  display: grid;
    gap: 15px;
  margin-bottom: 20px;
}

.composition-control {
  display: flex;
  align-items: center;
    justify-content: space-between;
  background: white;
  padding: 15px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.composition-control label {
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.composition-control input {
    width: 80px;
  padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
}

.composition-control input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.assignment-section {
    text-align: center;
    margin: 30px 0;
}

.assignment-message {
    background: #10b981;
  color: white;
    padding: 15px 20px;
  border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Special styling for ready assignment message */
.ready-assignment-message {
    background: linear-gradient(145deg, #fbbf24, #f59e0b) !important;
    color: #1e40af !important;
    border: 2px solid #3b82f6;
    font-weight: bold;
    font-size: 1.2rem;
  text-align: center;
    position: relative;
    overflow: hidden;
    padding: 20px 25px;
    border-radius: 12px;
    margin: 25px 0;
    
    /* 3D Effects */
    box-shadow: 
        0 10px 20px rgba(251, 191, 36, 0.4),
        0 6px 12px rgba(59, 130, 246, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    
    /* Combined animations */
    animation: 
        slideTextLeftRight 4s ease-in-out infinite,
        pulseGlow 2s ease-in-out infinite alternate;
    
    /* Text shadow for better readability */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    
    /* Scale slightly for attention */
    transform: scale(1.02);
}

/* Animated background shine */
.ready-assignment-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shineEffect 2s ease-in-out infinite;
    z-index: 0;
}

/* Text sliding animation */
@keyframes slideTextLeftRight {
    0%, 100% { 
        transform: translateX(0);
    }
    25% { 
        transform: translateX(10px);
    }
    75% { 
        transform: translateX(-10px);
    }
}

/* Shine effect animation */
@keyframes shineEffect {
    0% { 
        left: -100%;
    }
    50% { 
        left: 100%;
    }
    100% { 
        left: 100%;
    }
}

/* Pulse glow animation */
@keyframes pulseGlow {
    0% {
        box-shadow: 
            0 10px 20px rgba(251, 191, 36, 0.4),
            0 6px 12px rgba(59, 130, 246, 0.2),
            0 4px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    100% {
        box-shadow: 
            0 15px 30px rgba(251, 191, 36, 0.6),
            0 10px 20px rgba(59, 130, 246, 0.4),
            0 8px 16px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
}

/* Preview Section */
.preview-section {
  background: white;
    padding: 30px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#composition-details {
    background: #f8fafc;
  padding: 20px;
    border-radius: 8px;
  margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Dialog Styles */
.dialog-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-content {
  background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Suggestion Styles */
.suggestion {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    transition: all 0.3s ease;
    
    /* 3D Effects */
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.suggestion:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.suggestion h4 {
    color: #1e40af;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.suggestion p {
    margin: 8px 0;
    color: #374151;
    line-height: 1.5;
}

.suggestion strong {
    color: #1f2937;
    font-weight: 600;
}

/* Impact level indicators - will be applied via JavaScript */
.suggestion.impact-low h4 {
    border-left: 4px solid #10b981;
}

.suggestion.impact-medium h4 {
    border-left: 4px solid #f59e0b;
}

.suggestion.impact-high h4 {
    border-left: 4px solid #ef4444;
}

/* Details section */
.suggestion details {
    margin: 15px 0;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.suggestion details summary {
    padding: 12px 16px;
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s ease;
}

.suggestion details summary:hover {
    background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
    color: #1f2937;
}

.suggestion details[open] summary {
    border-bottom: 1px solid #e5e7eb;
}

.adjustment-details {
    padding: 16px;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
}

.adjustment-details p {
    margin: 6px 0;
    padding: 4px 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.adjustment-details p:first-child {
    margin-top: 0;
}

/* No suggestions styles */
.no-suggestions {
    background: linear-gradient(145deg, #fef2f2, #fee2e2);
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.no-suggestions p {
    margin: 8px 0;
    color: #991b1b;
    line-height: 1.5;
}

.no-suggestions strong {
    color: #7f1d1d;
    font-weight: 600;
}

.no-suggestions ul {
    margin: 10px 0 10px 20px;
    color: #991b1b;
}

.no-suggestions li {
    margin: 5px 0;
    line-height: 1.4;
}

.adjustment-details p:last-child {
    margin-bottom: 0;
}

.cancel-btn {
    background: linear-gradient(145deg, #6b7280, #4b5563);
  color: white;
  border: none;
  padding: 10px 20px;
    border-radius: 8px;
  cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    
    /* 3D Effects */
    box-shadow: 
        0 4px 8px rgba(107, 114, 128, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    background-image: linear-gradient(145deg, #6b7280, #4b5563),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    
    transform: translateZ(0) perspective(1000px);
}

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

.cancel-btn:hover {
    transform: translateY(-2px) translateZ(10px) perspective(1000px);
    box-shadow: 
        0 6px 12px rgba(107, 114, 128, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    background: linear-gradient(145deg, #7c838d, #374151);
}

.cancel-btn:hover::before {
    left: 100%;
}

.cancel-btn:active {
    transform: translateY(-1px) translateZ(3px) perspective(1000px);
    box-shadow: 
        0 2px 4px rgba(107, 114, 128, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Results Section */
.results-section {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    padding: 30px;
    margin: 30px 0;
    border-radius: 12px;
    position: relative;
    
    /* 3D Effects */
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.05),
        0 6px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateZ(0) perspective(1000px);
}

#results-table {
    overflow-x: auto;
    margin-bottom: 20px;
}

.results-table {
    width: 80%;
    margin: 0 auto 20px auto;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 6px;
    text-align: left;
}

.results-table th:first-child,
.results-table td:first-child {
    width: 12%;
    max-width: 80px;
}

.results-table th:not(:first-child),
.results-table td:not(:first-child) {
    width: 44%;
    max-width: 120px;
}

.results-table th {
    background: #2c5aa0;
  color: white;
    font-weight: 600;
}

.results-table tr:nth-child(even) {
    background: #f8fafc;
}

.team-players {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
    padding: 5px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 1.1rem;
}

.team-total {
  font-weight: bold;
    color: #2c5aa0;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #e0e0e0;
}

.team-difference {
  font-weight: normal; 
  margin-top: 10px; 
  text-align: center; 
  padding: 4px; 
  border-radius: 4px; 
  background-color: #f8f9fa; 
  border: 1px solid #dee2e6; 
  color: #6c757d; 
  font-size: 0.9rem; 
  min-width: 30px; 
  display: inline-block; 
}

.results-actions {
    text-align: center;
    margin-top: 20px;
}

/* Message Styles */
#message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #10b981;
    color: white;
}

.message.error {
    background: #ef4444;
    color: white;
}

.message.info {
    background: #3b82f6;
  color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .header-content {
    flex-direction: column;
        text-align: center;
    }
    
    .players-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .lanes-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .dialog-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .results-table {
        width: 95%;
    }
    
    .results-table th:first-child,
    .results-table td:first-child {
        width: 15%;
        max-width: 60px;
    }
    
    .results-table th:not(:first-child),
    .results-table td:not(:first-child) {
        width: 42.5%;
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .players-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .lanes-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .player-card, .lane-card {
        padding: 6px 4px;
        font-size: 0.85rem;
        min-height: 45px;
    }
    
    .results-table {
        width: 98%;
    }
    
    .results-table th:first-child,
    .results-table td:first-child {
        width: 20%;
        max-width: 50px;
    }
    
    .results-table th:not(:first-child),
    .results-table td:not(:first-child) {
        width: 40%;
        max-width: 60px;
    }
}

/* Print Styles */
@media print {
    .assignment-section,
    .selection-section,
    .preview-section,
    .dialog-section,
    .results-actions {
        display: none !important;
    }
    
    .results-section {
        box-shadow: none;
        border: none;
    }
    
    .results-table {
        border: 2px solid #000;
    }
    
    .results-table th,
    .results-table td {
        border: 1px solid #000;
  }
}

/* Clear selection button */
.clear-selection-container {
    text-align: center;
    margin-top: 15px;
}

.clear-btn {
    background: linear-gradient(145deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-btn:hover {
    background: linear-gradient(145deg, #5a6268, #343a40);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.25),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.clear-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.clear-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Visitors Section Styles */
.visitors-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.06);
    animation: slideInUp 0.5s ease-out;
}

.visitors-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.visitor-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visitor-input-group label {
    font-weight: 600;
    color: #2c5aa0;
    font-size: 16px;
}

.visitor-input-group input,
.visitor-input-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.visitor-input-group input:focus,
.visitor-input-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.visitor-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.add-btn {
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 8px rgba(40, 167, 69, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-btn:hover {
    background: linear-gradient(145deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(40, 167, 69, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.back-btn {
    background: linear-gradient(145deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 8px rgba(108, 117, 125, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    background: linear-gradient(145deg, #5a6268, #343a40);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(108, 117, 125, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15);
}



.visitors-list {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.visitors-list h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
    text-align: center;
}

.visitors-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.visitor-card {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.visitor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.visitor-name {
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 8px;
    font-size: 16px;
}

.visitor-rating {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
}

.visitor-role {
    background: linear-gradient(145deg, #2c5aa0, #1e3a8a);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.remove-visitor-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-visitor-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Update clear selection container to accommodate both buttons */
.clear-selection-container {
    text-align: center;
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.visitors-btn {
    background: linear-gradient(145deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 8px rgba(23, 162, 184, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.visitors-btn:hover {
    background: linear-gradient(145deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(23, 162, 184, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.visitors-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(23, 162, 184, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

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

/* Visitor player styling */
.visitor-player {
    border-color: #17a2b8;
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
}

.visitor-player:hover {
    background: linear-gradient(145deg, #bbdefb, #90caf9);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(23, 162, 184, 0.3);
}

.visitor-player.selected {
    background: linear-gradient(145deg, #17a2b8, #138496);
    color: white;
    border-color: #138496;
}