/* Team Splitter Custom Styling */

/* Glassmorphism Card System */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Custom Textarea styling */
.names-textarea {
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 220px;
    background-color: #fafaf9;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.names-textarea:focus {
    border-color: #ec0088;
    box-shadow: 0 0 0 0.15rem rgba(236, 0, 136, 0.15);
    background-color: #ffffff;
}

/* Quick Tags & Badges */
.preset-badge {
    cursor: pointer;
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preset-badge:hover {
    background-color: #ec0088;
    color: #ffffff;
    transform: translateY(-1px);
}

/* File Upload Area */
.import-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background-color: #f8fafc;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.import-zone:hover, .import-zone.dragover {
    border-color: #ec0088;
    background-color: rgba(236, 0, 136, 0.03);
}

/* Custom Lists Panel */
.saved-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.saved-list-item:hover {
    background-color: #e2e8f0;
}

.saved-list-btn {
    cursor: pointer;
    border: none;
    background: none;
    padding: 2px 6px;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.saved-list-btn.load {
    color: #0f172a;
    font-weight: 500;
}

.saved-list-btn.load:hover {
    color: #ec0088;
}

.saved-list-btn.delete {
    color: #ef4444;
}

.saved-list-btn.delete:hover {
    color: #b91c1c;
}

/* Toggle Switch Styling */
.mode-toggle-container {
    background-color: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    display: flex;
}

.mode-toggle-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s ease;
}

.mode-toggle-btn.active {
    background-color: #ffffff;
    color: #ec0088;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Shuffling Animations Screen */
.shuffle-stage {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.shuffler-deck {
    width: 140px;
    height: 180px;
    position: relative;
    margin-bottom: 24px;
}

.shuffler-card {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ec0088 0%, #a855f7 100%);
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    transition: all 0.4s ease;
    transform-origin: bottom center;
}

/* Infinite fan animation during wait */
.shuffler-card:nth-child(1) { transform: rotate(-8deg); z-index: 3; }
.shuffler-card:nth-child(2) { transform: rotate(0deg); z-index: 2; }
.shuffler-card:nth-child(3) { transform: rotate(8deg); z-index: 1; }

.shuffling .shuffler-card:nth-child(1) { animation: fanCard1 1.2s infinite ease-in-out; }
.shuffling .shuffler-card:nth-child(2) { animation: fanCard2 1.2s infinite ease-in-out; }
.shuffling .shuffler-card:nth-child(3) { animation: fanCard3 1.2s infinite ease-in-out; }

@keyframes fanCard1 {
    0%, 100% { transform: translate(0, 0) rotate(-8deg); }
    50% { transform: translate(-45px, -15px) rotate(-25deg); }
}
@keyframes fanCard2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(0, -25px) rotate(0deg); }
}
@keyframes fanCard3 {
    0%, 100% { transform: translate(0, 0) rotate(8deg); }
    50% { transform: translate(45px, -15px) rotate(25deg); }
}

/* Floating Name Dealing Animation */
.dealing-item {
    position: absolute;
    background-color: #ec0088;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(236,0,136,0.3);
    z-index: 10;
    pointer-events: none;
    animation: dealFlying 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes dealFlying {
    0% {
        transform: translate(var(--start-x), var(--start-y)) scale(0.4);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--end-x), var(--end-y)) scale(1);
        opacity: 0.1;
    }
}

/* Results Workspace & Drag and Drop Board */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-items: start;
    width: 100%;
}

.team-card {
    border-radius: 14px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.team-header {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* Dynamic Colorful Themes for Teams */
.team-theme-red { border-top: 4px solid #ef4444; }
.team-theme-red .team-header { background-color: #fef2f2; color: #b91c1c; }
.team-theme-blue { border-top: 4px solid #3b82f6; }
.team-theme-blue .team-header { background-color: #eff6ff; color: #1d4ed8; }
.team-theme-green { border-top: 4px solid #10b981; }
.team-theme-green .team-header { background-color: #ecfdf5; color: #047857; }
.team-theme-purple { border-top: 4px solid #8b5cf6; }
.team-theme-purple .team-header { background-color: #f5f3ff; color: #6d28d9; }
.team-theme-orange { border-top: 4px solid #f97316; }
.team-theme-orange .team-header { background-color: #fff7ed; color: #c2410c; }
.team-theme-pink { border-top: 4px solid #ec0088; }
.team-theme-pink .team-header { background-color: #fdf2f8; color: #be185d; }
.team-theme-teal { border-top: 4px solid #14b8a6; }
.team-theme-teal .team-header { background-color: #f0fdfa; color: #0f766e; }
.team-theme-indigo { border-top: 4px solid #6366f1; }
.team-theme-indigo .team-header { background-color: #eef2ff; color: #4338ca; }
.team-theme-slate { border-top: 4px solid #64748b; }
.team-theme-slate .team-header { background-color: #f8fafc; color: #334155; }

.team-members-list {
    min-height: 120px;
    padding: 12px;
    background-color: #fdfdfd;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.team-members-list.drag-hover {
    background-color: rgba(236, 0, 136, 0.05);
    outline: 2px dashed #ec0088;
    outline-offset: -4px;
}

/* Draggable Pill Names */
.name-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    margin: 4px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.name-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.name-pill:active {
    cursor: grabbing;
}

.name-pill.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    border-color: #ec0088;
}

/* Highlight badge for count */
.member-count-badge {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    color: inherit;
    font-weight: 600;
}

/* Responsive columns scaling for small screens */
@media (max-width: 991px) {
    .glass-card {
        margin-bottom: 24px;
    }
}
