/* Matchmaking Styles - Maximum UI/UX */

:root {
    --primary: #e63946;
    --secondary: #457b9d;
    --success: #2a9d8f;
    --warning: #f4a261;
    --danger: #e63946;
    --dark: #1d3557;
    --light: #f1faee;
    --gold: #ffd60a;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
    --shadow-xl: 0 12px 48px rgba(0,0,0,0.25);
}

/* Container */
.matchmaking-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* Header */
.matchmaking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--primary);
    animation: slideDown 0.6s ease;
}

.header-content .title-main {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    animation: glow 2s ease-in-out infinite;
}

.header-content .subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-top: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Modern Buttons */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern.btn-primary {
    background: linear-gradient(135deg, var(--primary), #d62839);
    color: white;
}

.btn-modern.btn-success {
    background: linear-gradient(135deg, var(--success), #208074);
    color: white;
}

.btn-modern.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-modern.btn-warning {
    background: linear-gradient(135deg, var(--warning), #ee8f3d);
    color: white;
}

.btn-modern.btn-danger {
    background: linear-gradient(135deg, var(--danger), #d62839);
    color: white;
}

.btn-modern.btn-info {
    background: linear-gradient(135deg, var(--secondary), #3a6785);
    color: white;
}

.btn-modern.btn-ghost {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-modern.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-modern.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-modern.btn-create {
    background: linear-gradient(135deg, #6a00f4, #c200fb);
    color: white;
    font-size: 1.3rem;
    padding: 1.2rem 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

/* Alert */
.alert-modern {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    animation: slideDown 0.4s ease;
}

.alert-modern.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid var(--success);
}

/* Filters Panel */
.filters-panel {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.filters-form {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
}

.filter-group.flex-grow {
    flex: 2;
}

.filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.filter-select, .filter-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* Selected Fighters Panel */
.selected-fighters {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.4s ease;
}

.selected-content h3 {
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.selected-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.selected-slot {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.selected-slot .empty-text {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.mini-fighter {
    text-align: center;
    color: white;
    position: relative;
    padding: 1rem;
}

.mini-fighter strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.mini-fighter span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.remove-fighter-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.remove-fighter-btn:hover {
    background: rgba(230, 57, 70, 0.9);
    transform: scale(1.1);
}

.vs-badge {
    background: white;
    color: var(--primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: rotate 4s linear infinite;
}

/* Fighters Grid */
.fighters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.fighter-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease;
}

.fighter-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.fighter-card.selected {
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.2), var(--shadow-xl);
}

.fighter-header {
    background: linear-gradient(135deg, var(--dark), var(--secondary));
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fighter-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    border: 3px solid white;
}

.weight-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
}

.fighter-body {
    padding: 1.5rem;
}

.fighter-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    color: var(--dark);
}

.fighter-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: #495057;
}

.fighter-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 700;
    color: var(--dark);
    margin-top: 0.25rem;
}

.fighter-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    text-align: center;
    border-top: 2px solid #e9ecef;
}

.select-text {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Match Preview */
.match-preview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: center;
}

.fighter-preview {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.6s ease;
}

.fighter-preview.left {
    animation-delay: 0.1s;
}

.fighter-preview.right {
    animation-delay: 0.2s;
}

.preview-header {
    background: linear-gradient(135deg, var(--dark), var(--secondary));
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: 1px;
}

.preview-body {
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-preview {
    color: #adb5bd;
    font-weight: 600;
    text-align: center;
}

.fighter-preview-card {
    text-align: center;
}

.fighter-initials-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-lg);
}

.fighter-preview-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
}

.preview-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge-large {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.preview-record {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.preview-gym {
    color: #6c757d;
}

.vs-section {
    display: flex;
    justify-content: center;
}

.vs-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--danger));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 2rem;
    box-shadow: var(--shadow-xl);
    animation: pulse 2s ease-in-out infinite;
}

/* Form Section */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.7s ease;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 800;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #333 !important;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff !important;
    color: #000000 !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary) !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2) !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-control::placeholder {
    color: #666 !important;
    opacity: 1;
}

/* Title Fight Toggle */
.title-fight-toggle {
    margin: 2rem 0;
}

.toggle-container {
    display: inline-flex;
    align-items: center;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ced4da;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

input[type="checkbox"]:checked + .toggle-label .toggle-switch {
    background: linear-gradient(135deg, var(--gold), #e6b800);
}

input[type="checkbox"]:checked + .toggle-label .toggle-switch::before {
    transform: translateX(30px);
}

.toggle-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.match-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
    position: relative;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.match-card.title-fight {
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.2), var(--shadow-lg);
}

.title-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--gold), #e6b800);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    z-index: 10;
    animation: glow 2s ease-in-out infinite;
}

.match-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--dark), var(--secondary));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-status {
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.match-status.status-geplant {
    background: rgba(255, 193, 7, 0.9);
    color: #664d03;
}

.match-status.status-abgeschlossen {
    background: rgba(25, 135, 84, 0.9);
    color: white;
}

.match-fighters {
    padding: 2rem;
}

.match-fighter {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fighter-initials-medium {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.fighter-details {
    flex: 1;
}

.fighter-details h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 800;
    color: var(--dark);
}

.fighter-meta {
    color: #6c757d;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.25rem;
}

.fighter-gym {
    color: #adb5bd;
    font-size: 0.85rem;
}

.vs-divider {
    text-align: center;
    margin: 1rem 0;
    position: relative;
}

.vs-divider::before,
.vs-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, transparent, #e9ecef, transparent);
}

.vs-divider::before {
    left: 0;
}

.vs-divider::after {
    right: 0;
}

.vs-divider span {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 800;
    display: inline-block;
}

.match-date, .match-notes {
    padding: 0 2rem 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.match-actions {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    gap: 0.5rem;
    border-top: 2px solid #e9ecef;
}

/* Status Tabs */
.status-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.status-tab {
    padding: 1rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    font-weight: 700;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.status-tab:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.status-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--danger));
    color: white;
    border-color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.6s ease;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Form Styles */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.form-section h3 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #333 !important;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff !important;
    color: #000000 !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary) !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2) !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-control::placeholder {
    color: #666 !important;
    opacity: 1;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #333 !important;
}

select.form-control option {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 0.5rem;
}

select.form-control:focus {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-control option:checked {
    background-color: #e63946 !important;
    color: #ffffff !important;
}

.form-control option:hover {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    border: 2px solid #333 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

textarea.form-control:focus {
    border-color: var(--primary) !important;
    border-width: 3px !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

input[type="number"].form-control,
input[type="datetime-local"].form-control,
input[type="text"].form-control {
    border: 2px solid #333 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.info-display {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: var(--dark);
    border: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 968px) {
    .matchmaking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .fighters-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .match-preview {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .vs-circle {
        order: 2;
        margin: 0 auto;
    }

    .fighter-preview.left {
        order: 1;
    }

    .fighter-preview.right {
        order: 3;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .selected-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .vs-badge {
        margin: 0 auto;
    }

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn-modern {
        flex: 1;
    }
}

