/**
 * 计分器插件公共样式表
 *
 * @package    Scoreboard
 * @subpackage Scoreboard/public/css
 * @author     Scoreboard Developer
 */
 .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){
    max-width: 100%;
 }
/* 基本样式 */
.scoreboard-setup,
.scoreboard-game {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
}

/* 设置界面样式 */
.scoreboard-setup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.scoreboard-setup-preview {
    background: linear-gradient(135deg, #1a3c5a, #2c5282);
    padding: 25px;
    border-bottom: none;
    position: relative;
}

.scoreboard-setup-form {
    padding: 30px;
}

.scoreboard-setup-section {
    margin-bottom: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.scoreboard-setup-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.scoreboard-setup-section h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
    color: #2c5282;
    font-weight: 600;
}

.scoreboard-setup-teams {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    gap: 20px;
}

.team-setup {
    flex: 1 1 300px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-setup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.team-setup.home {
    border-left: 4px solid #2c5282;
}

.team-setup.away {
    border-left: 4px solid #4a1a3c;
}

.team-name-input,
.team-logo-input,
.rule-input {
    margin-bottom: 20px;
}

.team-name-input label,
.team-logo-input label,
.rule-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    font-size: 15px;
}

.team-name-input input,
.rule-input input {
    width: 100%;
    padding: 10px 2px;
    border: 2px solid #eaeaea;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: #fcfcfc;
}
.scoreboard-setup-rules label{color: #333;}
.team-name-input input:focus,
.rule-input input:focus {
    border-color: #2c5282;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
    background-color: #fff;
}

.logo-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.logo-upload-button {
    background: #2c5282;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-upload-button:hover {
    background: #1a3c5a;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.logo-upload-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.logo-hint {
    color: #999;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
    text-align: center;
    margin: 0 auto;
}

.scoreboard-setup-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.rule-input {
    flex: 1 1 200px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.rule-input:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.scoreboard-setup-actions {
    margin-top: 40px;
    text-align: center;
}

.start-game-button {
    background: linear-gradient(135deg, #2980b9, #2c5282);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
    letter-spacing: 0.5px;
}

.start-game-button:hover {
    background: linear-gradient(135deg, #3498db, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(41, 128, 185, 0.4);
}

.start-game-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
}

/* 比赛界面通用样式 */
.scoreboard-game {
    background: linear-gradient(135deg, #1a1a1a, #222);
    color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.scoreboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #0f0f0f, #1a1a1a);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.scoreboard-title {
    font-size: 18px;
    font-weight: bold;
}

.scoreboard-controls {
    display: flex;
}

.scoreboard-control-button {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scoreboard-control-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.scoreboard-control-button:active {
    transform: translateY(0);
}

.scoreboard-main {
    display: flex;
    padding: 20px;
}

/* 模态窗口样式 */
.scoreboard-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.scoreboard-modal-content {
    background-color: white;
    margin: 0;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 80%;
    color: #333;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.scoreboard-modal-content h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
    color: #2c5282;
    font-weight: 600;
    font-size: 20px;
}

.scoreboard-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.scoreboard-modal-close:hover {
    color: #000;
}

.modal-buttons {
    margin-top: 20px;
    text-align: center;
    width: 100%;
    float: left;
}

.scoreboard-button {
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: #f7f7f7;
    margin-left: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.scoreboard-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.scoreboard-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.scoreboard-button-primary {
    background: #2c5282;
    color: white;
}

.scoreboard-button-primary:hover {
    background: #1a3c5a;
}

.scoreboard-button-danger {
    background: #e53e3e;
    color: white;
    box-shadow: 0 2px 6px rgba(229, 62, 62, 0.2);
}

.scoreboard-button-danger:hover {
    background: #c53030;
    box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
}

.scoreboard-modal-cancel {
    background: #718096;
    color: white;
}

.time-edit-form {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    justify-content: center;
}

.time-input-group,
.stats-input-group {
    flex: 0 0 auto;
  
    padding: 0 10px;
    margin-bottom: 15px;
    text-align: center;
}

.stats-edit-form {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    justify-content: center;
}

.time-input-group label,
.stats-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.time-input-group input,
.stats-input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 分享预览样式 */
/* 警告提示 */
.scoreboard-alert {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #ff6b6b;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.scoreboard-alert.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.share-preview {
    background: #f5f5f5;
    padding: 20px;
    margin-top: 15px;
    border-radius: 4px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 分享内容样式 */
.scoreboard-share-content {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background: linear-gradient(135deg, #1a3c5a, #2c5282);
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.share-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.share-score-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.share-team {
    flex: 1;
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 40%;
}

.share-team.home {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.share-team-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-team-logo img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.share-team-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-team-score {
    font-size: 36px;
    font-weight: bold;
}

.share-score-vs {
    font-size: 20px;
    font-weight: bold;
    margin: 0 15px;
    color: rgba(255, 255, 255, 0.7);
}

.share-extra-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.share-time, .share-quarter {
    margin: 5px 0;
}

.scoreboard-watermark {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
}

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

.scoreboard-control-button .dashicons {
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 容器特定样式 - 防止多个实例之间的样式冲突 */
.scoreboard-container {
    margin-bottom: 30px;
    position: relative;
}

/* 避免全局控制按钮冲突 */
.scoreboard-container .scoreboard-control-panel {
    z-index: 10;
}

/* 解决模态窗口冲突 */
.scoreboard-container .scoreboard-modal {
    z-index: 100;
}

/* 发球指示器样式 */
.serve-indicator-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.serve-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffd700; /* 金黄色 */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
    transition: all 0.3s ease;
}

.serve-indicator-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    width: 100%;
    max-width: 300px;
}

/* 场地布局 */
.court-layout {
    width: 100%;
    height: 180px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
}

.court-side {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.player1-court {
    border-right: 2px solid rgba(255, 255, 255, 0.7);
}

.player2-court {
    border-left: 0;
}

.court-area {
    width: 100%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.court-area:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.left-top, .right-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.left-bottom, .right-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.area-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.court-net {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    transform: translateX(-50%);
}

/* 发球指示器 */
.serve-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ffd700; /* 金黄色 */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    position: absolute;
    transition: all 0.3s ease;
    z-index: 5;
}

/* 发球区域高亮 */
.court-area.active {
    background-color: rgba(255, 215, 0, 0.2);
}

/* 发球位置 - 四个区域 */
.serve-icon.p1-left {
    top: 25%;
    left: 25%;
    transform: translate(-50%, -50%);
}

.serve-icon.p1-right {
    top: 75%;
    left: 25%;
    transform: translate(-50%, -50%);
}

.serve-icon.p2-left {
    top: 75%;
    left: 75%;
    transform: translate(-50%, -50%);
}

.serve-icon.p2-right {
    top: 25%;
    left: 75%;
    transform: translate(-50%, -50%);
}

/* 乒乓球单打 - 中心发球位置 */
.serve-icon.p1-center {
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
}

.serve-icon.p2-center {
    top: 50%;
    left: 75%;
    transform: translate(-50%, -50%);
}

/* 响应式样式 */
@media (max-width: 768px) {
    .scoreboard-main {
        flex-direction: column;
    }
    
    .scoreboard-team-section,
    .scoreboard-center-section {
        margin-bottom: 20px;
    }
    .scoreboard-setup-form {
        padding: 30px 0;
    }
}