* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  width: 100%;
  margin: 20px auto;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

header {
  margin-bottom: 25px;
  text-align: center;
}

header h1 {
  font-size: 2.1rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

header p{
  font-size: 1rem;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
}

.settings-panel {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.setting-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #2c3e50;
  font-size: 14px;
}

.setting-item input,
.setting-item select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.setting-item input:focus,
.setting-item select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.scoreboard-container {
  position: relative;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  background-color: #383838;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scoreboard-top{
  display: flex;
  flex-direction: column;
}
.scoreboard-header {
  line-height: 1;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scoreboard-title {
  font-size: 38px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.3s;
  text-align: center;
}

.scoreboard-title:hover {
  background: rgba(255, 255, 255, 0.15);
}

.innings-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.inning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-width: 100px;
}

.inning-score {
  position: relative;
  /* 添加相对定位 */
  background: rgba(175, 175, 175, 0.2);
  color: white;
  font-size: 34px;
  font-weight: bold;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.inning-score:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.inning-decrement {
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.inning-decrement:hover {
  background: rgba(255, 255, 255, 0.2);
}

.inning-decrement:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.teams-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  margin: auto;
  gap: 80px;
}

.team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  transition: all 0.3s;
  position: relative;
  margin: 20px;
  border-radius: 12px;
  background: #696969;
  cursor: pointer;
  user-select: none;
}

.team.home {
  margin-right: 10px;
}

.team.away {
  margin-left: 10px;
}

.team-name {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 30px;
  color: white;
  padding: 5px 15px;
  border-radius: 6px;
  transition: background 0.3s;
  text-align: center;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-score {
  font-size: 170px;
  font-weight: bold;
  font-family: 'Arial', sans-serif;
  color: #f8f8f8;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0 20px;
  border-radius: 8px;
  line-height: 1.2;
}

.team-score:hover {
  transform: scale(1.1);
}

.team.home.highlight {
  background: #FF5722;
  box-shadow: 0 0 20px rgba(230, 50, 50, 0.3);
}

.team.away.highlight {
  background: #2196F3;
  box-shadow: 0 0 20px rgba(50, 100, 230, 0.3);
}

.decrement-btn {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none;
  transition: background 0.3s;
}

.decrement-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.decrement-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.actions {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: transparent !important;
  gap: 20px;
}

.action-btn {
  background: #5a5a5a;
  color: white;
  border: none;
  padding: 8px 25px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  justify-content: center;
}

.action-btn:hover {
  background: #6a6a6a;
  transform: translateY(-2px);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn.fullscreen {
  background: #3498db;
}

.action-btn.fullscreen:hover {
  background: #2980b9;
}

.action-btn.decrement {
  background: #e74c3c;
}

.action-btn.decrement:hover {
  background: #c0392b;
}

.action-btn.copy {
  background: #2ecc71;
}

.action-btn.copy:hover {
  background: #27ae60;
}

.action-btn.clear {
  background: #f39c12;
}

.action-btn.clear:hover {
  background: #d35400;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #2c3e50;
}

.modal p {
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.5;
  color: #555;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.modal-btn {
  padding: 10px 25px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

.modal-btn.cancel {
  background: #ecf0f1;
  color: #333;
}

.modal-btn.cancel:hover {
  background: #d5dbdb;
}

.modal-btn.confirm {
  background: #e74c3c;
  color: white;
}

.modal-btn.confirm:hover {
  background: #c0392b;
}

/* LED字体样式 */
@font-face {
  font-family: 'LEDFont';
  src: url('./led.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.led {
  font-family: LEDFont;
}

.white-bg .scoreboard-title,
.white-bg .team-name,
.white-bg .team-score,
.white-bg .inning-score {
  color: #333 !important;
}

.white-bg .team {
  background: rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.white-bg .team.highlight.home {
  background: rgba(255, 100, 100, 0.4) !important;
  box-shadow: 0 0 15px rgba(255, 100, 100, 0.2) !important;
}

.white-bg .team.highlight.away {
  background: rgba(100, 150, 255, 0.4) !important;
  box-shadow: 0 0 15px rgba(100, 150, 255, 0.2) !important;
}

.white-bg .inning-score {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #ddd;
}

.white-bg .inning-decrement {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #666 !important;
}

.white-bg .inning-decrement,
.white-bg .decrement-btn {
  background: #e9ecef;
  color: #495057;
}

.white-bg .inning-decrement:hover,
.white-bg .decrement-btn:hover {
  background: #dee2e6 !important;
}

footer {
  text-align: center;
  margin-top: 30px;
  color: #7f8c8d;
  font-size: 14px;
  padding: 20px 0;
}

/* 全屏样式调整 */
:fullscreen .actions {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 100;
}

:fullscreen .action-btn:not(.fullscreen):not(.decrement) {
  display: none;
}

.fullscreen .team-score{
  font-size: 270px;
}

.fullscreen .scoreboard-title{
  font-size: 50px;
}

.fullscreen .team-name{
  font-size: 62px;
}
.fullscreen .innings-container{
  margin-top: 30px;
}

.fullscreen .innings-container .inning-score{
  width: 120px;
  height: 120px;
  font-size: 42px;
}

.fullscreen .teams-container {
  gap: 130px;
}
