.glhf-notice{
    background:#fff9c4;
    padding:6px 10px;
    margin:10px 0;
    border-left:4px solid #f6c343;
    border-radius:4px;
    font-size:14px;
}
ul{margin:6px 0 12px 22px;font-size:15px;line-height:1.4}

button.add .dashicons     {color:#28a745}
button.remove .dashicons,
button.ban .dashicons     {color:#dc3545}

.bracket{
    display:flex;
    gap:48px;
    justify-content:center;
    margin:30px 0;
    overflow-x:auto;
    padding-bottom:10px;
    position: relative;
}

.round{
    list-style:none;
    padding:0;
    width:220px;
    display:flex;
    flex-direction:column;
    align-items:stretch;
}

.round .spacer{
    flex:2;
    min-height:40px;
}

.game{
    position:relative;
    padding:8px 10px;
    margin:0;
    background:#f3f4f6;
    border:1px solid #cfd3da;
    font-size:14px;
    line-height:1.35;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
    transition: background 0.18s, color 0.18s;
}
.game.top   {border-bottom:none;border-radius:6px 6px 0 0}
.game.bot   {border-top:none;border-radius:0 0 6px 6px}

.game.winner{
    background:#d1e7dd;
    border-color:#badbcc;
    font-weight:600;
    color:#0f5132;
}

.game.bye{
    background:#e9ecef;
    border-color:#dee2e6;
    font-style:italic;
    color:#6c757d;
}

a.glhf-win{
    text-decoration:none;
    border-bottom:none;
    color:#0d6efd;
}
a.glhf-win:hover{color:#084298}

.game.spacer{
    flex:0;
    width:0;
    min-height:1px;
    padding:0;
    margin:0 auto;
    position:relative;
    border:none;
    background:none;
}
.game.spacer::before{
    content:"";
    position:absolute;
    left:50%;
    top:0;
    transform:translateX(-50%);
    height:100%;
    border-left:2px solid #cfd3da;
}

.game.top::before,
.game.bot::before{
    content:"";
    position:absolute;
    right:-46px;
    width:42px;
    height:2px;
    background:#cfd3da;
}
.game.top::before{top:50%}
.game.bot::before{top:0}

.game.top::after,
.game.bot::after{
    content:"";
    position:absolute;
    right:-4px;
    width:8px;
    height:8px;
    border-right:2px solid #cfd3da;
    border-bottom:2px solid #cfd3da;
    border-radius:1px;
    transform:rotate(-45deg);
}
.game.top::after{top:calc(50% - 4px)}
.game.bot::after{top:-1px}

svg.bracket-lines {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.champion{
    text-align:center;
    margin-top:20px;
    font-size:1.25em;
    font-weight:700;
}

@media (max-width:768px){
    .bracket{gap:28px}
    .round{width:180px}
    .game{font-size:13px}
}

ul.glhf-part-list, .glhf-part-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 6px 0 12px 0;
}
.glhf-part-list li {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    font-size: 15px;
    gap: 4px;
    background: none;
    border: none;
    box-shadow: none;
}

button,
input[type="submit"],
form button,
.glhf-remove-btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, color 0.18s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    outline: none;
    margin: 2px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
button:hover,
input[type="submit"]:hover,
form button:hover,
.glhf-remove-btn:hover {
    background: #084298;
}

.glhf-remove-btn {
    background: #fff;
    color: #dc3545;
    border: 2px solid #dc3545;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-right: 8px;
    margin-left: 0;
}
.glhf-remove-btn:hover {
    background: #ffeaea;
    color: #fff;
    border-color: #dc3545;
}

.glhf-manual button,
form button:not(.glhf-remove-btn) {
    min-width: 40px;
    margin: 5px 0;
    padding: 5px 20px;
    font-size: 15px;
    height: 44px;
    border-radius: 10px;
}

.glhf-manual {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    button, input[type="submit"], .glhf-remove-btn {
        font-size: 13px;
        padding: 5px 10px;
        min-height: 28px;
        min-width: 28px;
    }
    .glhf-remove-btn {
        width: 24px;
        height: 24px;
        font-size: 15px;
        min-width: 24px;
        min-height: 24px;
    }
    .glhf-part-list li {
        font-size: 13px;
    }
}

.glhf-draggable-slot {
    cursor: grab;
    transition: box-shadow 0.15s, background 0.15s;
    z-index: 2;
}
.glhf-draggable-slot.dragging {
    opacity: 0.7;
    box-shadow: 0 0 0 3px #0d6efd44;
    background: #e7f1ff;
}
.glhf-draggable-slot.dragover {
    box-shadow: 0 0 0 3px #19875499;
    background: #e9fbe7;
}

ul.glhf-app-list, .glhf-app-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 6px 0 12px 0;
}
.glhf-app-list li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 15px;
    gap: 4px;
    background: none;
    border: none;
    box-shadow: none;
}

ul.glhf-app-list button.glhf-accept-btn,
ul.glhf-app-list button.glhf-reject-btn {
    background: #fff;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 18px !important;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    box-shadow: none !important;
    border: 2px solid #dc3545 !important;
    color: #dc3545 !important;
    margin-right: 4px;
}
ul.glhf-app-list button.glhf-accept-btn {
    background: #fff !important;
    border: 2px solid #198754 !important;
    color: #198754 !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 18px !important;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    box-shadow: none !important;
    margin-right: 4px;
}
ul.glhf-app-list button.glhf-accept-btn:hover {
    background: #d1f7e2 !important;
    color: #198754 !important;
}
ul.glhf-app-list button.glhf-accept-btn .dashicons,
ul.glhf-app-list button.glhf-reject-btn .dashicons {
    font-size: 18px !important;
    line-height: 1 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
ul.glhf-app-list button.glhf-reject-btn:hover {
    background: #ffeaea !important;
    color: #dc3545 !important;
}

.glhf-ban-btn {
    background: #fff3cd;
    color: #ffc107;
    border: 2px solid #ffc107;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    margin-right: 4px;
    font-size: 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.glhf-ban-btn:hover {
    background: #fffbe6;
    color: #856404;
}

.glhf-part-name {
    margin-left: 4px;
}

#glhf-wrapper {
    width: 95% !important;
    margin: auto;
}
#glhf-main input, #glhf-main textarea {
    width: 300px;
    height: 30px;
    line-height: 1.5;
    padding: 5px 10px;
    margin: 5px 0;
    border-radius: 10px;
    border: 2px solid #0d6efd;
}
#glhf-main textarea {
    height: 70px;
}
#glhf-main p {
    margin: 5px 0;
}
#glhf-main p strong {
    font-weight: 800;
}
#glhf-main h2 {
    font-weight: 800;
}
input[name="guest_nick_discord"] {
    margin: 0 5px 0 0 !important;
}
input[name="guest_nick_cs2"] {
    margin: 0 5px 0 0 !important;
}
button[value="withdraw"], button[value="delete"] {
    background: #f00;
}
button[value="withdraw"]:hover, button[value="delete"]:hover  {
    background: #c00;
}
button#glhf-finalize-bracket {
    height: 44px;
    padding: 5px 25px;
}
.game.winner {
    position: relative;
}
li.game.top {
    position: relative;
}
li.game.top .glhf-erase-btn,
li.game.bot .glhf-erase-btn {
    display: none;
}
li.game.top.winner:hover .glhf-erase-btn,
li.game.bot.winner:hover .glhf-erase-btn {
    display: block;
    opacity: 0.4;
    background: #fff;
}
li.game.top.winner:hover .glhf-erase-btn .dashicons,
li.game.bot.winner:hover .glhf-erase-btn .dashicons {
    color: #888;
}
.glhf-erase-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: opacity 0.18s, background 0.18s;
    z-index: 10;
    align-items: center;
    justify-content: center;
}
.glhf-erase-btn .dashicons {
    font-size: 18px;
    color: #888;
    line-height: 1;
    transition: color 0.18s;
}
.glhf-erase-btn:hover {
    opacity: 1 !important;
    background: #f8f9fa;
    transition: opacity 0.18s, background 0.18s;
}
.glhf-erase-btn:hover .dashicons {
    color: #dc3545 !important;
    transition: color 0.18s;
}
li.game {
    position:relative;
    padding:8px 10px;
    margin:0;
    background:#f3f4f6;
    border:1px solid #cfd3da;
    font-size:14px;
    line-height:1.35;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
    transition: background 0.18s, color 0.18s;
    border-radius: 10px;
}
.moderator li.game:not(.winner):not(.has-winner):hover {
    background: #b6f2c6;
    outline: 2px solid #7be495;
    cursor: pointer;
    transition: background 0.18s, outline 0.18s;
}
li.game {
    cursor: default;
}
.moderator li.game.has-winner,
.moderator li.game.winner {
    cursor: default;
    outline: none;
}
.glhf-win {
    display: inline;
    background: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: 0;
    box-sizing: border-box;
    transition: none;
}
li.game.winner {
    outline: none;
}