* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    scroll-behavior: smooth;
}

:root {
    --min-font-size: 14px;
    --max-font-size: 18px;
    --responsive-font-size: clamp(var(--min-font-size), 1.1vw, var(--max-font-size));
}

body {
    background-color: #231e3f;
    background-image: radial-gradient(ellipse at 50% 40%,
            rgba(115, 99, 218, 0.25) 0%,
            #231e3f 60%);

    font-family: 'Lilita One', cursive;
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    font-size: var(--responsive-font-size);
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
    flex-grow: 1;
    transition: max-width 0.5s ease-in-out;
}

.container.chatter-started {
    max-width: 98%;
}

.container.draft-started {
    max-width: 98%;
}

.header {
    margin-bottom: 30px;
    position: relative;
}

.top-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: clamp(55px, 5vw, 80px);
    position: relative;
    z-index: 1001;
    width: 98vw;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links-right {
    position: relative;
    display: flex;
    align-items: center;
}

/* NOUVEAU STYLE DISCORD (PRÉFÉRÉ) */
.discord-link {
    display: flex;
    align-items: center;
    gap: 0;
    background-color: rgba(88, 101, 242, 0.8);
    /* Discord brand color */
    padding: 8px 10px;
    border-radius: 15px;
    border: 1px solid rgba(88, 101, 242, 1);
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.9rem, 1.2vw, 1.0rem);
    margin-right: 10px;
    /* Spaces it from the language selector */
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
}

.discord-link span {
    max-width: 0;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.discord-link:hover {
    background-color: rgba(88, 101, 242, 1);
    gap: 8px;
    padding: 8px 12px;
}

.discord-link:hover span {
    max-width: 200px;
    opacity: 1;
}

.discord-link .fab {
    font-size: 1.2rem;
}

.bmc-link {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.9) 0%, rgba(255, 152, 0, 0.9) 100%);
    padding: 8px 10px;
    border-radius: 15px;
    border: none;
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.9rem, 1.2vw, 1.0rem);
    margin-right: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
}

.bmc-link span {
    max-width: 0;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.bmc-link:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 1) 0%, rgba(255, 152, 0, 1) 100%);
    gap: 8px;
    padding: 8px 12px;
}

.bmc-link:hover span {
    max-width: 200px;
    opacity: 1;
}

.bmc-link .fas {
    font-size: 1.2rem;
}

.bmc-icon {
    width: 1.2rem;
    height: 1.2rem;
    filter: invert(1);
}

/* FIN NOUVEAU STYLE DISCORD */

.nav-center-title {
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header h1 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    margin-bottom: 0;
    color: #fff;
    position: relative;
    text-align: center;
}

.author-credit {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
    display: block;
    text-align: center;
    margin: -2px auto 0;
    width: fit-content;
}

/* --- Burger Menu & Overlay --- */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2.2rem;
    height: 2.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2010;
    position: relative;
}

.burger-menu span {
    width: 2.2rem;
    height: 0.25rem;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.menu-overlay a {
    color: #fff;
    text-decoration: none;
    font-size: 2.5rem;
    margin: 15px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu-overlay a:hover,
.menu-overlay a.active {
    color: #f1c40f;
    transform: scale(1.05);
}

.menu-close {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 2010;
}

.menu-close:hover {
    color: #f1c40f;
    transform: scale(1.1);
}

.setup-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

#setup {
    z-index: 2;
}

#global-stats-panel {
    z-index: 1;
}

.setup-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

