#damageLogControlContainer {
    order: 0 !important;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 6px 8px;
    background: #0d1b26;
    border-bottom: 1px solid #12222d;
    font-family: "Segoe UI", "Yu Gothic UI", sans-serif;
}

#damageLogPanel {
    position: fixed;
    bottom: 80px;
    right: 0;
    width: 410px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    z-index: 150;
    pointer-events: auto;
}

#damageLogPanel #logContainer {
    position: relative;
    order: 1 !important;
    width: 100%;
    box-sizing: border-box;
    height: 160px;
    overflow-y: scroll;
    border: 1px solid rgba(0, 0, 0, 0.8);
    background-color: rgba(0, 0, 0, 0.56);
    padding: 5px;
    font-size: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.1);
    z-index: 1;
    flex: 0 0 auto;
}

.damage-log-control-row {
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.damage-log-match-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.damage-log-nav-btn {
    width: 26px;
    height: 24px;
    padding: 0;
    border-radius: 4px;
    border: 1px solid #1f3f4f;
    background: #16303d;
    color: #cfe8f2;
    font-size: 12px;
    cursor: pointer;
}

.damage-log-nav-btn:hover { background: #1f4453; }
.damage-log-nav-btn.active { background: #2f7fd6; border-color: #2f7fd6; color: #fff; }

.damage-log-match-label {
    width: 100px;
    text-align: center;
    color: #9fb9c4;
    font-size: 11px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.damage-log-control-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: space-between;
}

.damage-log-autoscroll-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.damage-log-autoscroll-toggle .autoscroll-label { color: #cfe8f2; font-size: 11px; white-space: nowrap; }
.damage-log-autoscroll-toggle input { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 0; border-radius: 3px; border: 1px solid #3a6577; background: #16303d; cursor: pointer; position: relative; flex-shrink: 0; }
.damage-log-autoscroll-toggle input:checked { background: #2f7fd6; border-color: #2f7fd6; }
.damage-log-autoscroll-toggle input:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #061420; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.damage-log-display-target { display: flex; width: 100%; overflow: hidden; border: 1px solid #1f3f4f; border-radius: 4px; background: #16303d; }
.damage-log-display-target button { flex: 1; padding: 5px 8px; border: none; background: transparent; color: #8fa9b5; font-size: 11px; cursor: pointer; white-space: nowrap; }
.damage-log-display-target button + button { border-left: 1px solid #1f3f4f; }
.damage-log-display-target button.active { background: #2f7fd6; color: #fff; }
.damage-log-display-target button:hover:not(.active) { background: #1f4453; color: #cfe8f2; }

.battle-log-meta { margin: 5px 0; padding: 5px; border: 1px solid #2a4a59; border-radius: 4px; background: rgba(13, 27, 38, 0.9); color: #d7e7ed; font-size: 10px; line-height: 1.35; }
.battle-log-meta-title { margin-bottom: 4px; color: #cfe8f2; font-size: 11px; font-weight: 700; }
.battle-log-meta-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.battle-log-meta-table th, .battle-log-meta-table td { padding: 2px 4px; border: 1px solid rgba(116, 164, 181, 0.25); overflow-wrap: anywhere; vertical-align: top; }
.battle-log-meta-table th.team-red { color: #ff8a8a; }
.battle-log-meta-table th.team-blue { color: #85baff; }
.battle-log-meta-table .battle-log-winner { color: #ffe07b; font-weight: 800; }

@media (max-width: 768px) {
    #damageLogPanel { bottom: 60px; left: 10px; right: 10px; width: auto; z-index: 1000; }
    #damageLogPanel #logContainer { position: relative; bottom: auto; left: auto; right: auto; width: 100%; height: 120px; }
}

@media (max-width: 480px) {
    #damageLogPanel #logContainer { height: 100px; }
}
