/* Bocce League Handicap Calculator - Styles */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; background: #f8f9fa; }
header { background: linear-gradient(135deg, #6b4c3a 0%, #8c6d5a 100%); color: white; padding: 1.5rem 1rem; }
header h1 { margin: 0 0 0.5rem; font-size: 1.75rem; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
nav a { color: rgba(255,255,255,0.9); text-decoration: none; font-weight: 500; padding: 0.25rem 0.5rem; border-radius: 4px; transition: background 0.2s; }
nav a:hover, nav a:focus { background: rgba(255,255,255,0.1); }
main { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
section { background: white; margin-bottom: 1.5rem; padding: 1.25rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
h2 { margin-top: 0 0 0.75rem; color: #6b4c3a; }
h3 { color: #555; margin-top: 1rem; }
.preset-selector { margin: 1rem 0; }
.preset-selector fieldset { border: 1px solid #ddd; border-radius: 6px; padding: 0.75rem; }
.preset-selector legend { font-weight: 600; padding: 0 0.25rem; }
.preset-selector label { display: block; padding: 0.25rem 0; cursor: pointer; }
.players-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.players-table th, .players-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #eee; }
.players-table th { background: #f0f0f0; font-weight: 600; }
.players-table input[type="text"] { width: 100%; max-width: 150px; padding: 0.25rem; border: 1px solid #ccc; border-radius: 4px; }
.players-table input[type="number"] { width: 80px; padding: 0.25rem; border: 1px solid #ccc; border-radius: 4px; }
.handicap-cell { font-weight: 600; text-align: center; }
.handicap-cell.positive { color: #2e7d32; }
.handicap-cell.negative { color: #c62828; }
.handicap-cell.zero { color: #666; }
.remove-player { background: none; border: none; color: #999; font-size: 1.2rem; cursor: pointer; padding: 0; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.remove-player:hover, .remove-player:focus { background: #ffebee; color: #c62828; }
.form-controls { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0; }
button { padding: 0.5rem 1rem; border: 1px solid #6b4c3a; background: #6b4c3a; color: white; border-radius: 6px; cursor: pointer; font-size: 1rem; transition: background 0.2s; }
button:hover, button:focus { background: #8c6d5a; }
button[type="button"] { background: #6b4c3a; }
button[type="button"]:hover, button[type="button"]:focus { background: #8c6d5a; }
#add-player { background: #4caf50; border-color: #4caf50; }
#add-player:hover, #add-player:focus { background: #66bb6a; }
#reset-all { background: #9c27b0; border-color: #9c27b0; }
#reset-all:hover, #reset-all:focus { background: #ba68c8; }
#calculate-btn { background: #ff9800; border-color: #ff9800; }
#calculate-btn:hover, #calculate-btn:focus { background: #ffb74d; }
#copy-results, #print-results { background: #607d8b; border-color: #607d8b; font-size: 0.9rem; }
#copy-results:hover, #print-results:hover { background: #78909c; }
.results-section { background: #fff8e1; }
#results-output { background: white; padding: 1rem; border-radius: 6px; margin: 0.5rem 0; }
#results-output p { margin: 0.5rem 0; }
.export-controls { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
dl { margin: 0.75rem 0; }
dt { font-weight: 600; margin-top: 0.75rem; }
dd { margin: 0 0 0.5rem 0; }
ul { padding-left: 1.25rem; }
footer { text-align: center; padding: 1.5rem; background: #333; color: #aaa; font-size: 0.9rem; }
footer a { color: #90caf9; }
@media (max-width: 600px) {
header h1 { font-size: 1.5rem; }
.main { padding: 1rem; }
section { padding: 1rem; }
.players-table th, .players-table td { padding: 0.5rem 0.25rem; }
.players-table input[type="text"] { max-width: 120px; }
.form-controls { flex-direction: column; }
button { width: 100%; }
}
@media (max-width: 400px) {
nav { flex-direction: column; }
header h1 { font-size: 1.25rem; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