.setup-grid .form-group {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.form-group label.centered-label {
    text-align: center;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Lilita One', cursive;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.custom-select-container {
    position: relative;
    width: 100%;
    font-family: 'Lilita One', cursive;
}

.custom-select-container input[type="text"] {
    width: 100%;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

.custom-select-container input[type="text"]::placeholder {
    color: #555;
    opacity: 1;
}

.custom-select-trigger {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-trigger:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.custom-select-trigger .trigger-content {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger img {
    width: 24px;
    height: 24px;
}

.custom-options-wrapper {
    display: none;
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    z-index: 10;
    background: #2c2c2c;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.custom-select-container.open .custom-options-wrapper {
    display: block;
}

.custom-optgroup-label {
    padding: 10px 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #f1c40f;
    font-weight: bold;
}

.custom-option {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s ease;
}

.custom-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-option.selected {
    background-color: rgba(241, 196, 15, 0.2);
}

.custom-option img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.custom-option .map-name {
    color: #fff;
    font-size: 1rem;
}

#languageSelector {
    cursor: pointer;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    transition: background-color 0.2s ease;
    color: #fff;
}

.language-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-flag {
    width: 24px;
    height: auto;
    border-radius: 4px;
    vertical-align: middle;
}

#selectedLanguage {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#languageDropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: #2c2c2c;
    border-radius: 10px;
    overflow: hidden;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#languageSelector.open #languageDropdown {
    display: block;
}

.side-selection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.side-image {
    width: 100%;
    max-width: clamp(100px, 10vw, 140px);
    cursor: pointer;
    border-radius: 15px;
    border: 4px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.side-image:hover:not(.disabled) {
    transform: translateY(-3px) scale(1.05);
    border-color: #f1c40f;
    box-shadow: 0 8px 25px rgba(241, 196, 25, 0.4);
}

.side-image.disabled {
    cursor: not-allowed;
    opacity: 0.4;
    filter: grayscale(100%);
}

.btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Lilita One', cursive;
}

.btn:disabled {
    background: linear-gradient(45deg, #555, #333);
    cursor: not-allowed;
    opacity: 0.6;
}


.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn.btn-skip {
    background: linear-gradient(45deg, #6c757d, #495057);
}

.btn.btn-skip:hover:not(:disabled) {
    background: linear-gradient(45deg, #5a6268, #343a40);
}

.btn.btn-undo {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.btn.btn-undo:hover:not(:disabled) {
    background: linear-gradient(45deg, #0069d9, #004085);
}

/* == MODIFICATION == */
.btn.btn-share {
    background: linear-gradient(45deg, #1abc9c, #16a085);
}

.btn.btn-share:hover:not(:disabled) {
    background: linear-gradient(45deg, #16a085, #117a65);
}

/* ================== */

.btn.btn-success {
    background: linear-gradient(45deg, #28a745, #218838);
}

.btn.btn-success:hover:not(:disabled) {
    background: linear-gradient(45deg, #218838, #1e7e34);
}

.btn.btn-icon {
    width: clamp(44px, 4vw, 52px);
    height: clamp(44px, 4vw, 52px);
    padding: 0;
    border-radius: 50%;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.draft-controls-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Utilise le même écart que la ligne du prompt */
    flex-shrink: 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.main-content.draft-active {
    grid-template-columns: 1fr 1fr;
}

.main-content.draft-active #draftAnalysisContainer {
    grid-column: 1 / -1;
}

.draft-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
}

.suggestions-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
}

#inputAndRecommendations {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#draftAnalysisContainer {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.draft-interface-grid {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: start;
    gap: 20px;
}

.draft-team-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    position: relative;
    /* Ensure positioning context */
}

/* --- UPDATED PICKS LAYOUT (INTEGRATED TAGS) --- */

/* The main container for picks */
.picks-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Spacing between rows */
    width: 100%;
    align-items: center;
}

/* Each row contains a tag input and a brawler slot */
.pick-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

/* --- Team Specific Directions --- */

/* Blue Team: Tag on LEFT, Slot on RIGHT */
.draft-team-panel.blue .pick-wrapper {
    flex-direction: row;
}

/* Red Team: Slot on LEFT, Tag on RIGHT */
.draft-team-panel.red .pick-wrapper {
    flex-direction: row-reverse;
}

/* --- Input Styling Adjustments --- */
.tag-input-wrapper {
    width: clamp(60px, 6vw, 85px);
    /* Matches slot width roughly */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- NEW PLAYER TAG STYLES --- */
.player-tag-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1c40f;
    border-radius: 5px;
    padding: 4px;
    font-size: 0.7rem;
    text-align: center;
    font-family: monospace;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.player-tag-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.player-tag-input:focus {
    outline: none;
    border-color: #f1c40f;
    background: rgba(0, 0, 0, 0.5);
}

.player-tag-input.valid {
    border-color: #2ecc71;
    color: #2ecc71;
}

.player-tag-input.error {
    border-color: #e74c3c;
    color: #e74c3c;
}

.player-name {
    font-size: 0.65rem;
    color: #f1c40f;
    text-align: center;
    margin-bottom: 2px;
    font-weight: bold;
    min-height: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    text-transform: none;
    /* Keep original casing for names */
}

.tag-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.save-tag-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px;
    transition: all 0.2s ease;
    display: none;
    /* Hidden by default, show when valid */
    z-index: 5;
}

.save-tag-btn.visible {
    display: block;
}

.save-tag-btn.saved {
    color: #f1c40f;
}

.save-tag-btn:hover {
    transform: scale(1.2);
    color: #f1c40f;
}

.saved-tags-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2c2c2c;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 100;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.saved-tags-dropdown.open {
    display: block;
}

.saved-tag-item {
    padding: 8px;
    font-size: 0.7rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.saved-tag-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.saved-tag-item .tag-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.saved-tag-item .tag-name {
    font-weight: bold;
    color: #f1c40f;
}

.saved-tag-item .tag-val {
    font-size: 0.6rem;
    opacity: 0.6;
}

.saved-tag-item .remove-saved-btn {
    color: rgba(255, 255, 255, 0.3);
    padding: 4px;
}

.saved-tag-item .remove-saved-btn:hover {
    color: #e74c3c;
}

.player-tag-input {
    width: 100%;
    padding-right: 20px;
    /* Space for the star */
}

.draft-map-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.draft-section-title {
    margin: 10px 0;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    letter-spacing: 1px;
}

.team-header {
    text-align: center;
    margin-bottom: 15px;
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
}

.team-header.blue {
    color: #3498db;
}

.team-header.red {
    color: #e74c3c;
}

.brawler-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

#blueBans .brawler-grid,
#redBans .brawler-grid {
    min-height: 50px;
}

.brawler-slot {
    background: #161625 url('../--data/img/placeholder_silhouette.svg') no-repeat center center;
    background-size: 70%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.brawler-slot.filled,
.brawler-slot.skipped {
    background-image: none !important;
}

#blueBans .brawler-slot,
#redBans .brawler-slot {
    width: clamp(40px, 3vw, 50px);
    height: auto;
}

#bluePicks .brawler-slot,
#redPicks .brawler-slot {
    width: clamp(60px, 5vw, 85px);
    height: auto;
}

.brawler-slot.filled {
    background: transparent;
    border: none;
    transform: scale(1.05);
    box-shadow: none;
}

.brawler-slot img {
    height: 100%;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.brawler-slot img.banned-icon {
    filter: grayscale(100%) brightness(0.7);
}

.brawler-slot.next-action-slot {
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: pulse-highlight 1.5s infinite alternate;
}

/* --- PICK WRAPPER SLOT OVERRIDES --- */
.pick-wrapper .brawler-slot {
    width: clamp(60px, 5vw, 85px);
    height: auto;
    aspect-ratio: 1 / 1;

    /* Inherit base slot styles */
    background: #161625 url('../--data/img/placeholder_silhouette.svg') no-repeat center center;
    background-size: 70%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pick-wrapper .brawler-slot.filled {
    border: none;
    transform: scale(1.05);
}

.pick-wrapper .brawler-slot img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.pick-wrapper .brawler-slot.next-action-slot {
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: pulse-highlight 1.5s infinite alternate;
}

/* Hide the old standalone grid IDs if they still exist in CSS but removed from HTML */
#bluePicks,
#redPicks {
    /* These IDs are now reused on the .picks-container, so we KEEP their grid logic override */
    display: flex;
    /* Override previous grid display if any */
}

/* Remove old player-tags-container styles that are no longer used */
.player-tags-container {
    display: none;
}

/* -------------------------------- */

.recommendations {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recommendations h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    color: #fff;
}

.recommendations .rec-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: -15px;
    margin-bottom: 20px;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

@media (min-width: 1200px) {
    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.draft-ended {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.5rem;
}

.rec-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 110px;
}

.rec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.brawler-icon {
    width: clamp(56px, 5vw, 68px);
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 25px;
    right: 12px;
    object-fit: cover;
}

.rec-matchups {
    padding-top: 6px;
}

.rec-card h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #fff;
    margin-top: 0;
}

.rec-stats {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

.rec-stats small,
.rec-matchups small {
    font-size: 0.8rem;
    opacity: 0.9;
    color: #f1c40f;
}

.current-pick {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.prompt-input-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.current-pick h2 {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    color: #fff;
    margin: 0;
}

.current-pick input {
    max-width: 300px;
    min-width: 200px;
    padding: 12px 16px;
    margin-bottom: 0;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Lilita One', cursive;
}

.current-pick input:focus {
    outline: none;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.analysis-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.analysis-panel h3 {
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.8rem;
    color: #fff;
}

.analysis-help-icon {
    font-size: 1.5rem;
    color: #f1c40f;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    vertical-align: middle;
    margin-left: 10px;
}

.analysis-help-icon:hover {
    transform: scale(1.1);
    color: #fff;
}

#analysisTitleInfo {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.score-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.team-analysis {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.analysis-team-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
    text-align: center;
}

.analysis-team-title.blue {
    color: #3498db;
}

.analysis-team-title.red {
    color: #e74c3c;
}

.analysis-brawler-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.analysis-brawler-line strong {
    flex-shrink: 0;
}

.analysis-brawler-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.analysis-brawler-icons img {
    width: 40px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    object-fit: cover;
}

.analysis-brawler-icons span {
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.analysis-scores {
    text-align: center;
    margin: 20px 0;
}

.analysis-scores h4,
.analysis-scores p {
    margin-bottom: 8px;
}

.analysis-details {
    font-size: 0.9rem;
    text-align: left;
    opacity: 0.9;
}

.analysis-details ul {
    list-style-type: none;
    padding-left: 0;
    text-align: center;
}

.analysis-details li {
    margin-bottom: 4px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.analysis-grid-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

.analysis-grid-box h5 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #f1c40f;
    text-transform: uppercase;
    font-size: 1rem;
    text-align: center;
}

.win-probability {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 30px;
}

.probability-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.prob-text {
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.prob-text.blue {
    color: #3498db;
}

.prob-text.red {
    color: #e74c3c;
}

.probability-bar {
    height: 30px;
    background: linear-gradient(90deg, #3498db 50%, #e74c3c 50%);
    border-radius: 15px;
    position: relative;
    margin: 0;
    overflow: hidden;
    flex-grow: 1;
    max-width: 600px;
    transition: background 0.5s ease;
}

.probability-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transition: left 0.5s ease;
}

.hidden {
    display: none !important;
}

.phase-indicator {
    text-align: center;
    margin-bottom: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.phase-indicator h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.4;
}

#mapImageContainer {
    text-align: center;
    width: 100%;
}

#mapImage {
    width: 100%;
    max-height: 430px;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.2);
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

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

.modal-content {
    background: #2c2c2c;
    padding: 30px 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #f1c40f;
    text-align: center;
}

.modal-content p,
.modal-content li {
    margin-bottom: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.modal-content p strong {
    color: #f39c12;
}

.modal-content ul {
    list-style-position: inside;
    padding-left: 10px;
    text-align: left;
}

.modal-content ul li {
    margin-bottom: 10px;
}

.modal-content .key-metric {
    color: #f39c12;
    font-weight: normal;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

.modal-close:hover {
    transform: scale(1.2);
    color: #ff6b6b;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.top-brawler-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 15px;
    width: clamp(110px, 10vw, 140px);
    text-align: center;
}

.top-brawler-card img {
    width: clamp(60px, 6vw, 80px);
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
}

.top-brawler-card .brawler-name {
    font-size: 1.1rem;
    color: #fff;
    text-align: center;
}

.top-brawler-card .brawler-count {
    font-size: 1rem;
    color: #f1c40f;
    font-weight: bold;
}

.suggestions-list {
    display: none;
    position: absolute;
    top: 100%;
    background: #2c2c2c;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
    box-sizing: border-box;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item.selected {
    background-color: rgba(255, 255, 255, 0.1);
}

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

.suggestion-item img {
    width: 40px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    margin-right: 15px;
    object-fit: cover;
}

.suggestion-item span {
    font-size: 1rem;
    color: #fff;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #3498db;
}

input:disabled+.slider {
    cursor: not-allowed;
    background-color: #333;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

.container.text-hidden .analysis-scores {
    display: none;
}

.container.text-hidden .variation-info {
    display: none;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.loading-indicator span {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.progress-container {
    width: 80%;
    max-width: 400px;
    height: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: #f1c40f;
    border-radius: 4px;
    animation: indeterminate-progress 1.5s infinite ease-in-out;
}

/* --- NEW ENGINE STYLES --- */
#engineContainer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: padding 0.3s ease;
}

.engine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

/* Medium screens: allow wrapping to prevent overflow */
@media (max-width: 1300px) {
    .engine-header {
        flex-wrap: wrap;
    }
}

.engine-header h3 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

/* --- MODIFICATION START --- */
.engine-toggle {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Gap between label and switch */
    flex-wrap: wrap;
}

.engine-selector-group {
    justify-content: flex-end;
}

.engine-selector-select {
    min-width: 175px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: 'Lilita One', cursive;
    font-size: 0.9rem;
}

.engine-selector-title {
    min-width: 240px;
    padding: 7px 12px;
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 6px;
}

.engine-selector-variant {
    min-width: 48px;
}

.engine-selector-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.engine-selector-inline > span:first-child {
    order: 0;
}

#engineFamilySelectContainer {
    order: 1;
    flex: 0 0 auto;
}

#engineVariantSelectContainer {
    order: 2;
    flex: 0 0 auto;
}

#engineInfoIcon {
    order: 3;
}

.engine-last-update {
    display: inline-block;
    margin-left: 6px;
    margin-top: 0;
    margin-bottom: 0;
    font-family: 'Lilita One', cursive;
    font-size: 0.84rem;
    line-height: 1;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.01em;
    vertical-align: middle;
}

.engine-info-icon {
    margin-left: 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.engine-selector-select:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 2px rgba(241, 196, 15, 0.2);
}

.engine-selector-select option {
    background: #2c2c2c;
    color: #fff;
    padding: 10px 20px;
    font-family: 'Lilita One', cursive;
}

.engine-selector-select option:hover,
.engine-selector-select option:checked {
    background: rgba(255, 255, 255, 0.1);
}

/* Custom engine dropdown styling */
.engine-select-container {
    position: relative;
    min-width: 175px;
    width: auto;
    font-family: 'Lilita One', cursive;
}

.engine-select-trigger {
    min-width: 175px;
    width: auto;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.engine-select-trigger.engine-selector-title {
    min-width: 216px;
    padding: 7px 12px;
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 6px;
}

.engine-select-trigger.engine-selector-variant {
    min-width: 96px;
    padding: 7px 12px;
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 6px;
    text-align: center;
}

#engineVariantSelectContainer.engine-select-container {
    min-width: 96px;
}

.engine-select-trigger:hover {
    border-color: #f1c40f;
}

.engine-select-container.open .engine-options-wrapper {
    display: block;
}

.engine-options-wrapper {
    display: none;
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    z-index: 10;
    background: #2c2c2c;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.engine-options-wrapper .custom-option {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    font-family: 'Lilita One', cursive;
    font-size: 1.5rem;
    transition: background-color 0.2s ease;
}

/* Variant dropdown specific styling */
.variant-options-wrapper .custom-option {
    font-size: 1.3rem;
    padding: 8px 12px;
    text-align: center;
}

.engine-options-wrapper .custom-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.engine-options-wrapper .custom-option.selected {
    background-color: rgba(241, 196, 15, 0.2);
}

/* --- MODIFICATION END --- */

.engine-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.status-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.status-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #f1c40f;
    font-family: monospace;
}

#principalVariations {
    font-family: monospace;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 50px;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    max-height: 45vh;
    opacity: 1;
    overflow-y: auto;
}

#engineContainer.engine-off {
    padding-top: 20px;
    padding-bottom: 20px;
}

#engineContainer.engine-off .engine-header {
    margin-bottom: 0;
}

#engineContainer.engine-off .engine-status-bar {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

#engineContainer.lines-hidden #principalVariations {
    max-height: 0;
    min-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
}

#engineContainer.lines-hidden .engine-status-bar {
    margin-bottom: 0;
}

.variation-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background-color 0.2s;
    flex-wrap: wrap;
}

.variation-line:hover {
    background: rgba(255, 255, 255, 0.1);
}

.variation-brawlers {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    flex-grow: 1;
    min-width: 0;
}

.variation-brawlers img,
.variation-brawlers .unknown-ban {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    box-sizing: border-box;
}

.variation-brawlers .unknown-ban {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.variation-brawlers img.is-ban,
.variation-brawlers .unknown-ban.is-ban {
    border-style: dotted !important;
    border-width: 3px !important;
}

.variation-brawlers img.is-pick {
    border-style: solid !important;
    border-width: 3px !important;
}

.variation-brawlers span {
    color: rgba(255, 255, 255, 0.8);
}

.variation-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 15px;
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.variation-score {
    font-weight: bold;
    font-size: 1.1rem;
}

.variation-score.positive {
    color: #4caf50;
}

.variation-score.negative {
    color: #f44336;
}

.variation-probability {
    font-weight: bold;
    font-size: 0.9rem;
    color: #f1c40f;
}

.variation-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    padding: 4px 0 0 12px;
    font-family: monospace;
}

.variation-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- NOUVEAUX STYLES POUR L'INFO-BULLE --- */
.justification-icon {
    font-size: 0.9rem;
    color: #f1c40f;
    cursor: help;
    margin-left: 4px;
}

.variation-brawlers .justification-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    margin: 0;
    background-color: #2c2c2c;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    z-index: 2;
}

.justification-icon:hover {
    transform: scale(1.2);
}

#justificationTooltip {
    position: fixed;
    background: #2c2c2c;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px;
    z-index: 10000;
    pointer-events: none;
    font-family: 'Lilita One', cursive;
    font-size: 0.9rem;
    max-width: 250px;
    display: none;
    /* Caché par défaut */
    opacity: 0;
}

