/* Match Recording Form Styles */
.match-maps-accordion {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
}

.match-map-row {
    border-bottom: 1px solid var(--bs-border-color);
}

.match-map-row:last-child {
    border-bottom: none;
}

.match-map-row .accordion-header {
    background: var(--bs-dark);
    border-radius: 0.375rem;
}

.match-map-row .accordion-body {
    background: var(--bs-dark);
    border-top: 1px solid var(--bs-border-color);
}

.hero-selection-display {
    min-height: 40px;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-selection-display img.mini-hero-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-stats-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

.w-15 {
    width: 15% !important;
}

/* Match Form Sections */
.match-form-section {
    background: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.match-form-section-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.match-form-section-body {
    padding: 1rem;
}

/* Control Points List */
.control-points-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.control-points-list .d-flex:not(:last-child) {
    margin-bottom: 0.5rem;
}

/* Player Stats Table */
.player-stats-body tr {
    background: rgba(0, 0, 0, 0.2);
}

.player-stats-body tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Form Controls in Dark Theme */
.bg-dark .form-control,
.bg-dark .form-select {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.bg-dark .form-control:focus,
.bg-dark .form-select:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--bs-primary);
}

/* Hero Selection Modal */
.hero-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.hero-icon-container {
    text-align: center;
    cursor: pointer;
}

.hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.hero-icon.selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px var(--bs-primary);
}

.hero-icon-container:hover .hero-icon:not(.selected) {
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-name {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    color: var(--bs-body-color);
}

/* Hero Picker Modal */
.hero-picker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.hero-role-section {
    flex: 1 1 200px;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.role-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.role-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}

.role-icon.tank {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M12 2L2 7v9c0 3 2.5 5.8 5.5 7L12 22l4.5-1c3-1.2 5.5-4 5.5-7V7L12 2z"/></svg>');
    background-size: 90%;
    background-position: center;
}

.role-icon.damage,
.role-icon.dps {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M7 2v11h3v9l7-12h-4l4-8H7z"/></svg>');
}

.role-icon.support {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>');
}

.hero-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.4rem;
    padding: 0.5rem;
}

.hero-icon-container {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.hero-icon-container:hover {
    transform: scale(1.05);
}

.hero-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.hero-icon.selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px var(--bs-primary);
}

