*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- PREMIUM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- PREMIUM GLASS UTILITY --- */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-md);
}

/* --- GLOBAL INTERACTIONS & ANIMATIONS --- */
button,
.btn,
.card,
a,
.form-control,
.nav-link {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Card Lift Effect */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-brand);
}

/* Global Typography & Spacing */
.btn {
    padding: 12px 24px;
    /* More breathing room */
}

.card {
    padding: 24px;
    /* More breathing room */
}

/* Phase 3: Global Styles Restoration */
[x-cloak] {
    display: none !important;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

@media (max-width: 768px) {
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* 1. Bloquer le scroll global sur la page d'exploration */
body.page-explorer {
    overflow: hidden !important;
    /* Empêche la page de bouger quand on glisse la carte */
    height: 100dvh;
    /* Utilise 100% de la hauteur dynamique du mobile */
    display: flex;
    flex-direction: column;
    background-color: #050510;
}

@media (max-width: 768px) {
    body.page-explorer .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
    }

    body.page-explorer .explorer-content-card .container {
        padding: 0 !important;
    }

    body.page-explorer #map {
        border-radius: 0 !important;
    }
}

/* Titres et Textes */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Tight tracking comme sur iOS */
}

p,
span,
li,
label {
    color: var(--text-secondary);
    /* Par défaut gris clair, pas blanc pur */
}

strong,
b {
    color: var(--text-primary);
}

a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* 1. Forcer la couleur des liens au survol */
a:hover {
    color: var(--bs-link-hover-color);
}

/* Surcharge Bootstrap pour les formulaires Dark Mode */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* 3. Tuer le halo bleu (Focus Ring) sur tous les champs de formulaire */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(52, 199, 89, 0.25);
    /* Halo Vert */
}

/* Phase 5: Button Standardization */
.btn-primary {
    --bs-btn-bg: #34C759;
    --bs-btn-border-color: #34C759;
    --bs-btn-hover-bg: #2daf4e;
    --bs-btn-hover-border-color: #2daf4e;
    --bs-btn-focus-shadow-rgb: 52, 199, 89;

    background: linear-gradient(135deg, #34C759 0%, #28a745 100%);
    border: none;
    color: #fff;
    /* White text for better contrast on green */
    font-weight: 600;
    border-radius: 12px;
    padding: 8px 24px;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 199, 89, 0.4);
    color: #fff;
    background: linear-gradient(135deg, #2daf4e 0%, #208e3b 100%);
}

.btn-emerald-glass {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.2);
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-emerald-glass:hover {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border-color: rgba(52, 199, 89, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.1);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
}

/* Bouton Secondaire (Annuler / Retour) */
.btn-secondary,
.btn-outline-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    border-radius: 12px;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFF;
}

.skip-to-solo-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.skip-to-solo-btn:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border: 1px solid var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-1px);
}

/* 4. Corriger la pagination et autres composants actifs */
.page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #000000;
}

.page-link {
    color: var(--bs-primary);
}

.page-link:hover {
    color: var(--bs-link-hover-color);
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: var(--bs-primary);
    color: #000000;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

::selection {
    background-color: var(--bs-primary);
    color: #000000;
}

.navbar-dark {
    background-color: #222;
}

/* --- HEADER FIXES & RESPONSIVE NAV --- */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .header-content {
        padding: 5px 0;
        /* Reduced from 10px */
    }
}

.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    /* Move User/Logout to the far right */
    position: static !important;
    /* CRITICAL: Allow children to position relative to .header-content */
}

/* Central Block: Links - ABSOLUTE CENTER */
/* Central Block: Links - FLEXIBLE (No more absolute center that overlaps) */
.nav-links-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex: 1;
    /* Take available space */
    padding: 0 20px;
}

