.banner-gen-main-container {
    width: 95%;
    margin: 32px auto;
    font-family: 'Montserrat', sans-serif;
}

.banner-gen-overlay {
    background: rgba(0,0,0,0.7);
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

.bgen-wrap {
    width: 100%;
}

.bgen-title {
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    text-align: left;
    letter-spacing: 2px;
}

#gm-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,224,102,0.2);
    border-radius: 6px;
    color: #f2f2f2;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s, background 0.2s;
}

#gm-input:focus {
    outline: none;
    border-color: rgba(255,224,102,0.6);
    background: rgba(0,0,0,0.5);
}

/* ── Controls ── */
.bgen-controls {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.bgen-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 180px;
}

.bgen-field label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #b0bec5;
    text-transform: uppercase;
}

.bgen-field select {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #f2f2f2;
    border: 1px solid rgba(255,224,102,0.2);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s;
    cursor: pointer;
}

.bgen-field select:focus {
    outline: none;
    border-color: rgba(255,224,102,0.6);
}

/* ── Player slots ── */
.bgen-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.bgen-slot {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    border-radius: 10px;
    border-left: 4px solid #0d47a1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 0.75rem;
    min-width: 155px;
    flex: 1 1 155px;
    max-width: 185px;
    position: relative;
    transition: box-shadow 0.2s, border-color 0.2s, opacity 0.2s;
    cursor: grab;
}

.bgen-slot:hover {
    border-left-color: #ffe066;
    box-shadow: 0 4px 16px rgba(255,224,102,0.12);
}

.bgen-slot.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.bgen-slot.drag-over {
    border-left-color: #ffe066;
    box-shadow: 0 0 0 2px rgba(255,224,102,0.4);
}

.slot-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.slot-drag {
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    cursor: grab;
    transition: color 0.15s;
}

.slot-drag:hover {
    color: rgba(255,224,102,0.6);
}

.slot-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #b0bec5;
    text-transform: uppercase;
}

.slot-search {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,224,102,0.2);
    border-radius: 6px;
    color: #f2f2f2;
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.3rem;
    transition: border-color 0.2s, background 0.2s;
}

.slot-search:focus {
    outline: none;
    border-color: rgba(255,224,102,0.6);
    background: rgba(0,0,0,0.5);
}

.slot-results {
    position: absolute;
    z-index: 200;
    background: rgba(15,20,35,0.98);
    border: 1px solid rgba(255,224,102,0.3);
    border-top: none;
    border-radius: 0 0 8px 8px;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.slot-result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.15s;
}

.slot-result-item:hover {
    background: rgba(255,224,102,0.08);
}

.slot-result-icon {
    color: rgba(255,224,102,0.4);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.result-name {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.slot-no-result {
    padding: 0.55rem 0.8rem;
    color: #b0bec5;
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
}

.slot-selected {
    margin-top: 0.45rem;
    min-height: 18px;
}

.slot-empty {
    color: #4a4a4a;
    font-size: 0.75rem;
    font-family: 'Montserrat', sans-serif;
}

.slot-player-preview {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0,0,0,0.3);
    border-radius: 7px;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(255,224,102,0.1);
}

.slot-player-preview img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.slot-player-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.slot-player-name {
    font-size: 0.78rem;
    color: #fff;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-player-team {
    font-size: 0.68rem;
    color: #b0bec5;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-clear {
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.72rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.slot-clear:hover {
    color: #e74c3c;
    background: rgba(231,76,60,0.1);
}

/* ── Actions ── */
.bgen-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.bgen-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 1.05rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bgen-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bgen-btn.success {
    background: #27ae60;
    color: #fff;
}

.bgen-btn.success:not(:disabled):hover {
    background: #2ecc71;
    box-shadow: 0 4px 16px rgba(39,174,96,0.35);
}

.bgen-field select {
    background: #1a1a1a;
    color: #f2f2f2;
    border: 1px solid rgba(255,224,102,0.2);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s;
    cursor: pointer;
}

.bgen-field select option {
    background: #1a1a1a;
    color: #f2f2f2;
}

.bgen-btn.secondary {
    background: #95a5a6;
    color: #fff;
}

.bgen-btn.secondary:not(:disabled):hover {
    background: #7f8c8d;
    box-shadow: 0 4px 16px rgba(149,165,166,0.35);
}

.bgen-btn.primary {
    background: #3498db;
    color: #fff;
}

.bgen-btn.primary:not(:disabled):hover {
    background: #2980b9;
    box-shadow: 0 4px 16px rgba(52,152,219,0.35);
}

/* ── Preview ── */
.bgen-preview-wrap {
    display: flex;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255,224,102,0.08);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

#banner-canvas {
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.7);
    max-width: 100%;
    height: auto;
    image-rendering: crisp-edges;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .banner-gen-overlay { padding: 16px 8px; }
    .bgen-controls { gap: 0.75rem; }
    .bgen-field { min-width: 100%; }
    .bgen-slots { gap: 0.75rem; }
    .bgen-slot { max-width: 100%; flex: 1 1 100%; }
    .bgen-actions { flex-direction: column; }
    .bgen-btn { width: 100%; justify-content: center; }
    .bgen-preview-wrap { padding: 0.75rem; }
}


#btn-help {
    background: #1a56db;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
#btn-help:hover {
    background: #1e40af;
    box-shadow: 0 4px 16px rgba(26,86,219,0.4);
}
.help-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
}
.help-modal-content {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    margin: auto;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2rem;
    border: 1px solid rgba(255,224,102,0.3);
    border-radius: 12px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    color: #f2f2f2;
}
.help-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.help-close:hover {
    color: #ffe066;
}
.help-modal h2 {
    color: #ffe066;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.help-modal h3 {
    color: #ffe066;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.help-modal p, .help-modal li {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.help-modal ul {
    list-style: none;
    padding-left: 0;
}
.help-modal ul li:before {
    content: "✅ ";
    margin-right: 0.5rem;
}
.help-modal ol {
    padding-left: 1.5rem;
}