.k510-view[hidden] {
  display: none !important;
}

.k510-list-actions {
  margin-bottom: 20px;
}

.k510-note {
  margin-top: 20px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.k510-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.k510-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
}

.k510-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.k510-form-label {
  min-width: 88px;
  font-size: 14px;
  color: #374151;
}

.k510-input {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
}

.k510-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: #2563eb;
}

.k510-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
}

.k510-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.k510-team-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px;
}

.k510-team-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #059669;
  margin-bottom: 12px;
}

.k510-team-b {
  color: #2563eb;
}

.k510-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.k510-player-row label {
  min-width: 56px;
  font-size: 13px;
  color: #4b5563;
  flex-shrink: 0;
}

.k510-player-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.k510-form-actions {
  display: flex;
  gap: 12px;
}

.k510-form-actions .tb-btn {
  flex: 1;
}

.k510-history .k510-section-title {
  margin-bottom: 12px;
}

.k510-game-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.k510-game-item {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 44px 14px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.k510-game-item:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.k510-game-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.k510-game-time {
  color: #6b7280;
}

.k510-game-count {
  color: #059669;
  font-weight: 600;
}

.k510-game-teams {
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
}

.k510-game-team-label {
  color: #6b7280;
}

.k510-game-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  color: #6b7280;
}

.k510-game-settled {
  color: #059669;
  font-weight: 600;
}

.k510-delete-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.k510-empty {
  text-align: center;
  color: #9ca3af;
  padding: 32px 0;
  font-size: 14px;
}

.k510-empty[hidden] {
  display: none;
}

.k510-score-top {
  margin-bottom: 16px;
}

.k510-settings-info {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: 14px;
  color: #374151;
}

.k510-round-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.k510-round-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111827;
}

.k510-team-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.k510-score-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.k510-score-field-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.k510-score-field-input {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

.k510-score-field-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: #2563eb;
}

.k510-gang-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.k510-gang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.k510-gang-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #374151;
}

.k510-gang-item input {
  width: 56px;
  flex-shrink: 0;
  padding: 8px 6px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  text-align: center;
  font: inherit;
  box-sizing: border-box;
}

.k510-round-actions {
  display: flex;
  gap: 12px;
}

.k510-round-actions .tb-btn {
  flex: 1;
}

.k510-round-history {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.k510-round-item {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.k510-round-item:last-child {
  border-bottom: none;
}

.k510-round-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.k510-gang-records {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #6b7280;
}

.k510-game-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.k510-settled-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.k510-final-scores {
  margin-bottom: 16px;
}

.k510-player-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 15px;
}

.k510-player-score:last-child {
  border-bottom: none;
}

.k510-amount-positive {
  color: #059669;
  font-weight: 700;
}

.k510-amount-negative {
  color: #dc2626;
  font-weight: 700;
}

@media (max-width: 768px) {
  body.k510-score-page .content {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .k510-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .k510-form-label {
    min-width: 0;
  }

  .k510-input {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
  }

  .k510-settings-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .k510-team-scores {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .k510-round-panel,
  .k510-round-history,
  .k510-settled-panel,
  .k510-section {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .k510-teams {
    grid-template-columns: 1fr;
  }
}
