* { box-sizing: border-box; }

body, h1, h3 { margin: 0; }

body {
    background: #0b0d14;
    color: #9ca3af;
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 700;
    min-height: 100vh;
    padding: 24px;
}

button,
input,
.role-card,
.champ-badge,
.rec-item,
.target-btn,
.clear-btn {
    font: inherit;
}

button,
.role-card,
.champ-badge,
.rec-item,
.target-btn,
.clear-btn {
    cursor: pointer;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.hidden { display: none !important; }

#pool-search,
.champ-badge,
.target-btn,
.rec-item {
    background: #141722;
    border-radius: 4px;
}

#pool-search {
    border: none;
    color: inherit;
    padding: 6px 12px;
    width: 160px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.brand h1 {
    font-size: 1.4rem;
}

.brand .subtitle {
    color: #c9a44a;
}

.win-rate-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

#blue-percent,
#red-percent {
    font-size: 1.5rem;
}

#blue-percent { color: #3b82f6; }
#red-percent, .clear-btn:hover { color: #ef4444; }

.icon-btn {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    padding: 6px 12px;
}

.icon-btn:hover,
.icon-btn:focus-visible {
    color: #ffffff;
}

.workspace {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 850px) {
    .workspace { display: grid; grid-template-columns: 1fr; }
}

.teams-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.team-block h3 {
    margin-bottom: 10px;
}

.role-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-card {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.role-card:hover,
.role-card.active-selection {
    background: #171b28;
}

.role-card.active-selection {
    outline: 1px solid #c9a44a;
}

.role-label { width: 36px; }

.champ-name {
    flex-grow: 1;
    margin: 0 8px;
}

.blue-team .role-card.filled .champ-name { color: #60a5fa; }
.red-team .role-card.filled .champ-name { color: #f87171; }

.clear-btn {
    visibility: hidden;
    padding: 2px 8px;
}

.role-card.filled .clear-btn { visibility: visible; }

.target-btn {
    padding: 2px 6px;
    margin-right: 6px;
}

.role-card.user-target .target-btn { background: #10b981; }

.board-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pool-help {
    margin-left: 6px;
    font-size: 0.85rem;
}

.champion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
}

.champ-badge {
    padding: 8px;
    text-align: center;
}

.champ-badge:hover {
    background: #1c2030;
    color: #ffffff;
}

.champ-badge.pool-selected {
    background: rgba(201, 164, 74, 0.15);
    color: #c9a44a;
}

.champ-badge.picked { display: none !important; }

.recommendations-box h4 {
    color: #c9a44a;
    margin-bottom: 8px;
}

.recommendations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rec-item { padding: 5px 8px; }
.rec-diff { color: #10b981; margin-left: 5px; }
.rec-diff.negative { color: #f87171; }

.disclaimer {
    margin-top: 24px;
    font-size: 0.8rem;
    line-height: 1.5;
}

button:focus-visible,
input:focus-visible,
.champ-badge:focus-visible,
.role-card:focus-visible {
    outline: 2px solid #c9a44a;
    outline-offset: 2px;
}

@media (max-width: 560px) {
    body { padding: 14px; }
    .top-bar { align-items: flex-start; }
    .win-rate-display { order: 3; width: 100%; justify-content: center; }
    .champion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #pool-search { width: 100%; }
    .board-controls { width: 100%; }
    .pool-help { display: block; margin: 4px 0 0; }
}