/* Fix User Widget in Header (Desktop) */
.user-widget-connected {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.user-widget-connected:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-widget-connected .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-widget-connected img.user-avatar-widget {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-widget-connected h3 {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    color: #fff;
}

/* Tablet/Compact Desktop Tweaks (< 1200px) */
@media (max-width: 1200px) {
    .nav-links-container {
        gap: 10px;
        padding: 0 10px;
    }

    .user-widget-connected {
        padding: 5px;
        /* Minimal padding */
        background: transparent;
        border: none;
    }

    .user-widget-connected img.user-avatar-widget {
        width: 40px;
        /* Slightly larger avatar as it's the only anchor */
        height: 40px;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
}

.user-widget-level {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.user-widget-connected .xp-bar-container {
    display: none;
    /* Hide XP bar in header to save space */
}

/* Bottom Nav: see .mobile-bottom-nav (line ~3636) */

.main-nav .nav-item {
    color: var(--text-primary) !important;
    opacity: 0.7;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.main-nav .nav-item:visited {
    color: var(--text-primary) !important;
}

.main-nav .nav-item:hover,
.main-nav .nav-item:focus {
    color: var(--bs-primary) !important;
    opacity: 1;
    transform: translateY(-1px);
}

.main-nav .nav-item.active {
    color: #fff !important;
    opacity: 1;
    text-shadow: 0 0 10px rgba(52, 199, 89, 0.4);
}

/* MOBILE NAV STYLES */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(20, 20, 25, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);

        /* Hiding Animation */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links-container {
        position: static;
        /* Reset desktop absolute positioning */
        transform: none;
        /* Reset centering transform */
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    /* Force User Widget to stack nicely */
    #user-profile-widget {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
        margin-bottom: 10px;
    }
}

/* Club Hero Section */
#club-hero {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 0 0 .5rem .5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#club-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay */
    border-radius: inherit;
}

/* Map Overlay Controls (Zoom, Locate) */
#map {
    width: 100%;
    /* Flex: 1 allows it to take all remaining space in the flex container */
    flex: 1;
    z-index: 1;
}

@media (min-width: 768px) {
    #map {
        /* Optional height fallback for desktop if needed */
        min-height: 500px;
    }
}

/* Map Pagination Overlay - Glassmorphism Style */
.map-overlay-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(30, 30, 40, 0.75);
    /* Semi-transparent dark background */
    backdrop-filter: blur(10px);
    /* Blur effect */
    -webkit-backdrop-filter: blur(10px);
    /* Safari support */
    padding: 10px 20px;
    border-radius: 30px;
    /* Pill shape */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.pagination-helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* User Greeting Capitalization */
.user-info h3 {
    text-transform: capitalize;
}

/* Badge Catalogue Premium Styles */
.badge-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.badge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.badge-card.earned {
    border: 1px solid var(--primary-color);
    background: linear-gradient(145deg, rgba(255, 87, 34, 0.1), rgba(30, 30, 40, 0.8));
    box-shadow: 0 4px 20px rgba(255, 87, 34, 0.15);
}

.badge-card.earned:hover {
    box-shadow: 0 8px 30px rgba(255, 87, 34, 0.25);
}

.badge-card.unearned {
    opacity: 0.7;
    /* Increased from default low opacity */
    filter: grayscale(100%);
}

.badge-card.unearned:hover {
    opacity: 1;
    filter: grayscale(50%);
}

.badge-emoji {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.badge-card:hover .badge-emoji {
    transform: scale(1.1) rotate(5deg);
}

.badge-card.unearned .badge-emoji {
    filter: grayscale(100%) opacity(0.5);
}

.badge-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.badge-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Add a lock icon for unearned badges */
.badge-card.unearned::after {
    content: '\f023';
    /* FontAwesome lock icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 1rem;
}

/* Club Profile Premium Styles */

#club-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

#club-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

#club-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

#club-logo-hero {
    width: 120px;
    height: 120px;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Dashboard Cards */
.training-card-date {
    background-color: var(--bs-primary);
    color: white;
    text-align: center;
    padding: 0.5rem;
    border-radius: .25rem;
    width: 60px;
}

.training-card-date .month {
    text-transform: uppercase;
    font-size: 0.8em;
    font-weight: bold;
    display: block;
}

.training-card-date .day {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
}

.announcement-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.team-logo-grid-item {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: .25rem;
    transition: transform 0.2s;
}

.team-logo-grid-item:hover {
    transform: scale(1.1);
}

/* Avatar Selection Modal */
.avatar-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.avatar-option {
    width: 100%;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.3s;
}

.avatar-option:hover {
    border-color: #ddd;
}

.avatar-option.selected {
    border-color: var(--primary-color);
}

/* Club Logo Selection (Same as Avatar) */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.logo-option {
    width: 100%;
    border-radius: 10px;
    /* Slightly different for logos if desired, or reuse 50% */
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.3s;
    object-fit: contain;
    background-color: #f8f9fa;
    /* Light background for transparent logos */
}

.logo-option:hover {
    border-color: #ddd;
}

.logo-option.selected {
    border-color: var(--bs-primary);
}

/* Club Stats Premium Styles */
.card-header-tabs {
    margin-bottom: -1px;
    border-bottom: none;
}

.card-header-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: all 0.2s;
    background: transparent;
}

.card-header-tabs .nav-link:hover {
    color: var(--text-primary);
    border-color: transparent;
}

.card-header-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom-color: var(--primary-color);
}

.card-header-tabs .nav-item {
    margin-bottom: 0;
}

/* Form Styling */
.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.25);
}

.form-control::placeholder,
.form-select::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    /* Firefox */
}

/* Metrics List */
.metric-item {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Flatpickr Customization for Dark Theme High Contrast */
.flatpickr-calendar.dark {
    background: #1e1e28 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.flatpickr-calendar.dark .flatpickr-months .flatpickr-month {
    background: #1e1e28 !important;
    color: #ffffff !important;
}

.flatpickr-calendar.dark .flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-calendar.dark .flatpickr-current-month input.cur-year {
    color: #ffffff !important;
    font-weight: 700;
}

.flatpickr-calendar.dark .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar.dark .flatpickr-months .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.flatpickr-calendar.dark span.flatpickr-weekday {
    background: #1e1e28 !important;
    color: #a0a0a0 !important;
}

.flatpickr-calendar.dark .flatpickr-day {
    color: #e0e0e0 !important;
}

.flatpickr-calendar.dark .flatpickr-day:hover,
.flatpickr-calendar.dark .flatpickr-day:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: transparent !important;
}

.flatpickr-calendar.dark .flatpickr-day.selected,
.flatpickr-calendar.dark .flatpickr-day.startRange,
.flatpickr-calendar.dark .flatpickr-day.endRange,
.flatpickr-calendar.dark .flatpickr-day.selected.inRange,
.flatpickr-calendar.dark .flatpickr-day.startRange.inRange,
.flatpickr-calendar.dark .flatpickr-day.endRange.inRange,
.flatpickr-calendar.dark .flatpickr-day.today.selected,
.flatpickr-calendar.dark .flatpickr-day.today.inRange,
.flatpickr-calendar.dark .flatpickr-day.prevMonthDay.selected,
.flatpickr-calendar.dark .flatpickr-day.nextMonthDay.selected {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #000000 !important;
    box-shadow: none !important;
}

