.arena-card {
    background: var(--card-bg);
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.arena-card .back-btn {
    position: static;
}

.screen {
    display: none;
}

.screen-active {
    display: block;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    min-width: 30px;
}

.arena-card .back-btn {
    display: block;
    padding: 6px 12px;
    border-radius: 8px;
    background: #1f1f1f;
    border: 1px solid #444;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    opacity: 0.85;
    justify-content: flex-end;
}

.arena-card h1 {
    margin: 0 0 4px;
}

.arena-card .subtitle {
    margin: 0 0 18px;
    opacity: 0.8;
    font-size: 14px;
}

.player-block {
    margin-top: 10px;
    margin-bottom: 10px;
}

.player-block label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.arena-card #player-name {
    width: 100%;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #151515;
    color: #fff;
    font-size: 14px;
}

.arena-card #player-name:focus {
    outline: none;
    border-color: #d51ac3;
}

.player-hint {
    margin: 4px 0 0;
    font-size: 11px;
    opacity: 0.7;
}

.controls {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.primary-btn,
.secondary-btn {
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.primary-btn {
    background: #d51ac3;
    border: none;
    color: #fff;
}

.secondary-btn {
    background: #1f1f1f;
    border: 1px solid #444;
    color: #fff;
}

.secondary-btn.disabled {
    opacity: 0.4;
    cursor: default;
}

.result-layout { margin-top: 10px; }
.result-info p { margin: 4px 0; }
.result-player { margin: 4px 0 8px; font-size: 13px; opacity: 0.8; }
.result-controls { margin-top: 20px; }

.result-name-edit { margin-top: 12px; }
.result-name-edit label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    opacity: 0.9;
}

#result-name-input {
    width: 100%;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #151515;
    color: #fff;
    font-size: 14px;
}

#result-name-input:focus {
    outline: none;
    border-color: #d51ac3;
}

#result-name-save-btn { margin-top: 6px; }

.lb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.lb-tab {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #444;
    background: #1b1b1b;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.lb-tab-active {
    border-color: #d51ac3;
    background: #d51ac3;
    color: #fff;
}

.lb-table-wrapper { margin-top: 10px; overflow-x: auto; }

.lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.lb-table th,
.lb-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.lb-table th { font-weight: 600; opacity: 0.9; }
.lb-table tr:nth-child(even) td { background: #151515; }
.lb-empty { text-align: center; opacity: 0.7; }
.lb-table tr:nth-child(1) td { font-weight: 700; }
.lb-table tr:nth-child(2) td,
.lb-table tr:nth-child(3) td { font-weight: 600; }
.lb-table tr:nth-child(-n+3) td { background: transparent !important; }

@media (max-width: 600px) {
    .arena-card .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .stats { justify-content: flex-start; }
    .controls { flex-direction: column; }
    .primary-btn, .secondary-btn { width: 100%; text-align: center; }
}
