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

: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);
}

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

.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: 8px;
    background-color: rgba(88, 101, 242, 0.8); /* Discord brand color */
    padding: 8px 12px;
    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: background-color 0.3s ease;
}

.discord-link:hover {
    background-color: rgba(88, 101, 242, 1);
}

.discord-link .fab {
    font-size: 1.2rem;
}
/* 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;
    justify-content: center;
    gap: 15px; /* Utilise le même écart que la ligne du prompt */
    width: 100%;
}

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

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

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

.suggestions-column {
    display: contents;
}

#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;
}

.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: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#blueBans .brawler-slot, #redBans .brawler-slot {
    width: clamp(40px, 3vw, 50px);
    height: clamp(40px, 3vw, 50px);
}
#bluePicks .brawler-slot, #redPicks .brawler-slot {
    width: clamp(60px, 5vw, 85px);
    height: clamp(60px, 5vw, 85px);
}

.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: contain;
    border-radius: 12px;
}

.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: clamp(60px, 5vw, 85px);
    
    /* Inherit base slot styles */
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    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: contain;
    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: clamp(56px, 5vw, 68px);
    border-radius: 12px;
    background-color: rgba(0,0,0,0.2);
    position: absolute;
    top: 25px;
    right: 12px;
}

.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;
    align-items: flex-start;
    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: 40px;
    border-radius: 8px;
}
.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: clamp(60px, 6vw, 80px);
    border-radius: 12px;
}

.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: 40px;
    border-radius: 8px;
    margin-right: 15px;
}

.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;
}
.engine-header h3 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

/* --- MODIFICATION START --- */
.engine-toggle {
    display: flex;
    flex-direction: column; /* Stacks the groups */
    align-items: flex-end;   /* Aligns groups to the right */
    gap: 10px;
    font-size: 1rem;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Gap between label and switch */
}
/* --- 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;
}

#suggestionsContainer.suggestions-hidden #suggestionsGrid,
#suggestionsContainer.suggestions-hidden .rec-subtitle {
    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;
    transition: transform 0.2s;
}
.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;
    transition: opacity 0.2s ease;
}

#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;
    }
}

@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;
    }
}