/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Typography - Large text for elderly users */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 20px;
  line-height: 1.6;
  color: #000000;
  background-color: #ffffff;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1a1a1a;
}

/* Large touch targets for elderly users - 60x60px minimum */
.song-item {
  min-height: 60px;
  min-width: 100%;
  padding: 20px;
  margin-bottom: 12px;
  font-size: 22px;
  border: 2px solid #333;
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.1s ease;
  text-align: left;
  display: block;
  width: 100%;
}

/* Visual feedback within 100ms */
.song-item:active {
  background-color: #e0e0e0;
  transform: scale(0.98);
}

.song-item:hover {
  background-color: #eaeaea;
}

/* Active song highlighting */
.song-item.active {
  background-color: #ffeb3b;
  border-color: #f57c00;
  font-weight: bold;
}

/* Control buttons - 60x60px touch targets */
.controls {
  display: none;
  margin: 24px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.controls.visible {
  display: flex;
}

.control-btn {
  min-width: 60px;
  min-height: 60px;
  font-size: 18px;
  padding: 12px 20px;
  border: 2px solid #000;
  background: #fff;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.1s ease;
}

.control-btn:active {
  background: #e0e0e0;
  transform: scale(0.95);
}

.control-btn:focus {
  outline: 3px solid #007bff;
  outline-offset: 2px;
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Error messages - large, high contrast */
.error {
  font-size: 20px;
  color: #d32f2f;
  background: #ffebee;
  padding: 20px;
  border: 2px solid #d32f2f;
  border-radius: 8px;
  margin: 20px 0;
}

/* Loading indicator */
.loading {
  font-size: 20px;
  color: #1976d2;
  padding: 20px;
  text-align: center;
}

/* Progress bar */
#progress-container {
  display: none;
  margin: 24px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
}

#progress-container.visible {
  display: block;
}

#current-song-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
}

progress {
  width: 100%;
  height: 20px;
  border-radius: 4px;
}

#time-display {
  font-size: 18px;
  margin-top: 8px;
  color: #666;
}

/* Status indicator */
.status-indicator {
  font-size: 20px;
  margin: 12px 0;
  padding: 12px;
  background: #e3f2fd;
  border-radius: 8px;
}

/* Responsive design - portrait */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  h1 {
    font-size: 28px;
  }

  .song-item {
    font-size: 20px;
    padding: 18px;
  }
}

/* Responsive design - landscape */
@media (min-width: 601px) and (max-width: 1024px) {
  .controls {
    justify-content: center;
  }
}

/* Touch-action to prevent unwanted zoom */
button, .song-item {
  touch-action: manipulation;
}

/* High visibility focus indicators */
*:focus {
  outline: 3px solid #007bff;
  outline-offset: 2px;
}