.flatpickr-calendar.dark .flatpickr-time {
    background: #1e1e28 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.flatpickr-calendar.dark .flatpickr-time .flatpickr-time-separator,
.flatpickr-calendar.dark .flatpickr-time .flatpickr-am-pm {
    color: #ffffff !important;
}

.flatpickr-calendar.dark .flatpickr-time input {
    color: #ffffff !important;
}

/* Confirm Date Plugin Styling */
.flatpickr-confirm {
    background: var(--bs-primary) !important;
    color: #ffffff !important;
    padding: 10px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
}

.flatpickr-confirm:hover {
    background: #d94426 !important;
    /* Darker shade of primary */
}

.flatpickr-confirm svg {
    fill: #ffffff !important;
    width: 16px;
    height: 16px;
}

/* Club Wall Styles */
#predefined-messages-container .btn-outline-secondary {
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

#predefined-messages-container .btn-outline-secondary:hover,
#predefined-messages-container .btn-outline-secondary.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

#new-wall-post-form label {
    color: var(--text-primary);
}

#wall-posts-container .card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#wall-posts-container .card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

#wall-posts-container .card-title a:hover {
    text-decoration: underline;
}

#wall-posts-container .card-text {
    color: #ffffff !important;
}

#wall-posts-container .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

#selected-message-preview {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Login Page Styles */
#login-card {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#login-card .card-header {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#login-card .form-control {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

#login-card .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.5) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

#login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

#login-card .form-floating label {
    color: rgba(255, 255, 255, 0.7) !important;
}

#login-card .form-floating>.form-control:focus~label,
#login-card .form-floating>.form-control:not(:placeholder-shown)~label {
    color: rgba(255, 255, 255, 0.7) !important;
}

#login-card .form-control:-webkit-autofill,
#login-card .form-control:-webkit-autofill:hover,
#login-card .form-control:-webkit-autofill:focus,
#login-card .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-secondary) inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

#login-card .card-footer a {
    color: var(--primary-color) !important;
    text-decoration: none;
}

#login-card .card-footer a:hover {
    text-decoration: underline !important;
}

/* Autocomplete Dropdown */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    gap: 5px;
}

/* Make Flatpickr calendar more spacious */
.flatpickr-calendar.dark .flatpickr-day {
    padding: 2px !important;
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 4px !important;
}

.flatpickr-calendar.dark .flatpickr-current-month {
    padding: 12px 0;
}

/* Phase 4: Unified Glass Card Component */
/* Le standard pour toutes les cartes (Dashboard, Profil, Login) */
.card,
.glass-panel {
    background: rgba(28, 28, 30, 0.75);
    /* Semi-transparent */
    backdrop-filter: blur(20px);
    /* Effet flou iOS */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    /* Arrondi Apple standard */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    overflow: hidden;
    /* Important pour les coins arrondis */
}

.card-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
}

