/* Base styles and resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

h1 {
  font-size: 28px;
  color: #1a73e8;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

#connection-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #f44336;
}

#connection-indicator.connected {
  background-color: #4caf50;
}

/* Keyboard shortcuts styles */
.keyboard-shortcuts {
  position: relative;
  cursor: help;
}

.shortcut-badge {
  display: inline-block;
  font-size: 20px;
  background-color: #f0f0f0;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.shortcuts-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #333;
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  width: 200px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.keyboard-shortcuts:hover .shortcuts-tooltip {
  opacity: 1;
  visibility: visible;
}

.shortcuts-tooltip p {
  margin: 5px 0;
  font-size: 14px;
}

.shortcuts-tooltip kbd {
  background-color: #555;
  border-radius: 3px;
  padding: 2px 5px;
  font-family: monospace;
  font-size: 12px;
}

/* Main layout */
main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.section {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.timer-section {
  grid-column: 1 / -1;
}

.game-config-section {
  grid-column: 1;
  background-color: #eef7ff;
  border-left: 4px solid #2196f3;
  display: flex;
  flex-direction: column;
}

.game-section {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  background-color: #f0f7ff;
  border-left: 4px solid #3f51b5;
}

.game-config-section h2, 
.game-section h2 {
  margin-bottom: 15px;
}

.game-config-section h2 {
  color: #2196f3;
}

.game-section h2 {
  color: #3f51b5;
}

.teams-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.period-section {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background-color: #f8f0ff;
  border-left: 4px solid #673ab7;
}

.period-section h2 {
  color: #673ab7;
  margin-bottom: 15px;
}

/* Timer controls */
.timer-display {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
  font-family: 'Roboto Mono', monospace;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 8px;
}

/* Timer scores */
.timer-scores {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
}

.timer-home-score,
.timer-away-score {
  width: 30%;
  text-align: center;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.timer-home-score h3,
.timer-away-score h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #333;
}

.timer-home-score {
  background-color: #e6f7ff;
  border-color: #1a73e8;
}

.timer-away-score {
  background-color: #fff0f0;
  border-color: #e53935;
}

.timer-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.quick-score-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.quick-score-control .score-display {
  font-size: 24px;
  font-weight: bold;
  min-width: 40px;
}

.quick-score-control .score-btn {
  font-size: 18px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.time-set {
  margin-bottom: 15px;
}

.time-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}

.time-input {
  width: 60px;
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.time-adjust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Media query adjustments for smaller screens */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }

  .game-config-section,
  .game-section {
    grid-column: 1;
  }

  .teams-section {
    grid-template-columns: 1fr;
  }

  .timer-display {
    font-size: 36px;
  }

  h1 {
    font-size: 24px;
  }
  
  .timer-scores {
    flex-direction: column;
    gap: 10px;
  }
  
  .timer-home-score,
  .timer-away-score {
    width: 100%;
  }
  
  .timer-controls {
    width: 100%;
    margin: 10px 0;
  }
}

/* Team controls */
.team-control {
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.team-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #ddd;
}

.preset-btn {
  font-size: 14px;
  padding: 5px 10px;
  background-color: #f5f5f5;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background-color: #4CAF50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Style for team preset buttons specifically */
.team1-control .preset-btn:hover {
  background-color: #43A047;
}

.team2-control .preset-btn:hover {
  background-color: #2E7D32;
}

.team-name-control,
.team-logo-control,
.score-control {
  margin-bottom: 15px;
}

/* Center the score section */
.score-control {
  text-align: center;
}

.score-control label {
  display: block;
  margin-bottom: 5px;
}

.team-input {
  display: block;
  width: 100%;
  padding: 8px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.file-input {
  margin: 5px 0;
}

.score-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 5px;
}

.score-display {
  font-size: 32px;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

.score-btn {
  font-size: 20px;
  font-weight: bold;
  width: 40px;
  height: 40px;
}

/* Period controls */
.period-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.period-display {
  font-size: 36px;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

.period-btn {
  font-size: 18px;
  font-weight: bold;
  width: 40px;
  height: 40px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background-color: #e0e0e0;
  color: #333;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #d0d0d0;
}

.btn.primary {
  background-color: #1a73e8;
  color: white;
}

.btn.primary:hover {
  background-color: #1557b0;
}

.btn.danger {
  background-color: #f44336;
  color: white;
}

.btn.danger:hover {
  background-color: #d32f2f;
}

.btn.secondary {
  background-color: #673ab7;
  color: white;
}

.btn.secondary:hover {
  background-color: #512da8;
}

.full-width {
  width: 100%;
  margin-bottom: 10px;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 14px;
  color: #777;
}

/* Update Next Period button styling */
.btn.highlight {
  background-color: #ff9800;
  color: white;
  min-width: 130px;
  transition: all 0.3s ease;
}

.btn.highlight:hover {
  background-color: #f57c00;
}

/* Add animation for changing text */
@keyframes textFade {
  0% { opacity: 0.7; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0.7; }
}

.btn.highlight.active {
  animation: textFade 3s ease;
}

/* Styles for the team utility controls */
.team-utility-controls {
  display: flex;
  justify-content: center;
  margin: 20px 0 5px;
  padding: 15px;
  background-color: #f8f8f8;
  border-radius: 4px;
  grid-column: 1 / -1;
}

.utility-btn {
  font-size: 18px;
  padding: 10px 20px;
  background-color: #455a64;
  color: white;
  transition: all 0.2s ease;
  min-width: 250px;
}

.utility-btn:hover {
  background-color: #37474f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Game Information Section */
.game-info-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.game-info-panel {
  background-color: #f9f9f9;
  border-radius: 5px;
  padding: 10px;
  margin-top: 10px;
}

.game-date-time {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.game-date-container, .game-time-container {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.date-input, .time-input {
  display: block;
  width: 100%;
  padding: 8px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.game-info-display {
  background-color: #e3f2fd;
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
  text-align: center;
}

#current-game-info {
  font-weight: bold;
  color: #1565c0;
}

/* Team Management Section */
.team-management-section {
  grid-column: 1 / -1;
  background-color: #f5f8ff;
  border-left: 4px solid #3f51b5;
}

.team-management-section h2 {
  color: #3f51b5;
  margin-bottom: 15px;
}

.team-management-panel {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.team-list-container {
  padding: 15px;
  border-top: 1px solid #e0e0e0;
}

.teams-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.team-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.team-item:hover {
  background-color: #f5f5f5;
}

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

.team-item-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 50%;
  background-color: #f9f9f9;
  padding: 3px;
  border: 1px solid #eee;
}

.team-item-info {
  flex-grow: 1;
  padding: 0 10px;
}

.team-item-name {
  font-weight: bold;
  margin-bottom: 3px;
  color: #333;
}

.team-item-display {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 2px;
}

.team-item-abbr {
  font-size: 0.85em;
  color: #777;
  font-style: italic;
}

.team-item-actions {
  display: flex;
  gap: 5px;
}

.team-item-edit,
.team-item-delete {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 4px;
}

.team-item-edit {
  background-color: #3f51b5;
  color: white;
}

.team-item-edit:hover {
  background-color: #303f9f;
}

.team-item-delete {
  background-color: #f44336;
  color: white;
}

.team-item-delete:hover {
  background-color: #d32f2f;
}

.team-form-container {
  padding: 15px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.team-form-container h3 {
  color: #3f51b5;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #ccc;
}

#team-form .form-group {
  margin-bottom: 15px;
}

#team-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #444;
}

.team-input {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.team-input:focus {
  border-color: #3f51b5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.form-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.form-buttons .btn.highlight {
  background-color: #3f51b5;
}

.form-buttons .btn.highlight:hover {
  background-color: #303f9f;
}

.no-teams-message {
  padding: 20px;
  text-align: center;
  color: #757575;
  font-style: italic;
  background-color: #f5f5f5;
  border-radius: 4px;
  margin-top: 10px;
}

/* Game configuration section */
.game-config-section {
  background-color: #eef7ff;
  border-left: 4px solid #2196f3;
}

.game-config-section h2 {
  color: #2196f3;
  margin-bottom: 15px;
}

.game-config-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.config-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.config-control label {
  min-width: 150px;
  font-weight: 500;
  color: #444;
}

.config-input {
  width: 80px;
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

#save-game-config {
  margin-top: auto;
  background-color: #2196f3;
  color: white;
}

#save-game-config:hover {
  background-color: #1976d2;
}

/* Game controls and preview styles */
.game-controls {
  margin-bottom: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Style for the Open Overlay Preview button */
.game-controls a.btn.secondary {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  padding: 12px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.game-controls a.btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(103, 58, 183, 0.3);
}

/* Penalty Display Controls */
.penalty-display-controls {
  margin-top: 20px;
  padding: 12px;
  background-color: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.penalty-display-controls h4 {
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
  color: #444;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.penalty-toggle-buttons {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.penalty-toggle {
  flex: 1;
  padding: 8px 12px;
  background-color: #e0e0e0;
  color: #333;
  transition: all 0.2s ease;
}

.penalty-toggle:hover {
  background-color: #d0d0d0;
}

.penalty-toggle.active {
  background-color: #f44336;
  color: white;
}

.penalty-toggle.active:hover {
  background-color: #d32f2f;
}

/* Game History Section */
.game-history-section {
  grid-column: 1 / -1;
  background-color: #f5f8ff;
  border-left: 4px solid #3f51b5;
}

.game-history-section h2 {
  color: #3f51b5;
  margin-bottom: 15px;
}

.game-history-container {
  margin-top: 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
  position: relative;
}

/* Loading animation for game history */
.game-history-container.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 5;
}

.game-history-container.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #3f51b5;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  z-index: 6;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  table-layout: fixed;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid #ddd;
}

.history-table th {
  background-color: #3f51b5;
  color: white;
  position: sticky;
  top: 0;
}

.history-table tr:nth-child(even) {
  background-color: #f5f5f5;
}

.history-table tr:hover {
  background-color: #e3f2fd;
}

.no-history-message {
  padding: 20px;
  text-align: center;
  color: #757575;
  font-style: italic;
}

/* Finish game button styles */
.btn.special {
  background: linear-gradient(135deg, #00c853, #009688);
  color: white;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 18px;
  padding: 12px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 150, 136, 0.3);
}

.btn.special:hover {
  background: linear-gradient(135deg, #00e676, #00bfa5);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 150, 136, 0.4);
}

.game-result {
  background-color: #e8f5e9;
  padding: 15px;
  border-radius: 4px;
  margin: 15px 0;
  text-align: center;
  font-weight: bold;
  color: #2e7d32;
}

/* Form styling */
.form-group {
  margin-bottom: 15px;
}

.form-hint {
  display: block;
  font-size: 0.8em;
  color: #777;
  margin-top: 3px;
}

/* Penalty controls */
.penalty-control {
  margin-top: 15px;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  background-color: #f9f9f9;
  display: none; /* Hide by default */
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Add a toggle button for penalty controls */
.penalty-toggle-btn {
  display: block;
  width: 100%;
  margin-top: 15px;
  padding: 8px;
  background-color: #673ab7;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s;
}

.penalty-toggle-btn:hover {
  background-color: #5e35b1;
}

.penalty-toggle-btn.active {
  background-color: #f44336;
}

.penalty-control h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

.penalty-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.penalty-display span {
  font-size: 24px;
  font-weight: bold;
  font-family: monospace;
}

.penalty-status {
  display: flex;
  align-items: center;
}

.penalty-input {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.penalty-input input {
  width: 50px;
  text-align: center;
  padding: 5px;
  font-size: 16px;
}

.penalty-input span {
  margin: 0 5px;
  font-size: 18px;
}

.penalty-buttons {
  display: flex;
  justify-content: space-between;
}

.penalty-buttons button {
  padding: 5px 10px;
  flex-grow: 1;
  margin: 0 5px;
}

.penalty-buttons button:first-child {
  margin-left: 0;
}

.penalty-buttons button:last-child {
  margin-right: 0;
}

.btn-danger {
  background-color: #f44336;
  color: white;
  border: none;
}

.btn-danger:hover {
  background-color: #d32f2f;
}

/* Goal Horn Controls */
.goal-horn-control {
  margin: 15px 0;
  padding: 10px;
  background-color: #fff9e0;
  border-radius: 6px;
  border-left: 3px solid #ffc107;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-horn-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.goal-horn-toggle label {
  font-size: 14px;
  cursor: pointer;
}

.goal-horn-config {
  margin: 15px 0;
  padding: 15px;
  background-color: #f0f7ff;
  border-radius: 8px;
  border-left: 3px solid #2196f3;
  margin-bottom: 20px;
}

.goal-horn-config h4 {
  color: #2196f3;
  margin-bottom: 10px;
  font-size: 16px;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 5px;
}

.goal-horn-file-container,
.goal-horn-volume-container,
.goal-horn-master-toggle {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.goal-horn-volume-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #2196f3;
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #2196f3;
  border-radius: 50%;
  cursor: pointer;
}

#volume-value {
  font-size: 14px;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
}

/* Sound Settings Section */
.sounds-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background-color: #f5f8ff;
  border-left: 4px solid #2196f3;
}

.sounds-section h2 {
  color: #2196f3;
  margin-bottom: 15px;
  grid-column: 1 / -1;
}

.sounds-section .goal-horn-config {
  grid-column: 1 / -1;
  margin: 0;
  border-left: none;
  background-color: transparent;
}

.sounds-section .goal-horn-config h3 {
  color: #2196f3;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
}

.sounds-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.goal-horn-main-settings {
  padding: 15px;
  background-color: #f0f7ff;
  border-radius: 8px;
  border-left: 3px solid #2196f3;
}

.team-goal-horn-settings {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.team-horn-control {
  padding: 15px;
  background-color: #fff9e0;
  border-radius: 8px;
  border-left: 3px solid #ffc107;
}

.team-horn-control h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  border-bottom: 1px dashed #ffc107;
  padding-bottom: 5px;
  color: #ff9800;
}

.goal-horn-settings h3 {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .sounds-container {
    grid-template-columns: 1fr;
  }
}

.btn:focus, button:focus {
  box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.5);
}

/* Section Row for side-by-side sections */
.section-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.section-row .section {
  margin-bottom: 0;
}

/* Period Section */
.period-header {
  margin-bottom: 10px;
}

.period-section {
  background-color: var(--section-bg);
  padding: 15px;
  border-radius: 8px;
}

#period-control-panel {
  padding-top: 10px;
}

/* Sound settings section */
.sound-settings-section {
  background-color: #fff5f0;
  border-left: 4px solid #ff9800;
}

.sound-settings-section h2 {
  color: #ff9800;
  margin-bottom: 15px;
}

.sound-settings-header {
  margin-bottom: 15px;
}

.sound-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.compact-goal-horn-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goal-horn-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.team-horn-toggles {
  display: flex;
  gap: 15px;
}

.team-horn-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
}

.small-label {
  font-size: 14px;
  font-weight: 500;
}

.test-buttons {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.small-btn {
  padding: 5px 10px;
  font-size: 12px;
}

/* Media query for responsive layout */
@media (max-width: 992px) {
  .section-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .period-section {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .section-row {
    grid-template-columns: 1fr;
  }
  
  .period-section, 
  .game-info-section,
  .sound-settings-section {
    grid-column: 1;
  }
}

/* Add green hover effects for team Update buttons */
#update-team1-name:hover,
#update-team1-logo:hover {
  background-color: #43A047; /* Same as team1 preset buttons */
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#update-team2-name:hover,
#update-team2-logo:hover {
  background-color: #2E7D32; /* Same as team2 preset buttons */
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Score buttons hover effects */
.team1-control .score-btn:hover {
  background-color: #43A047; /* Same green as other team1 buttons */
  color: white;
}

.team2-control .score-btn:hover {
  background-color: #2E7D32; /* Same green as other team2 buttons */
  color: white;
} 