.hero-name {
    display: block;
    font-size: 0.7rem;
    margin-top: 0.2rem;
    color: var(--bs-body-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Map Details Layout */
.map-details-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 1rem;
    height: 100%;
}

.hero-selection-display {
    min-height: 40px;
    max-height: 80px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-selection-display img.mini-hero-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Map Row Header */
.match-map-row .accordion-header {
    background: var(--bs-dark);
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.match-map-row .form-select-sm,
.match-map-row .form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.match-map-row .form-check {
    margin: 0;
}

.match-map-row .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Control Points */
.control-points-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.control-points-list .d-flex {
    margin-bottom: 0.5rem;
}

.control-points-list .d-flex:last-child {
    margin-bottom: 0;
}

/* Player Stats Table */
.player-stats-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

.table-dark {
    background-color: transparent;
}

.table-dark th {
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.875rem;
    font-weight: 600;
}

.table-dark td {
    padding: 0.5rem;
    vertical-align: middle;
}

/* Map Selection Modal Styles */
#mapSelectModal .modal-content {
    background: rgba(30, 30, 40, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#mapSelectModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#mapSelectModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Game Mode Cards */
.game-mode-card {
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.game-mode-card.selected {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Map Selection Cards */
.map-card-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-card-select:hover {
    background: rgba(255, 255, 255, 0.02);
}

.map-card-select.selected {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    border-color: var(--bs-primary);
}

.map-icon-wrapper {
    transition: all 0.3s ease;
}

.map-card-select:hover .map-icon-wrapper {
    transform: scale(1.05);
}

.map-card-select.selected .map-icon-wrapper {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Map Select Button */
.match-map-select-btn {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
    text-align: left !important;
    position: relative !important;
}

.match-map-select-btn:hover {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 159, 28, 0.4) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 159, 28, 0.15) !important;
}

.match-map-select-btn::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    opacity: 0.7;
}

.match-map-name-display {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 1.5rem;
}

/* Map Selection Styles */
.match-map-name {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.match-map-name:focus {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-color: var(--bs-primary) !important;
}

.match-map-name optgroup {
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--bs-primary);
    font-weight: 600;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.match-map-name option {
    background-color: var(--bs-dark);
    color: var(--bs-body-color);
    padding: 0.5rem;
}

.match-map-name option:hover,
.match-map-name option:focus {
    background-color: var(--bs-primary);
    color: white;
}

.match-map-name::-webkit-scrollbar {
    width: 8px;
}

.match-map-name::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.match-map-name::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
}

.match-map-name::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Who Bans First Toggle Styles */
.ban-first-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
}

.ban-first-toggle .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.ban-first-toggle .form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.ban-first-option {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
}

.ban-first-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.ban-first-option.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.ban-first-label {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.ban-first-label.text-success.border-success {
    color: #198754 !important;
    border-color: #198754 !important;
    background-color: rgba(25, 135, 84, 0.1);
}

.ban-first-label.text-danger.border-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Ban display styling based on who bans first */
.our-bans-display.border-success {
    border-color: #198754 !important;
    border-width: 2px !important;
    background-color: rgba(25, 135, 84, 0.05);
}

.their-bans-display.border-danger {
    border-color: #dc3545 !important;
    border-width: 2px !important;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-label.text-success {
    color: #198754 !important;
    font-weight: 600;
}

.form-label.text-danger {
    color: #dc3545 !important;
    font-weight: 600;
    background: var(--bs-primary-dark);
}

/* Matches page filter widths - make them longer */
#matchSearchFilterRow .col-auto {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#matchSearchFilterRow #matchModeFilter {
    min-width: 135px !important;
    width: auto !important;
}

#matchSearchFilterRow #clearMatchFiltersBtn {
    min-width: 140px !important;
    width: auto !important;
}

#matchSearchFilterRow .form-label {
    display: block;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

/* Wider Hero Select Modal */
.hero-select-modal-dialog {
    max-width: 900px;
}

.hero-select-modal-body {
    padding: 1.5rem;
}

/* Enhanced Map-by-Map Breakdown UI Styles */
.map-breakdown-enhanced {
    border-radius: var(--bs-border-radius);
    transition: background-color 0.2s ease;
}

.map-breakdown-enhanced:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.breakdown-hero-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.our-comp-heroes:hover .breakdown-hero-icon,
.their-comp-heroes:hover .breakdown-hero-icon {
    transform: scale(1.1);
}

@media (min-width: 768px) {
    .breakdown-hero-icon {
        width: 44px;
        height: 44px;
    }
}

/* Fix select element padding */
.match-map-first-fight {
    background-position: right 0.25rem center !important;
    padding-right: 1.25rem !important;
}

/* --- Map-by-Map UI Redesign 2026 --- */

/* Modern Map Card */
.map-card-modern {
    background: var(--bs-dark);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    margin-bottom: 1rem;
}

.map-card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Pill Toggle Buttons */
.pill-toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pill-toggle-btn {
    border: none;
    background: transparent;
    color: var(--bs-gray-500);
    padding: 0.25rem 0.75rem;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pill-toggle-btn:hover {
    color: var(--bs-light);
}

.pill-toggle-btn.active.success {
    background: var(--bs-success);
    color: #fff;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.3);
}

.pill-toggle-btn.active.danger {
    background: var(--bs-danger);
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.pill-toggle-btn.active.secondary {
    background: var(--bs-secondary);
    color: #fff;
}

/* Hero Cards (Comp Display) */
.hero-card-modern {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: 1px solid rgba(0, 0, 0, 0.5);
    outline-offset: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    background-size: cover;
    background-position: center;
}

.hero-card-modern:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-card-modern .remove-hero-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--bs-danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.hero-card-modern:hover .remove-hero-btn {
    opacity: 1;
}

.hero-card-modern .remove-hero-btn:hover {
    transform: scale(1.1);
}

.hero-card-modern.empty-slot {
    border: 1px dashed rgba(255, 255, 255, 0.3);
    outline: none;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.hero-card-modern.empty-slot:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.hero-card-modern.skeleton {
    animation: pulse 1.5s infinite;
}

/* Inline Hero Selector panel */
.inline-hero-selector {
    background: var(--bs-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    margin-top: 0.5rem;
    position: relative;
    max-width: 450px;
}

.inline-hero-selector .search-bar {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 100%;
}

.inline-hero-selector .search-icon {
    position: absolute;
    left: 24px;
    top: 24px;
    color: rgba(255, 255, 255, 0.4);
}

.inline-hero-selector .role-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 8px;
}

.inline-hero-selector .role-tab {
    flex: 1;
    text-align: center;
    padding: 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.inline-hero-selector .role-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
}

.inline-hero-selector .hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.inline-hero-selector .hero-mini-card {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: 1px solid rgba(0, 0, 0, 0.5);
    outline-offset: -1px;
    transition: transform 0.1s ease, border-color 0.1s ease;
    background-size: cover;
    background-position: center;
}

.inline-hero-selector .hero-mini-card:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.inline-hero-selector .hero-mini-card.selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.5);
    opacity: 0.5;
    pointer-events: none;
}

/* Modifiers */
.comp-incomplete {
    border-color: rgba(220, 53, 69, 0.5) !important;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.2);
}

/* Notes Textarea */
.notes-textarea-modern {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    resize: none;
    overflow: hidden;
    min-height: 60px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.notes-textarea-modern:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

.notes-tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notes-tag-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Player Stats Editable Table */
.editable-cell {
    background: transparent;
    border: 1px solid transparent;
    color: white;
    width: 100%;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.editable-cell:hover,
.editable-cell:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

.player-stats-table-modern thead th {
    position: sticky;
    top: 0;
    background: #1e1e24;
    z-index: 10;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.player-stats-table-modern td {
    vertical-align: middle;
}

.table-action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.25rem;
}

.table-action-btn:hover {
    color: white;
}

.table-action-btn.danger:hover {
    color: var(--bs-danger);
}

/* Custom scrollbar for inline hero picker */
.inline-hero-selector .hero-grid::-webkit-scrollbar {
    width: 6px;
}

.inline-hero-selector .hero-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.inline-hero-selector .hero-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.inline-hero-selector .hero-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* OCR Scanning Animation */
.ocr-scanning-container {
    position: relative;
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.ocr-scanning-image-preview {
    max-height: 100%;
    max-width: 100%;
    opacity: 0.5;
    filter: grayscale(100%) contrast(150%);
}

.ocr-scanning-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #0d6efd;
    box-shadow: 0 0 15px 5px rgba(13, 110, 253, 0.6);
    animation: scan-laser 2s infinite linear alternate;
    z-index: 10;
}

@keyframes scan-laser {
    0% {
        top: -5%;
    }

    100% {
        top: 105%;
    }
}

/* --- Premium Match Cards Redesign --- */
.match-card-premium {
    background: #080c14;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.match-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.match-card-header {
    padding: 0.7rem 0.9rem 0.6rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
    background-color: #080c14;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

/* Header Type Accents using borders or gradients */
.match-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

.match-card-header.match-type-match::before {
    background: linear-gradient(90deg, #ff6b6b, #ff9f1c);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.match-card-header.match-type-scrim::before {
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
}

.match-card-header.match-type-mix::before {
    background: linear-gradient(90deg, #9b5de5, #f15bb5);
    box-shadow: 0 0 10px rgba(155, 93, 229, 0.5);
}

.match-card-header.match-type-warmup::before {
    background: linear-gradient(90deg, #00f5d4, #00bbf9);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.match-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 2;
}

.match-card-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -2px;
    background: linear-gradient(180deg, rgba(8, 12, 20, 0.35), rgba(8, 12, 20, 1));
    z-index: 2;
}

.match-header-gallery {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 3px;
    z-index: 0;
    clip-path: inset(0 0 4px 0);
}

.match-header-gallery__item {
    background-size: cover;
    background-position: center;
    filter: saturate(1.05) contrast(1.05);
}

.match-header-gallery::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -2px;
    background: linear-gradient(90deg, rgba(10, 16, 26, 0.75), rgba(10, 16, 26, 0.2) 40%, rgba(10, 16, 26, 0.72));
    pointer-events: none;
}

.match-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.match-type-indicator {
    font-size: 0.56rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    align-self: flex-start;
    padding: 0.12rem 0.35rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.match-type-indicator.match {
    background: rgba(255, 107, 107, 0.2);
    color: #ff8787;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.match-type-indicator.scrim {
    background: rgba(76, 201, 240, 0.2);
    color: #4cc9f0;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.match-type-indicator.mix {
    background: rgba(155, 93, 229, 0.2);
    color: #d0bfff;
    border: 1px solid rgba(155, 93, 229, 0.3);
}

.match-opponent-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 320px;
}

.match-score-group {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.match-score-display {
    font-size: 1.05rem;
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    letter-spacing: 0.8px;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.score-divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

.match-result-badge {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.16rem 0.42rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.result-win {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.4));
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

.result-loss {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.4));
    color: #ff6b6b;
    border: 1px solid rgba(231, 76, 60, 0.3);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.result-draw {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(243, 156, 18, 0.4));
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.match-date-meta {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.match-header-meta-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.8);
}

.match-header-thumbs {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.match-header-thumb {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.match-card-body {
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    flex-grow: 1;
    margin-top: -1px;
    position: relative;
    z-index: 1;
}

.match-maps-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    /* Hide scrollbar for clean look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.match-maps-container::-webkit-scrollbar {
    display: none;
}

.match-map-pill {
    position: relative;
    width: auto;
    min-width: 85px;
    height: 38px;
    padding: 0 12px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.match-map-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.match-map-pill.result-win {
    border-color: rgba(46, 204, 113, 0.5);
}

.match-map-pill.result-loss {
    border-color: rgba(231, 76, 60, 0.5);
}

.match-map-pill.result-draw {
    border-color: rgba(241, 196, 15, 0.5);
}

.map-pill-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7) saturate(1.2);
    transition: filter 0.3s ease;
}

.match-map-pill:hover .map-pill-bg {
    filter: brightness(0.9) saturate(1.4);
}

.map-pill-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.match-map-pill.result-win .map-pill-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(46, 204, 113, 0.2) 100%);
}

.match-map-pill.result-loss .map-pill-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(231, 76, 60, 0.2) 100%);
}

.map-pill-content {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
    z-index: 2;
    white-space: nowrap;
    gap: 8px;
}

.map-pill-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.map-pill-score {
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.match-card-footer {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.btn-match-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.btn-match-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-match-action.action-delete {
    flex: 0 0 auto;
    width: 40px;
    padding: 0;
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

.btn-match-action.action-delete:hover {
    background: rgba(231, 76, 60, 0.8);
    color: #fff;
    border-color: #e74c3c;
}

.recently-modified-badge {
    color: #f1c40f;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

/* --- Premium Map Details Modal --- */
#detailModal .modal-content {
    background: #1a1a24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

#detailModal .modal-header {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
}

#detailModalBody {
    padding: 0;
}

.map-modal-premium-layout {
    display: flex;
    flex-direction: column;
    background: #1a1a24;
}

.map-modal-hero-banner {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center 20%;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-modal-banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-modal-map-name {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.map-modal-match-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.map-modal-match-badges .badge {
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

/* Stats Bar */
.map-modal-stats-bar {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-modal-stat-box {
    flex: 1;
    padding: 1rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.map-modal-stat-box:last-child {
    border-right: none;
}

.stat-box-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.stat-box-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

/* Sections */
.map-modal-section-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Progress */
.map-modal-progress-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-modal-points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.map-modal-point-card,
.map-modal-distance-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.point-card-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 4px;
}

.progress-bar-container {
    margin-bottom: 0.5rem;
}

.progress-bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.custom-progress-bg {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.custom-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Heros & Bans */
.map-modal-comps-container,
.map-modal-bans-container {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-modal-comps-grid,
.map-modal-bans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.map-modal-hero-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.map-modal-hero-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.flex-row-title {
    color: #ff6b6b !important;
}

.map-modal-hero-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.map-modal-hero-icon {
    width: 44px;
    height: 44px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.map-modal-hero-icon:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Notes */
.map-modal-notes-section {
    padding: 1.5rem;
    background: rgba(255, 193, 7, 0.05);
}

.map-modal-notes-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.map-modal-notes-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.1);
}

/* --- Premium Edit Match Form --- */
.premium-form-container {
    background: rgba(18, 18, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.premium-form-header {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0));
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-form-panel {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.premium-panel-body {
    padding: 1.25rem;
}

.premium-input,
.premium-select,
.notes-textarea-modern {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.premium-input:focus,
.premium-select:focus,
.notes-textarea-modern:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(13, 110, 253, 0.6) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
}

.premium-select option {
    background-color: #1e1e2d;
    color: #fff;
}

.premium-map-row {
    background: rgba(18, 18, 24, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s;
}

.premium-map-row:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.premium-map-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-map-body {
    padding: 1rem;
}

.premium-map-comp-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    flex: 1;
}

.premium-btn {
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.premium-btn-sm {
    border-radius: 6px;
    font-weight: 600;
}