/* Legal Pages Content Styling */
.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content h6 {
    color: var(--primary-color) !important;
    /* Orange for titles */
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol,
.legal-content li {
    line-height: 1.7;
    color: var(--text-secondary) !important;
    /* Lighter grey for better readability */
}

.legal-content a {
    color: var(--bs-link-color) !important;
    text-decoration: underline !important;
}

.legal-content a:hover {
    color: var(--bs-link-hover-color) !important;
}

.legal-content strong {
    color: var(--text-primary) !important;
}

/* Ensure the card on the legal page has the correct background */
.container .card {
    background-color: var(--bg-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}



/* Fix for List Group Items in Dark Mode */
.list-group-item {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.list-group-item a {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.list-group-item a:hover {
    text-decoration: underline;
    color: var(--bs-link-hover-color) !important;
}

/* Ensure Card Text Contrast */
.card {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.card-title,
.card-subtitle,
.card-text,
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card strong,
.card span,
.card div {
    color: var(--text-primary);
}

.card a:not(.btn) {
    color: var(--primary-color) !important;
}

.card .text-muted {
    color: #b0b0b0 !important;
    /* Lighter gray for better readability on dark bg */
}

/* Fix Button Outline Primary if it's appearing blue */
.btn-outline-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* Ensure Modals are Dark */
.modal-content {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fix for Nav Pills Links (Side Menu) */
.nav-pills .nav-link {
    color: var(--text-secondary) !important;
    /* Light grey for inactive links */
}

.nav-pills .nav-link:hover {
    color: var(--text-primary) !important;
    /* White on hover */
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-pills .nav-link.active {
    color: #fff !important;
    background-color: var(--bs-primary) !important;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-emerald-glass {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
}

.btn-emerald-glass:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}


/* ========================================= */
/* ACCESSIBILITY IMPROVEMENTS (WCAG)         */
/* ========================================= */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 10000;
    transition: top 0.3s;
    text-decoration: none;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* focus-visible for better keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure icons in buttons don't trap focus or confuse readers if not handled */
button i {
    pointer-events: none;
}

main a:not(.btn):not(.nav-link):hover {
    color: var(--bs-link-hover-color);
}



.card .text-muted {
    color: #b0b0b0 !important;
}

main a:not(.btn):not(.nav-link):hover {
    color: var(--bs-link-hover-color);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Past Training Styles */
.past-training {
    opacity: 0.6;
    filter: grayscale(100%);
    border-left: 4px solid #6c757d;
    /* Grey border to indicate inactive */
}

.past-training:hover {
    opacity: 0.8;
    /* Slight feedback on hover */
}



/* Improved Match Leaderboard Styles */

/* Man of the Match Card - Premium Look */
.man-of-the-match-card {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 50%, #FFD700 100%);
    border-radius: 20px;
    padding: 2px;
    /* For border effect if needed, or just padding */
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
    color: #333;
}

.man-of-the-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    pointer-events: none;
}

.motm-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

.motm-icon-wrapper {
    background: #fff;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.motm-trophy {
    font-size: 2.5rem;
    color: #FDB931;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.motm-title {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.8;
}

.motm-player-name {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.motm-rating-badge {
    background: #333;
    color: #FFD700;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.motm-rating-badge .rating-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.motm-rating-badge .rating-scale {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Leaderboard Table Improvements */
.player-leaderboard-container {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-ranking-table {
    margin-bottom: 0;
    background: transparent;
}

.player-ranking-table thead th {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 1rem;
}

.player-ranking-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.player-ranking-table tbody tr:last-child td {
    border-bottom: none;
}

.rank-cell {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.player-name-cell {
    font-size: 1.1rem;
}

.global-score-badge {
    background: var(--bs-primary);
    color: white;
    font-weight: 800;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    display: inline-block;
    min-width: 50px;
}

.table-active-custom {
    background: rgba(255, 215, 0, 0.1) !important;
    /* Gold tint for winner */
}

.table-active-custom .player-name-cell {
    color: #FFD700;
}

/* Stats Grid in Table */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-item i {
    font-size: 1rem;
    opacity: 0.9;
}

.stat-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Animation for Man of the Match */
@keyframes shine {
    0% {
        background-position: -100% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.man-of-the-match-card {
    background-size: 200% auto;
    animation: shine 5s linear infinite;
}

/* Rank 1 Glow */
.table-active-custom {
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.table-active-custom:hover {
    background: rgba(255, 215, 0, 0.15) !important;
    transform: scale(1.01);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Improved Modal Styles */
.modal-card {
    background: #1a1a1a;
    /* Darker background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 0;
    /* Let header/body handle padding */
    overflow: hidden;
    max-width: 500px;
    width: 90%;
}

.modal-header-custom {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header-custom h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body-custom {
    padding: 2rem;
}

/* Star Rating Input */
.rating-group {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
}

.rating-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    /* For CSS hover magic */
    justify-content: center;
    gap: 0.5rem;
}

.star-rating-input input {
    display: none !important;
    /* Force hide */
}

.star-rating-input label {
    font-size: 2rem;
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 5px;
    /* Add click area */
}

.star-rating-input label:hover,
.star-rating-input label:hover~label,
.star-rating-input input:checked~label {
    color: #FFD700;
}

.rating-labels-helper {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding: 0 1rem;
    width: 100%;
    /* Ensure full width for spacing */
    max-width: 300px;
    /* Limit width to match stars if needed */
    margin-left: auto;
    margin-right: auto;
}

/* Custom Textarea */
.custom-textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    resize: none;
}

.custom-textarea:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(52, 199, 89, 0.25) !important;
}

/* Opponent Grid */
.opponent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.opponent-grid ul {
    display: contents;
    /* Flatten the ul */
    list-style: none;
    padding: 0;
    margin: 0;
}

.opponent-grid li {
    display: contents;
}

.rate-player-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem;
    border-radius: 12px;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rate-player-btn::before {
    content: '\f007';
    /* FontAwesome User Icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 2rem;
    color: var(--text-secondary);
}

.rate-player-btn:hover {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.rate-player-btn:hover::before {
    color: #fff;
}

/* Range Slider Styling for Player Rating */
.rating-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #444;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    margin-bottom: 1.5rem;
}

.rating-slider:hover {
    opacity: 1;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bs-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
}

.rating-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bs-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
}

.hidden {
    display: none !important;
}

/* Reliability Score Styles */
.reliability-score {
    margin-top: 15px;
    font-size: 1rem;
    color: var(--text-primary);
}

.reliability-score p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.reliability-bar-container {
    width: 100%;
    background-color: var(--bg-primary);
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
}

.reliability-bar {
    height: 100%;
    width: 0%;
    /* Will be set by JS */
    border-radius: 5px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.reliability-high {
    background-color: #4CAF50;
    /* Green */
}

.reliability-medium {
    background-color: #FFC107;
    /* Orange */
}

.reliability-low {
    background-color: #F44336;
    /* Red */
}

/* =============================================
   AMENITY BADGES - Terrain Detail Page
   ============================================= */
.amenities-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.amenity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--badge-color, #888);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--badge-color, #fff);
    transition: transform 0.2s, box-shadow 0.2s;
}

.amenity-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.amenity-badge i {
    font-size: 0.9rem;
}

.amenity-loading,
.no-amenities {
    color: var(--text-color-secondary, #888);
    font-style: italic;
    font-size: 0.9rem;
}

/* =============================================
   VIRAL INVITATION UI
   ============================================= */

/* Opponent Autocomplete */
.opponent-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.opponent-autocomplete-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.opponent-autocomplete-item:hover {
    background: rgba(0, 210, 190, 0.15);
}

.opponent-autocomplete-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.opponent-autocomplete-item .opponent-tag {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 3px 8px;
    background: rgba(0, 210, 190, 0.2);
    color: #00d2be;
    border-radius: 12px;
}

/* Selected Opponent */
.selected-opponent {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(0, 210, 190, 0.1);
    border: 1px solid rgba(0, 210, 190, 0.3);
    border-radius: 12px;
    margin-top: 10px;
}

.selected-opponent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.clear-opponent-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #888;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.clear-opponent-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
}

/* Invite Guest Fallback */
.invite-guest-fallback {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 12px;
    text-align: center;
}

.invite-hint {
    color: #ffc107;
    font-size: 0.85rem;
    margin: 0 0 10px 0;
}

.toggle-guest-mode-btn {
    background: linear-gradient(135deg, #00d2be, #00f5a0);
    border: none;
    color: #000;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.toggle-guest-mode-btn:hover {
    transform: scale(1.05);
}

/* Guest Name Wrapper */
.guest-name-wrapper .guest-hint {
    color: #888;
    font-size: 0.8rem;
    margin-top: 8px;
}

/* Guest Name Input Validation Feedback */
#guest-name-input:focus {
    border-color: #00d2be;
    box-shadow: 0 0 0 3px rgba(0, 210, 190, 0.2);
}

#guest-name-input.valid {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

#guest-name-input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* Opponent Tag "Habitué" - More Visible */
.opponent-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    animation: tagGlow 2s ease-in-out infinite;
}

@keyframes tagGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
    }
}

/* Invite Success Screen */


.share-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn.whatsapp {
    background: #25D366;
    color: #fff;
}

.share-btn.copy {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.xp-bonus-hint {
    color: #ffc107;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* =============================================
   MINI FUT CARD - Selected Opponent
   ============================================= */

.selected-opponent-fut {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

.mini-fut-card {
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #2d5a27 0%, #4a8f3c 50%, #2d5a27 100%);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mini-fut-card .fut-rating {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mini-fut-card .fut-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mini-fut-card .fut-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin-top: 4px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-fut-card .fut-stats {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.mini-fut-card .fut-stats i {
    font-size: 0.5rem;
    color: #ffc107;
}

.selected-opponent-fut .clear-opponent-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.selected-opponent-fut .clear-opponent-btn:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 100, 100, 0.3);
    color: #ff6b6b;
}

/* Animation fade-in for FUT card */
.selected-opponent-fut {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive: larger FUT card on mobile */
@media (max-width: 480px) {
    .mini-fut-card {
        width: 100px;
        height: 125px;
    }

    .mini-fut-card .fut-avatar {
        width: 50px;
        height: 50px;
    }

    .mini-fut-card .fut-name {
        font-size: 0.75rem;
    }

    .mini-fut-card .fut-rating {
        font-size: 0.85rem;
    }
}

/* =============================================
   SUCCESS CHECKMARK ANIMATION
   ============================================= */

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #00d2be;
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.check-icon::before,
.check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: var(--bg-secondary, #1a1a2e);
    transform: rotate(-45deg);
}

.icon-line {
    height: 5px;
    background-color: #00d2be;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(0, 210, 190, 0.5);
}

.icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: var(--bg-secondary, #1a1a2e);
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }

    5% {
        transform: rotate(-45deg);
    }

    12% {
        transform: rotate(-405deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

.success-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.xp-bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* =========================================================================
   MOBILE UX CRITICAL FIXES (Migrated from base.html)
   ========================================================================= */

/* Touch-Action - Prevent scroll conflicts */
.draggable,
.rating-slider,
.custom-range,
[draggable="true"] {
    touch-action: pan-x;
}

.scrollable-list,
.modal-body-custom,
.team-list {
    touch-action: pan-y;
}

/* Minimum Touch Target Size (44x44px) */
button,
.btn,
[role="button"],
.nav-link,
.dropdown-item {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.btn-sm {
    min-height: 36px;
    min-width: 36px;
}

/* Prevent iOS Zoom on Input Focus */
input,
select,
textarea {
    font-size: 16px !important;
}

/* Safe Area Insets (iPhone X+ notch) */
.header,
#sidebar,
/* --- PREMIUM TOASTS --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(18, 18, 24, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--bs-primary);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    min-width: 300px;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.toast-message {
    flex-grow: 1;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
}

.toast-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.toast-close-btn:hover {
    color: #fff;
}

/* Toast Animations */
.toast-enter {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-enter-start {
    transform: translateX(120%);
    opacity: 0;
}

.toast-enter-end {
    transform: translateX(0);
    opacity: 1;
}

.toast-leave {
    transition: all 0.4s ease-in;
}

.toast-leave-start {
    transform: translateX(0);
    opacity: 1;
}

.toast-leave-end {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Types */
.toast.success {
    border-left-color: var(--bs-primary);
}

.toast.success i {
    color: var(--bs-primary);
}

.toast.error {
    border-left-color: #ff3b30;
}

.toast.error i {
    color: #ff3b30;
}

.toast.warning {
    border-left-color: #ff9500;
}

.toast.warning i {
    color: #ff9500;
}

.toast.info {
    border-left-color: #007aff;
}

.toast.info i {
    color: #007aff;
}

@media (max-width: 768px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        bottom: auto;
    }

    .toast {
        min-width: 0;
        width: 100%;
        transform: translateY(-120%);
    }

    .toast.show {
        transform: translateY(0);
    }
}

/* Disable Double-Tap Zoom */
button,
.btn,
a {
    touch-action: manipulation;
}

/* Mobile improvements */
@media (max-width: 768px) {

    .player-item,
    .facility-card {
        padding: 16px;
        min-height: 60px;
    }

    .btn+.btn {
        margin-top: 10px;
    }

    .modal .btn {
        width: 100%;
    }

    .form-group,
    .form-control {
        margin-bottom: 16px;
    }
}

/* --- AUTHORIZATION MODAL STYLES (Added by AntiGravity) --- */
/* --- AUTHORIZATION MODAL STYLES (Premium CertiScore Theme) --- */
.auth-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 900px !important;
    width: 95%;
    min-height: 500px;
    align-items: stretch;
    padding: 0 !important;
    overflow: hidden;
    background: rgba(18, 18, 24, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 0 40px 80px -12px rgba(0, 0, 0, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fut-preview-sidebar {
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.8) 0%, rgba(26, 26, 26, 0.8) 100%);
    width: 100%;
    /* Flexible within grid */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#auth-form-container {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#auth-form-container h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    letter-spacing: -1px;
}

#auth-form-container .form-control {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    padding: 14px 18px;
    color: #fff !important;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#auth-form-container .form-control:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.15) !important;
    transform: translateY(-1px);
}

#auth-form-container .form-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
    margin-left: 4px;
}

#auth-form-container .btn-primary {
    background: linear-gradient(135deg, #34C759 0%, #28a745 100%) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#auth-form-container .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px rgba(52, 199, 89, 0.4) !important;
    filter: brightness(1.1);
}

/* Auth Modal Close Button */
.auth-layout .close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 10;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.auth-layout .close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .auth-layout {
        grid-template-columns: 1fr;
        width: 100%;
        height: 100%;
        max-width: 100% !important;
        border-radius: 0;
        border: none;
    }

    .fut-preview-sidebar,
    #fut-preview-container {
        display: none !important;
    }

    #auth-form-container {
        padding: 30px 20px;
    }
}

/* --- MODAL CENTERING FIX --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.modal.active,
.modal.is-visible {
    display: flex !important;
}

/* --- HEADER CENTERING FIX --- */
.main-header {
    background: rgba(24, 25, 38, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.main-header .header-content,
.main-header .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    width: 100%;
}

/* --- LOGO PREMIUM (Branding) --- */
.logo-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    letter-spacing: -1px;
}

.logo-accent {
    color: #34C759;
}

.logo-icon {
    color: #34C759;
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px rgba(52, 199, 89, 0.5));
}

/* --- QUICK RECORD WIZARD & UTILITIES --- */
.hidden {
    display: none !important;
}

/* NUCLEAR OPTION: Force hide modal by ID if class fails specificity wars */
#quick-record-modal.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Mobile Bottom Sheet default */
}

@media (min-width: 768px) {
    .fullscreen-overlay {
        align-items: center;
        padding: 20px;
    }
}

.quick-record-container {
    width: 100%;
    max-width: 600px;
    height: 90vh;
    background: var(--surface-card, #1e1e24);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .quick-record-container {
        height: auto;
        max-height: 85vh;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

.qr-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qr-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.close-qr-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
}

.qr-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
    /* Ensures proper scroll when flex child contents overflow */
}

/* Wizard Steps */
.wizard-step {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.wizard-step.active {
    border-color: var(--primary, #34C759);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.wizard-step.locked {
    opacity: 0.6;
    pointer-events: none;
}

.wizard-step-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: #fff;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #aaa;
    border: 2px solid transparent;
}

.wizard-step.active .step-indicator {
    background: var(--primary, #34C759);
    color: white;
    border-color: var(--primary, #34C759);
}

.wizard-step.completed .step-indicator {
    background: #198754;
    color: white;
    border-color: #198754;
}

.wizard-step-content {
    padding: 0 15px 15px 15px;
}

.wizard-step.active .wizard-step-content {
    display: block;
}

.step-check {
    display: none;
}

.wizard-step.completed .step-number {
    display: none;
}

.wizard-step.completed .step-check {
    display: block;
}

.step-title-area {
    flex: 1;
}

.step-title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.step-summary {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2px;
}

/* Inputs & Grids */
.smart-chips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.smart-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    color: #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.2s;
}

.smart-chip:hover,
.smart-chip.selected {
    background: rgba(52, 199, 89, 0.15);
    border-color: var(--primary, #34C759);
    color: var(--primary, #34C759);
}

.modern-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.modern-input:focus {
    border-color: var(--primary, #34C759);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

/* Picker Search & Autocomplete */
.picker-search-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.picker-autocomplete-results,
.opponent-autocomplete-results {
    position: relative;
    margin-top: 10px;
    background: #2a2a35;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
}

.opponent-autocomplete-results.hidden {
    display: none !important;
}

/* Navigation Buttons */
.wizard-nav-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wizard-nav-buttons--spaced {
    justify-content: space-between;
}

.wizard-next-btn {
    flex: 1;
    background: var(--primary, #34C759);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.wizard-next-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #777;
    cursor: not-allowed;
    opacity: 0.7
}

.wizard-back-btn {
    background: transparent;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
}

.wizard-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* XP Badge */
.xp-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: black;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* --- Opponent Search Results --- */
.opponent-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.opponent-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.opponent-result-item .avatar-circle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opponent-result-item .info {
    flex: 1;
    min-width: 0;
}

.opponent-result-item .username {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    line-height: 1.4;
}

.opponent-result-item .fullname {
    font-size: 0.8rem;
    color: #aaa;
}

/* --- MAIN FOOTER --- */
.main-footer {
    padding: 60px 0 40px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    z-index: 5;
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.main-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.footer-links a:hover {
    color: var(--bs-primary);
    opacity: 1;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .main-footer {
        padding: 40px 15px 100px;
        /* Space for bottom nav */
    }

    .footer-links {
        gap: 16px;
    }
}

.opponent-result-item.invite-item i {
    font-size: 1rem;
}

/* --- DMMT Auth Modal Ergonomics --- */
@media (max-width: 768px) {
    .dmmt-auth-layout {
        display: flex !important;
        flex-direction: column-reverse !important;
        padding: 15px !important;
    }

    .dmmt-auth-layout .fut-preview-sidebar {
        width: 100% !important;
        margin-bottom: 20px !important;
        display: block !important;
    }

    .dmmt-auth-layout .trophy-card.large {
        transform: scale(0.8) !important;
        margin: -20px auto !important;
    }
}

.pulse-effect {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1.2);
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    }

    70% {
        transform: scale(1.25);
        box-shadow: 0 0 0 15px rgba(52, 199, 89, 0);
    }

    100% {
        transform: scale(1.2);
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
    }
}

/* --- ULTRA-PREMIUM MODAL SYSTEM (V3 Refinement) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(20, 40, 30, 0.4) 0%, rgba(10, 10, 15, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.modal-content {
    background: linear-gradient(165deg, rgba(40, 40, 50, 0.98) 0%, rgba(10, 10, 15, 1) 100%);
    backdrop-filter: blur(50px) saturate(160%);
    -webkit-backdrop-filter: blur(50px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 48px;
    padding: 60px 32px;
    width: 95%;
    max-width: 440px;
    box-shadow:
        0 50px 120px -20px rgba(0, 0, 0, 1),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(52, 199, 89, 0.1),
        /* Green Atmosphere */
        inset 0 0 0 1px rgba(255, 214, 10, 0.15);
    /* Golden Inner Border Hint */

    position: relative;
    animation: animate-premium-pop 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Improved Legibility V3.3 */
}

/* Premium Signature Texture & Light Sweep */
.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("/static/img/stardust.png");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

.modal-content::after {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            transparent 45%,
            rgba(255, 255, 255, 0.03) 48%,
            rgba(255, 255, 255, 0.07) 50%,
            rgba(255, 255, 255, 0.03) 52%,
            transparent 55%);
    transform: rotate(-25deg);
    animation: signature-scan 8s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    pointer-events: none;
}

@keyframes signature-scan {
    0% {
        transform: translate(-30%, -30%) rotate(-25deg);
    }

    100% {
        transform: translate(30%, 30%) rotate(-25deg);
    }
}

/* Specific Avatar fix to prevent boxiness seen in screenshot */
#rate-opponent-avatar {
    width: 112px !important;
    height: 112px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 9999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
    flex-shrink: 0 !important;

    /* V3.4 Fix: Typography & Image Sizing */
    font-size: 3.5rem !important;
    /* Large letter fallback */
    font-weight: 900 !important;
    color: white !important;
    text-transform: uppercase !important;
}

#rate-opponent-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

@keyframes animate-premium-pop {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9) rotateX(-10deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.modal-close-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.modal-close-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

/* Star Rating Halo V3.1 */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.rating-stars i {
    cursor: pointer;
    font-size: 2.6rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: rgba(255, 214, 10, 0.05);
    /* Faint gold tint even when empty */
    -webkit-tap-highlight-color: transparent;
    filter: drop-shadow(0 0 0px rgba(255, 214, 10, 0));
}

.rating-stars i:hover {
    transform: scale(1.45) rotate(-10deg);
    color: var(--accent-gold, #FFD60A) !important;
}

.rating-stars i.fas {
    color: var(--accent-gold, #FFD60A);
    filter: drop-shadow(0 0 20px rgba(255, 214, 10, 0.75));
    transform: scale(1.15);
}

/* Glossy Branding Button V3.2 */
.btn-gold {
    background: linear-gradient(135deg, #FFD60A 0%, #FFB800 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 20px;
    padding: 24px 32px;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    box-shadow:
        0 15px 35px rgba(255, 184, 0, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-gold::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(25deg);
    transition: none;
}

.btn-gold:hover:not(:disabled)::after {
    left: 130%;
    transition: all 0.8s ease-in-out;
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 184, 0, 0.5);
    filter: brightness(1.05);
}

/* Alive Heartbeat Animation for Primary Action */
@keyframes btn-heartbeat {
    0% {
        transform: scale(1);
        box-shadow: 0 15px 35px rgba(255, 184, 0, 0.45);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 20px 45px rgba(255, 184, 0, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 15px 35px rgba(255, 184, 0, 0.45);
    }
}

.btn-gold:not(:hover) {
    animation: btn-heartbeat 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #444;
    color: #888;
    box-shadow: none;
}

.btn-ghost-white {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 16px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-ghost-white:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --- MOBILE UX TRANSFORMATION (App-Like) --- */

/* 1. CONFIGURATION MOBILE */
/* Masquer la Bottom Nav sur Desktop */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {

    /* SCORCHED EARTH: Force Dark Charter */
    html,
    body {
        background-color: #121218 !important;
        background: #121218 !important;
        color: #fff !important;
    }



    /* Ajustement Body pour la barre fixe */
    body {
        padding-bottom: 90px !important;
        background-color: #121218 !important;
        /* Premium Dark Base */
    }

    /* Nettoyage Header : Masquer burger et liens redondants */
    .mobile-menu-toggle,
    .navbar-toggler,
    .navbar-collapse,
    .main-nav {
        display: none !important;
    }

    /* Header minimaliste */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(10, 10, 15, 0.98) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
        height: 60px;
        display: flex;
        align-items: center;
    }

    .header-content {
        padding: 0 15px !important;
    }

    /* Logo visibility adjustment */
    .logo-text {
        color: #fff !important;
    }

    /* --- 2. BOTTOM NAVIGATION BAR --- */
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        /* Slimmed down from 75px */
        background-color: rgba(18, 18, 24, 0.8) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.5);
        z-index: 9999;
        padding-bottom: env(safe-area-inset-bottom);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.5);
        font-size: 10px;
        /* Slimmed from 11px */
        font-weight: 600;
        width: 20%;
        transition: all 0.2s ease;
        gap: 2px;
        /* Tighter gap */
    }

    .mobile-bottom-nav .nav-item span {
        color: inherit !important;
    }

    .mobile-bottom-nav .nav-item.active {
        color: #34C759;
        /* Emerald Primary */
    }

    .mobile-bottom-nav .nav-item .nav-icon {
        font-size: 18px;
        /* Slimmed from 20px */
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Bouton Central (Record Action) - Premium Upgrade */
    .mobile-bottom-nav .nav-item-main {
        position: relative;
        top: -12px;
        /* Adjusted for slimmer dock */
        z-index: 100;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mobile-bottom-nav .nav-item-main:active {
        transform: scale(0.9);
    }

    .nav-icon-circle {
        background: linear-gradient(135deg, #42d392 0%, #34C759 50%, #28a745 100%);
        width: 56px;
        /* Slimmed from 60px */
        height: 56px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 12px 28px rgba(52, 199, 89, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
        color: #121218 !important;
        /* Dark icon for contrast */
        border: 5px solid #121218;
        position: relative;
    }

    .nav-icon-circle i {
        font-size: 24px;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

    /* Subtle Outer Glow */
    .nav-icon-circle::before {
        content: '';
        position: absolute;
        inset: -2px;
        background: var(--apple-green);
        border-radius: 50%;
        opacity: 0.15;
        z-index: -1;
        filter: blur(8px);
    }

    /* --- 2b. REDUNDANCY REMOVAL --- */
    /* Hide specific dashboard buttons that now live in the bottom nav */
    .hide-on-mobile-nav,
    .page-profile .main-footer {
        display: none !important;
    }

    /* Ensure content isn't covered by bottom nav */
    .page-profile .profile-container,
    .page-explorer .explorer-main-wrapper {
        padding-bottom: 90px !important;
    }


    .nav-icon-circle i {
        font-size: 24px;
    }

    /* --- 3. MODERNISATION DES CARTES (CARDS) --- */
    .card,
    .match-card,
    .badge-card {
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 20px !important;
        /* Plus d'arrondi mobile */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
        margin-bottom: 20px !important;
        background: var(--surface-2) !important;
    }

    .card-header {
        background: rgba(255, 255, 255, 0.03) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        font-weight: 800 !important;
        padding: 18px 20px !important;
        color: #fff !important;
    }

    .card-body {
        padding: 20px !important;
        color: var(--text-secondary) !important;
    }

    .card-title {
        color: var(--text-primary) !important;
        font-weight: 700 !important;
    }

    /* Boutons pleine largeur pour mobile */
    .btn-mobile-wide {
        display: block;
        width: 100%;
        border-radius: 14px;
        padding: 16px;
        font-size: 16px;
        font-weight: 700;
        text-align: center;
    }
}

/* --- ZELIJ PATTERN UTILITY --- */
.zelij-bg {
    position: relative;
    overflow: hidden !important;
}

.zelij-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Intricate geometric star pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0l2.5 7.5L30 10l-7.5 2.5L20 20l-2.5-7.5L10 10l7.5-2.5L20 0zM0 20l2.5 7.5L10 30l-7.5 2.5L0 40l-2.5-7.5L-10 30l7.5-2.5L0 20zM40 20l2.5 7.5L50 30l-7.5 2.5L40 40l-2.5-7.5L30 30l7.5-2.5L40 20z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    opacity: 0.8;
    z-index: 10;
}

/* --- QUICK RECORD UX OVERHAUL --- */

.set-row {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.set-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.set-stepper-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.stepper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.stepper-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.stepper-btn:active {
    transform: scale(0.9);
    background: var(--primary);
}

.stepper-value {
    min-width: 40px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: white;
}

.set-sep {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
}

/* Transitions */
.wizard-step-content {
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wizard-step.active .wizard-step-content {
    animation: slideInUp 0.4s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* XP Badge Animation */
.xp-badge.animate-pulse {
    animation: xpPulse 2s infinite;
}

@keyframes xpPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

/* Opponent Quick-Tap */
#recent-opponents-container {
    margin-bottom: 20px;
}

.recent-rivals-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.rivals-scroll-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Hide for clean look */
}

.rivals-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.rival-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.23s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scroll-snap-align: start;
    width: 65px;
}

.rival-avatar-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary, #4568dc));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.rival-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    object-fit: cover;
}

.rival-online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #34c759;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
}

.rival-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.rival-bubble:hover {
    transform: translateY(-5px);
}

.rival-bubble:active,
.rival-bubble.selected-tap {
    transform: scale(0.9);
}

.rival-bubble.selected-tap .rival-avatar-wrapper {
    background: #fff;
    box-shadow: 0 0 15px var(--primary);
}


/* --- QUICK RECORD UX OVERHAUL --- */

.set-row {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.set-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.set-stepper-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.stepper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.stepper-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.stepper-btn:active {
    transform: scale(0.9);
    background: var(--primary);
}

.stepper-value {
    min-width: 40px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: white;
}

.set-sep {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
}

/* Transitions */
.wizard-step-content {
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wizard-step.active .wizard-step-content {
    animation: slideInUp 0.4s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* XP Badge Animation */
.xp-badge.animate-pulse {
    animation: xpPulse 2s infinite;
}

@keyframes xpPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

/* Brag Button & Success View */
.btn-brag {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000 !important;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.2s;
}

.btn-brag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-brag:active {
    transform: scale(0.98);
}

.quick-record-container.success-view {
    text-align: center;
}

.qr-match-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-score {
    font-size: 3rem;
    font-weight: 900;
    margin: 10px 0;
    letter-spacing: -2px;
}