/* LSV League - Frontend Styles */

.lsv-league-overview,
.lsv-group,
.lsv-match-submit,
.lsv-my-matches,
.lsv-player-profile {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Period header */
.lsv-period-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e5e5;
}

.lsv-period-header h2 {
    margin: 0;
}

.lsv-period-dates {
    color: #666;
    font-size: 14px;
}

/* Group section */
.lsv-group {
    margin-bottom: 32px;
}

.lsv-group h3 {
    margin: 0 0 12px;
    font-size: 1.3em;
    color: #333;
}

/* Standings table */
.lsv-standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
}

.lsv-standings-table th {
    text-align: center;
    padding: 8px 6px;
    background: #2c3e50;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lsv-standings-table th.lsv-player {
    text-align: left;
}

.lsv-standings-table th.lsv-rank {
    width: 32px;
}

.lsv-standings-table td {
    text-align: center;
    padding: 8px 6px;
    border-bottom: 1px solid #eee;
}

.lsv-standings-table td.lsv-player {
    text-align: left;
    font-weight: 500;
}

.lsv-standings-table td.lsv-rank {
    font-weight: 700;
    color: #2c3e50;
}

.lsv-standings-table td.lsv-points {
    font-size: 15px;
}

.lsv-standings-table tbody tr:hover {
    background: #f8f9fa;
}

/* Match results */
.lsv-matches-list {
    margin-top: 12px;
}

.lsv-matches-list h4 {
    font-size: 1em;
    margin: 0 0 8px;
    color: #555;
}

.lsv-match-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

.lsv-match-result.pending {
    background: #fff9e6;
    border-left: 3px solid #f0c040;
}

.lsv-match-result.completed {
    background: #f0f7f0;
}

.lsv-player-name {
    min-width: 120px;
    text-align: right;
}

.lsv-player-name:last-child {
    text-align: left;
}

.lsv-winner {
    font-weight: 700;
}

.lsv-score {
    font-family: monospace;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.lsv-vs {
    color: #999;
    font-size: 12px;
}

/* Match submit form */
.lsv-match-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.lsv-match-players {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 16px;
}

.lsv-game-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lsv-game-row label {
    min-width: 70px;
    font-weight: 600;
    font-size: 13px;
}

.lsv-game-row input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.lsv-game-row span {
    font-weight: 700;
    font-size: 18px;
}

/* Buttons */
.lsv-btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.lsv-btn-primary {
    background: #2c3e50;
    color: #fff;
}

.lsv-btn-primary:hover {
    background: #1a252f;
}

.lsv-btn-small {
    padding: 4px 12px;
    font-size: 12px;
    background: #e5e5e5;
    color: #333;
}

.lsv-btn-small:hover {
    background: #d5d5d5;
}

.lsv-form-actions {
    margin-top: 16px;
}

.lsv-submit-message {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.lsv-submit-message.success {
    background: #d4edda;
    color: #155724;
}

.lsv-submit-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Player profile */
.lsv-profile-header {
    margin-bottom: 16px;
}

.lsv-rating-card {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.lsv-rating-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.lsv-rating-label {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 4px;
}

.lsv-rating-details {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
}

/* Login prompt */
.lsv-login-prompt {
    text-align: center;
    padding: 32px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Info/error messages */
.lsv-error {
    color: #721c24;
    background: #f8d7da;
    padding: 12px;
    border-radius: 4px;
}

.lsv-info {
    color: #0c5460;
    background: #d1ecf1;
    padding: 12px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .lsv-match-result {
        flex-direction: column;
        gap: 4px;
    }

    .lsv-player-name {
        min-width: auto;
        text-align: center !important;
    }

    .lsv-standings-table {
        font-size: 12px;
    }

    .lsv-standings-table th,
    .lsv-standings-table td {
        padding: 6px 3px;
    }

    .lsv-period-header {
        flex-direction: column;
        gap: 4px;
    }
}