#justificationTooltip h5 {
    margin: 0 0 8px 0;
    color: #f1c40f;
    font-size: 1.1rem;
}

#justificationTooltip ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#justificationTooltip li {
    margin-bottom: 4px;
}

/* --- NOUVEAU STYLE POUR LE GUIDE INTERACTIF --- */
.spotlight-guide {
    border-radius: 20px;
    /* Assorti aux panneaux */
    animation: pulse-highlight 1.5s infinite alternate;
    transition: box-shadow 0.3s ease-in-out;
    /* S'assurer que le spotlight est visible même sur des éléments sans fond */
    box-shadow: 0 0 20px rgba(241, 196, 25, 0.8);
}

/* MODIFICATION : Cible spécifiquement les images dans le groupe de sélection du côté */
#sideSelectionGroup.spotlight-guide {
    animation: none;
    box-shadow: none;
}

#sideSelectionGroup.spotlight-guide .side-image {
    animation: pulse-highlight 1.5s infinite alternate;
    box-shadow: 0 0 20px rgba(241, 196, 25, 0.8);
    border-radius: 15px;
}

/* --- COACH'S CORNER STYLES --- */
#coachCorner {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#coachCorner h3 {
    text-align: center;
    color: #f1c40f;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#coachAdviceList {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#coachAdviceList li {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 15px 12px 45px;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
}

