/**
 * 计分器插件篮球模式样式表
 *
 * @package    Scoreboard
 * @subpackage Scoreboard/public/css
 * @author     Scoreboard Developer
 */

/* 篮球记分牌预览样式 */
.scoreboard-basketball-preview {
    background: #1a3c5a;
    color: white;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.scoreboard-basketball-preview .scoreboard-team {
    flex: 1;
    text-align: center;
}

.scoreboard-basketball-preview .scoreboard-center {
    flex: 2;
    text-align: center;
}

.scoreboard-basketball-preview .score-display {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.scoreboard-basketball-preview .score-divider {
    margin: 0 10px;
}

.scoreboard-basketball-preview .timer-display {
    font-size: 24px;
    color: #ffcc00;
}

.scoreboard-basketball-preview .team-name {
    margin-bottom: 10px;
    font-weight: bold;
}

/* 篮球记分牌比赛界面样式 - 基础设置 */
.scoreboard-basketball-game,
.scoreboard-basketball-game * {
    box-sizing: border-box;
}

.scoreboard-basketball-game .scoreboard-main {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
}

.scoreboard-team-section {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a3c5a, #2c5282);
    border-radius: 12px;
    margin: 0 5px;
    /* 减小间距 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 0;
    /* 允许Flex项目收缩 */
}

.scoreboard-team-section:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.scoreboard-main .home,
.scoreboard-setup-teams .home {
    background: linear-gradient(135deg, #1a3c5a, #2c5282);
}

.scoreboard-main .away,
.scoreboard-setup-teams .away {
    background: linear-gradient(135deg, #4a1a3c, #6b2957);
}

.scoreboard-center-section {
    flex: 1.2;
    text-align: center;
    padding: 20px;
    background: linear-gradient(180deg, #111, #1a1a1a);
    border-radius: 12px;
    margin: 0 5px;
    /* 减小间距 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 0;
    /* 允许Flex项目收缩 */
}

.scoreboard-center-section:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.team-header {
    margin-bottom: 10px;
}

.team-logo {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: #f5f5f5;
    margin: 0 auto 10px;
    overflow: hidden;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.team-score {
    font-size: 64px;
    font-weight: bold;
    margin: 25px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.team-score:hover {
    transform: scale(1.05);
}

.team-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-edit {
    display: flex;
    align-items: center;
}

.stat-edit-button {
    background: none;
    border: none;
    color: #ffcc00;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.stat-edit-button:hover {
    transform: scale(1.2);
}

.stat-label {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

/* 超出限制时的样式 */
.stat-value.limit-exceeded {
    color: #ff6b6b;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.score-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.score-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 8px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.score-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.score-button-minus {
    background: rgba(255, 80, 80, 0.2);
    border: 1px solid rgba(255, 80, 80, 0.4);
}

.score-button-minus:hover {
    background: rgba(255, 80, 80, 0.3);
}

.game-timer {
    font-size: 52px;
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
    transition: all 0.3s ease;
}

.game-timer:hover {
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    transform: scale(1.03);
}

.timer-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
}

.timer-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 10px;
    margin: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.timer-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.timer-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.shot-clock-container {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.shot-clock {
    font-size: 40px;
    color: #ff6b6b;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.shot-clock:hover {
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
    transform: scale(1.03);
}

.shot-clock.flash {
    animation: flash-red 1s;
}

@keyframes flash-red {

    0%,
    100% {
        color: #ff6b6b;
        text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }

    50% {
        color: #ff3333;
        text-shadow: 0 0 20px rgba(255, 51, 51, 0.6);
    }
}

.shot-clock-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.shot-clock-button {
    background: rgba(255, 107, 107, 0.15);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.shot-clock-button:hover {
    background: rgba(255, 107, 107, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
}

.quarter-display {
    font-size: 18px;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.quarter-value {
    font-weight: bold;
    margin: 0 8px;
    font-size: 22px;
    min-width: 30px;
    transition: all 0.2s ease;
}

.quarter-button {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quarter-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

#scoreboard-basketball-quarter-down {
    color: #ff6b6b;
}

.stat-edit {
    display: flex;
    align-items: center;
    margin: 0 5px;
}

.stat-edit-button {
    background: rgba(255, 204, 0, 0.1);
    border: none;
    color: #ffcc00;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-edit-button:hover {
    background: rgba(255, 204, 0, 0.2);
    transform: scale(1.1);
}

/* Dashicons样式修复 */
.dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.scoreboard-control-button .dashicons,
.timer-button .dashicons,
.shot-clock-button .dashicons,
.quarter-button .dashicons,
.stat-edit-button .dashicons {
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .scoreboard-basketball-game .scoreboard-main {
        flex-direction: column;
    }

    .scoreboard-team-section,
    .scoreboard-center-section {
        margin: 10px 0;
    }
}