/* Professional Random Team Maker Styles */

.team-maker-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

/* Team Configuration */
.team-config {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.team-config h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.team-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.team-count-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-count-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.team-count-group input {
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.team-count-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Team Names Container */
.team-names-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.team-name-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-name-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.team-name-group input {
    padding: 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.team-name-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Distribution Options */
.distribution-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.distribution-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    position: relative;
}

.distribution-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.distribution-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(245, 57, 57, 0.05), rgba(251, 145, 47, 0.05));
    box-shadow: 0 4px 12px rgba(245, 57, 57, 0.15);
}

.distribution-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.distribution-option label {
    cursor: pointer;
    margin: 0;
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.distribution-option .option-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: block;
}

.distribution-option .option-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.distribution-option .option-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.distribution-option.selected .option-icon {
    background: var(--primary-color);
    color: white;
}

/* Teams Display */
.teams-display-section {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: none;
}

.teams-display-section.show {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.teams-header {
    text-align: center;
    margin-bottom: 2rem;
}

.teams-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.teams-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.teams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.team-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.team-members {
    list-style: none;
    padding: 0;
    margin: 0;
}

.team-members li {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.team-members li:hover {
    background: var(--bg-tertiary);
}

.team-members li:last-child {
    margin-bottom: 0;
}

/* Team Actions */
.teams-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.team-action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(245, 57, 57, 0.3);
}

.team-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 57, 57, 0.4);
}

.team-action-btn.secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.team-action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.4);
}

.team-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Copy Success Animation */
.copy-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
.team-maker-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.team-maker-container.loading .team-card {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-settings {
        grid-template-columns: 1fr;
    }
    
    .teams-container {
        grid-template-columns: 1fr;
    }
    
    .teams-actions {
        flex-direction: column;
    }
    
    .team-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .team-names-container {
        grid-template-columns: 1fr;
    }
    
    .distribution-options {
        gap: 0.75rem;
    }
    
    .distribution-option {
        padding: 0.75rem;
    }
    
    .distribution-option .option-icon {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .team-config {
        padding: 1rem;
    }
    
    .teams-display-section {
        padding: 1rem;
    }
    
    .team-card {
        padding: 1rem;
    }
}

/* Accessibility */
.team-action-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.team-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.distribution-option:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.distribution-option input[type="radio"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .teams-display-section.show {
        animation: none;
    }
    
    .team-maker-container.loading .team-card {
        animation: none;
    }
    
    .copy-success {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}