#coachAdviceList li::before {
    content: '\f0eb';
    /* FontAwesome lightbulb icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #f1c40f;
    font-size: 1.2rem;
}

.variation-rank {
    color: #f1c40f;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
    /* Empêche le numéro de se compresser */
}

@keyframes indeterminate-progress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(250%);
    }
}

@keyframes pulse {

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

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

@keyframes pulse-highlight {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 1);
    }
}

@media (max-width: 1024px) {
    .main-content.draft-active {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .draft-interface-grid {
        grid-template-columns: 1fr;
    }

    .draft-map-panel {
        order: 1;
    }

    .draft-team-panel.blue {
        order: 2;
    }

    .draft-team-panel.red {
        order: 3;
    }

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

/* Règle Responsive MODIFIÉE pour correspondre au nouveau rendu */
@media (max-width: 850px) {
    .discord-link span {
        display: none;
        /* Cache le texte "Discord" */
    }

    .discord-link {
        padding: 8px 10px;
        /* Adjust padding for icon-only */
        margin-right: 10px;
    }

    .bmc-link span {
        display: none;
        /* Cache le texte */
    }

    .bmc-link {
        padding: 8px 10px;
        /* Adjust padding for icon-only */
        margin-right: 10px;
    }
}

@media (max-width: 768px) {
    .top-nav-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        height: auto;
        padding: 15px;
    }

    .nav-center-title {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-links-right {
        order: 3;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .burger-menu {
        order: 1;
    }

    .nav-center-title {
        order: 2;
    }

    .score-comparison {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

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

    .recommendations.draft-ended {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-center-title h1 {
        font-size: 1.5rem;
    }

    .author-credit {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .setup-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- AUTO-COMPLETE TOGGLE --- */
.autocomplete-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.autocomplete-input-wrapper input[type="text"] {
    padding-right: 36px;
}

.autocomplete-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(35, 30, 63, 0.7);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: all 0.25s ease;
    z-index: 5;
    line-height: 1;
}

.autocomplete-toggle:hover {
    color: rgba(35, 30, 63, 1);
    transform: translateY(-50%) scale(1.15);
}

.autocomplete-toggle.paused {
    color: rgba(35, 30, 63, 0.25);
}

.autocomplete-toggle.paused:hover {
    color: rgba(35, 30, 63, 0.4);
}

/* Brawler input inline toggle styling */
.brawler-input-wrapper {
    max-width: 220px;
    min-width: 160px;
    width: auto;
    flex-grow: 1;
}

.current-pick .brawler-input-wrapper input {
    max-width: none;
    min-width: 0;
    width: 100%;
    margin-bottom: 0;
}

.engine-warning {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ff9999;
    font-size: 0.9rem;
    animation: fadeInWarning 0.3s ease-out;
}

.engine-warning i {
    font-size: 1.2rem;
}

@keyframes fadeInWarning {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* --- TOGGLE WRAP FOR SMALLER SCREENS --- */
@media (max-width: 1100px) {
    .engine-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .engine-toggle {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

/* --- MOBILE RESPONSIVE ENGINE SELECTOR --- */
@media (max-width: 640px) {
    .engine-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }

    .engine-selector-inline {
        flex-wrap: wrap;
        justify-content: center;
    }

    .engine-selector-select,
    .engine-selector-title,
    .engine-selector-variant {
        min-width: 0;
        max-width: 100%;
    }

    .engine-selector-title {
        font-size: 1.3rem;
    }

    .engine-toggle {
        flex-direction: column;
        align-items: center;
    }

    .engine-status-bar {
        gap: 15px;
        max-height: 150px;
    }
}

/* --- BRAWLCHATTER STYLES --- */
.chatter-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.chatter-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 30%;
}

.chatter-title {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.chatter-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    max-width: 100%;
    margin: 0 auto;
}

.chatter-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.left-column {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chatter-header {
    text-align: center;
    margin-bottom: 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.player-tag-section {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 100px;
}

.brawler-selection-section {
    width: 70%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header top: title + subtitle left, search bar right */
.brawler-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.brawler-header-text {
    flex: 1;
    min-width: 0;
}

.brawler-header-text .section-title {
    text-align: left;
    margin-bottom: 6px;
}

.brawler-header-text .section-subtitle {
    text-align: left;
    margin-bottom: 0;
}

/* Search bar inside header */
.brawler-header-top .brawler-search-container {
    flex: 0 0 240px;
    position: relative;
}

.brawler-search-input {
    width: 100%;
    padding: 10px 16px;
    padding-right: 36px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Lilita One', cursive;
    transition: all 0.3s ease;
}

.brawler-search-input:focus {
    outline: none;
    border-color: #7363da;
    box-shadow: 0 0 15px rgba(115, 99, 218, 0.3);
}

.brawler-search-input::placeholder {
    color: #888;
}

.brawler-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.section-subtitle {
    font-size: 1rem;
    color: #888;
    text-align: center;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .brawler-header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .brawler-header-top .brawler-search-container {
        flex: 0 0 auto;
    }

    .brawler-header-text .section-title,
    .brawler-header-text .section-subtitle {
        text-align: center;
    }
}

.tag-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#playerTagInput {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    font-family: 'Lilita One', cursive;
    transition: all 0.3s ease;
}

#playerTagInput:focus {
    outline: none;
    border-color: #7363da;
    box-shadow: 0 0 15px rgba(115, 99, 218, 0.3);
}

#playerTagInput::placeholder {
    color: #888;
}

#loadStatsBtn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #7363da, #5a4bcf);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Lilita One', cursive;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(115, 99, 218, 0.3);
}

#loadStatsBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(115, 99, 218, 0.4);
}

#loadStatsBtn:active {
    transform: translateY(0);
}

.player-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(115, 99, 218, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(115, 99, 218, 0.3);
}

.player-info .club-name {
    color: #a0d8ff;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
}

.player-name-display {
    font-size: 1.3rem;
    color: #ffd700;
    margin-bottom: 0;
    text-align: center;
}

.player-stats-summary p {
    margin-bottom: 4px;
    line-height: 1.4;
    color: #aaa;
}

/* Pad the top of the block so the name-to-stats gap matches section spacers */
.player-stats-summary {
    padding-top: 0.6em;
}

.player-stats-summary p strong {
    color: #fff;
}

.player-stats-summary .stat-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    color: #aaa;
}

.player-stats-summary .stat-row strong {
    flex-shrink: 0;
    color: #fff;
}

.player-stats-summary .stat-val {
    color: #fff;
}

.chatter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
}

.brawler-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
}

/* Trophy rank borders */
.brawler-card.rank-wood {
    border: 3px solid #8B4513;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

.brawler-card.rank-bronze {
    border: 3px solid #CD7F32;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

.brawler-card.rank-silver {
    border: 3px solid #C0C0C0;
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.brawler-card.rank-gold {
    border: 3px solid #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Trophy rank animated glows */
.brawler-card.rank-neon-purple {
    border: 3px solid #9b59b6;
    animation: neon-glow-purple 3s ease-in-out infinite;
}

.brawler-card.rank-neon-red {
    border: 3px solid #e74c3c;
    animation: neon-glow-red 3s ease-in-out infinite;
}

.brawler-card.rank-neon-yellow {
    border: 3px solid #f1c40f;
    animation: neon-glow-yellow 3s ease-in-out infinite;
}

/* Neon glow animations */
@keyframes neon-glow-purple {
    0%, 100% {
        box-shadow: 0 0 3px #9b59b6, 0 0 6px #9b59b6, 0 0 10px #9b59b6;
    }
    50% {
        box-shadow: 0 0 5px #9b59b6, 0 0 10px #9b59b6, 0 0 20px #9b59b6;
    }
}

@keyframes neon-glow-red {
    0%, 100% {
        box-shadow: 0 0 3px #e74c3c, 0 0 6px #e74c3c, 0 0 10px #e74c3c;
    }
    50% {
        box-shadow: 0 0 5px #e74c3c, 0 0 10px #e74c3c, 0 0 20px #e74c3c;
    }
}

@keyframes neon-glow-yellow {
    0%, 100% {
        box-shadow: 0 0 3px #f1c40f, 0 0 6px #f1c40f, 0 0 10px #f1c40f;
    }
    50% {
        box-shadow: 0 0 5px #f1c40f, 0 0 10px #f1c40f, 0 0 20px #f1c40f;
    }
}

.brawler-card .brawler-portrait {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    object-fit: cover;
    background: transparent;
}

.brawler-card .brawler-name {
    font-size: 1rem;
    color: #fff;
    text-align: center;
    margin-bottom: 5px;
}

.brawler-card .trophy-power-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: bold;
    white-space: nowrap;
}

.brawler-card .trophy-power-row .trophy-count {
    color: #ffd700;
    font-weight: bold;
}

.brawler-card .trophy-power-row .power-level-display {
    color: #a0d8ff;
    font-weight: normal;
    font-size: 0.85rem;
}

.brawler-card .has-talk-icon {
    position: absolute;
    top: -11px;
    right: -11px;
    width: 24px;
    height: 24px;
    z-index: 10;
}

.brawler-card .recent-win-icon {
    position: absolute;
    top: -11px;
    left: -11px;
    width: 24px;
    height: 24px;
    z-index: 10;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.brawler-card .mastery-container {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    z-index: 10;
}

.brawler-card .mastery-icon {
    width: 18px;
    height: 22px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

.brawler-card .mastery-icon.locked {
    opacity: 0.3;
    filter: grayscale(100%);
}

.brawler-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.brawler-card.locked:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
}

.brawler-card.selectable {
    cursor: pointer;
}

.brawler-card.selectable:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #7363da !important;
    box-shadow: 0 8px 25px rgba(115, 99, 218, 0.4) !important;
    animation: none !important;
}

.brawler-card.selectable:hover::before {
    display: none !important;
}

.brawler-card.selectable:hover img {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.brawler-card.selected:hover {
    transform: scale(1.1);
    border-color: #ffd700 !important;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5) !important;
    animation: none !important;
}

.brawler-card.selected:hover::before {
    display: none !important;
}

.brawler-card.selected:hover img {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

.brawler-card.selected {
    border-color: #ffd700 !important;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5) !important;
    transform: scale(1.1);
    animation: none !important;
}

.brawler-card.selected::before {
    display: none !important;
}

.brawler-card.selected img {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

/* Unlockables container */
.unlockables-container {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
    background: transparent;
}

/* Unlockable icons */
.brawler-card .unlockable-icon {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin: 0 !important;
    position: relative;
    z-index: 1;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.unlockable-icon:hover {
    opacity: 1;
}

.unlockable-icon.grayed-out {
    opacity: 0.3;
    filter: grayscale(100%);
}

.unlockable-icon.grayed-out:hover {
    opacity: 0.5;
}

/* Cross overlay for locked unlockables */
.unlockable-icon.locked {
    filter: grayscale(100%) brightness(0.5);
    opacity: 0.3;
}

.unlockable-icon.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* Responsive styles for BrawlChatter */
@media (max-width: 900px) {
    .container {
        max-width: 100%;
        padding: 5px;
    }

    .chatter-container {
        padding: 10px;
        width: 100% !important;
    }

    .chatter-content {
        flex-direction: column;
    }

    .brawler-chat-display {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .brawler-speech-bubble {
        width: 100%;
        max-width: 100%;
    }

    .brawler-speech-bubble::before {
        left: 50%;
        top: -20px;
        transform: translateX(-50%);
        border-top: none;
        border-right: 15px solid transparent;
        border-left: 15px solid transparent;
        border-bottom: 20px solid rgba(115, 99, 218, 0.5);
    }

    .chat-brawler-icon {
        width: 100px;
        height: 100px;
    }

    .left-column,
    .player-tag-section,
    .brawler-selection-section {
        width: 100% !important;
        position: static;
    }

    .chatter-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }

    .brawler-card {
        min-width: 100px;
        padding: 10px;
    }

    .brawler-card .brawler-portrait {
        width: 60px;
        height: 60px;
    }

    .chatter-title {
        font-size: 2rem;
    }

    .chatter-description {
        font-size: 1rem;
    }

    .chat-section {
        width: 100% !important;
        padding: 15px;
        max-width: none !important;
    }

    .chat-container {
        max-width: none !important;
    }
}

/* Chat Section Styles */
.chat-section {
    width: 70%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: linear-gradient(45deg, #555, #333);
    margin-bottom: 20px;
}

.chat-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(115, 99, 218, 0.3);
}

.brawler-chat-display {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.chat-brawler-icon {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    border: 4px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.brawler-speech-bubble {
    flex: 1;
    background: rgba(115, 99, 218, 0.2);
    border: 2px solid rgba(115, 99, 218, 0.5);
    border-radius: 20px;
    padding: 20px;
    position: relative;
}

.brawler-speech-bubble::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 30px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 20px solid rgba(115, 99, 218, 0.5);
}

.chat-text {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 60px;
}

.chat-author {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 5px;
    text-align: right;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-option {
    background: linear-gradient(135deg, rgba(115, 99, 218, 0.3), rgba(90, 75, 207, 0.3));
    border: 2px solid rgba(115, 99, 218, 0.5);
    border-radius: 15px;
    padding: 15px 20px;
    color: #fff;
    font-family: 'Lilita One', cursive;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.chat-option:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(115, 99, 218, 0.5), rgba(90, 75, 207, 0.5));
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(115, 99, 218, 0.3);
}

.chat-option:disabled,
.chat-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.chat-option .option-requirement {
    display: block;
    font-size: 0.8rem;
    color: #ffd700;
    margin-top: 5px;
}

.chat-option .option-requirement.locked {
    color: #ff6b6b;
}
