/* ==========================================================================
   Sunday Pickup Baseball Charity - Bay Area Baseball Palette
   Colors: San Francisco Giants Orange (#FD5A1E),
           Oakland Athletics Dark Green (#003831),
           and Crisp White (#FFFFFF).
   Pure standard CSS for 10+ year longevity and cross-device responsiveness.
   ========================================================================== */

:root {
  /* Bay Area Heritage Palette */
  --as-green: #003831;            /* Oakland A's Dark Forest Green */
  --as-green-hover: #002823;
  --as-green-light: #00544a;
  --as-green-subtle: #e6f0ed;      /* Soft grass badge background */
  --as-green-border: #b8d7cf;

  --giants-orange: #FD5A1E;       /* SF Giants Electric Baseball Orange */
  --giants-orange-hover: #e04a11;
  --giants-orange-light: #fff2ed;  /* Warm orange badge background */
  --giants-orange-border: #fed3c4;
  --giants-orange-glow: rgba(253, 90, 30, 0.22);

  --crisp-white: #ffffff;
  --bg-page: #f5f8f7;             /* Clean stadium morning field mist */
  --bg-card: #ffffff;
  --border: #dbe4e0;
  --border-focus: var(--giants-orange);

  /* Typography Colors */
  --text-main: #0c1f1a;           /* Deep baseball forest charcoal */
  --text-muted: #546e66;          /* Muted athletic slate */
  --text-inverted: #ffffff;

  /* Semantic Aliases */
  --primary: var(--giants-orange);
  --primary-hover: var(--giants-orange-hover);
  --primary-light: var(--giants-orange-light);
  --secondary: var(--as-green);
  --secondary-hover: var(--as-green-hover);
  --secondary-light: var(--as-green-subtle);
  --clay: var(--giants-orange);
  --clay-light: var(--giants-orange-light);

  --danger: #dc2626;
  --danger-light: #fee2e2;
  --success: var(--as-green);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 56, 49, 0.06);
  --shadow-md: 0 4px 16px -2px rgba(0, 56, 49, 0.08), 0 2px 6px -1px rgba(0, 56, 49, 0.04);
  --shadow-lg: 0 14px 30px -4px rgba(0, 56, 49, 0.12), 0 6px 12px -3px rgba(0, 56, 49, 0.06);
  --shadow-orange: 0 4px 14px rgba(253, 90, 30, 0.32);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
header.site-header {
  background: var(--crisp-white);
  border-top: 4px solid var(--as-green);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 56, 49, 0.04);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--as-green);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.brand-tag {
  background: var(--giants-orange);
  color: var(--crisp-white);
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(253, 90, 30, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  text-decoration: none;
  color: var(--as-green);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--giants-orange);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--giants-orange);
  color: var(--crisp-white);
  box-shadow: 0 2px 8px rgba(253, 90, 30, 0.25);
}

.btn-primary:hover {
  background-color: var(--giants-orange-hover);
  box-shadow: var(--shadow-orange);
}

.btn-secondary {
  background-color: var(--as-green);
  color: var(--crisp-white);
  box-shadow: 0 2px 8px rgba(0, 56, 49, 0.2);
}

.btn-secondary:hover {
  background-color: var(--as-green-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--as-green);
  color: var(--as-green);
}

.btn-outline:hover {
  background-color: var(--as-green);
  color: var(--crisp-white);
}

.btn-login {
  background-color: var(--giants-orange);
  color: var(--crisp-white) !important;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(253, 90, 30, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: background-color 0.15s, transform 0.05s, box-shadow 0.15s;
}

.btn-login:hover {
  background-color: var(--giants-orange-hover);
  box-shadow: 0 4px 12px rgba(253, 90, 30, 0.45);
  color: var(--crisp-white) !important;
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(1px);
}

.btn-danger {
  background-color: var(--danger);
  color: var(--crisp-white);
}

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

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.05rem;
  border-radius: 10px;
}

/* Hero Section */
.hero {
  background: linear-gradient(140deg, #002924 0%, #003831 60%, #004d43 100%);
  color: var(--crisp-white);
  padding: 56px 0;
  text-align: center;
  position: relative;
  border-bottom: 5px solid var(--giants-orange);
}

.hero-subtitle {
  display: inline-block;
  color: #ffeedb;
  background: rgba(253, 90, 30, 0.22);
  border: 1px solid rgba(253, 90, 30, 0.45);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  color: var(--crisp-white);
  text-shadow: 0 2px 4px rgba(0, 30, 25, 0.4);
}

.hero-desc {
  max-width: 680px;
  margin: 0 auto 24px;
  color: #dce7e4;
  font-size: 1.12rem;
  line-height: 1.6;
}

/* Cards & Layout */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
  transition: box-shadow 0.15s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--as-green);
  letter-spacing: -0.01em;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green {
  background: var(--as-green-subtle);
  color: var(--as-green);
  border: 1px solid var(--as-green-border);
}

.badge-orange,
.badge-clay {
  background: var(--giants-orange-light);
  color: #b83d0f;
  border: 1px solid var(--giants-orange-border);
}

.badge-blue {
  background: var(--as-green-subtle);
  color: var(--as-green);
  border: 1px solid var(--as-green-border);
}

.badge-gray {
  background: #f1f5f4;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Event Details & Grid */
.event-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  background: #f7faf9;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-icon {
  font-size: 1.5rem;
}

.meta-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.meta-value {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--as-green);
}

/* Duty Table / Grid */
.duty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

/* Responsive Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  color: var(--secondary);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:hover {
  background-color: #fafcfb;
}

.duty-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: relative;
  transition: transform 0.1s, box-shadow 0.15s;
}

.duty-card.filled {
  background: #fbfdfc;
  border-left: 5px solid var(--as-green);
}

.duty-card.needed {
  background: #fffcfb;
  border-left: 5px solid var(--giants-orange);
}

.duty-title {
  font-weight: 800;
  font-size: 1.02rem;
  margin-bottom: 4px;
  color: var(--as-green);
}

.duty-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.duty-status {
  font-size: 0.84rem;
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--as-green);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--crisp-white);
  color: var(--text-main);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--giants-orange);
  box-shadow: 0 0 0 3px var(--giants-orange-glow);
}

.help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Attendees list */
.roster-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.roster-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}

.roster-item:hover {
  border-color: var(--as-green-border);
}

.roster-name {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--as-green);
}

.roster-gear {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Discussion Board */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.comment-bubble {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.84rem;
}

.comment-author {
  font-weight: 800;
  color: var(--as-green);
}

.comment-time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.comment-body {
  font-size: 0.94rem;
  white-space: pre-wrap;
  color: var(--text-main);
  line-height: 1.5;
}

/* User Avatars & Profile Styles */
.nav-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--as-green-subtle);
  transition: background-color 0.15s;
}

.nav-user-badge:hover {
  background-color: var(--as-green-border);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--as-green);
}

.nav-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--as-green);
  color: var(--crisp-white);
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.roster-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--as-green);
  flex-shrink: 0;
}

.roster-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--as-green-subtle);
  color: var(--as-green);
  font-weight: 800;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--as-green-border);
  flex-shrink: 0;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--as-green);
  flex-shrink: 0;
}

.comment-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--as-green-subtle);
  color: var(--as-green);
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--as-green-border);
  flex-shrink: 0;
}

.profile-avatar-preview {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--giants-orange);
  box-shadow: var(--shadow-orange);
}

.profile-avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: var(--as-green-subtle);
  color: var(--as-green);
  font-size: 2.8rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--as-green);
}

.player-bio-text {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
  font-style: italic;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.93rem;
  font-weight: 500;
}

.alert-success {
  background-color: var(--as-green-subtle);
  color: var(--as-green);
  border: 1px solid var(--as-green-border);
}

.alert-info {
  background-color: var(--giants-orange-light);
  color: #9c330c;
  border: 1px solid var(--giants-orange-border);
}

.alert-error {
  background-color: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Footer */
footer.site-footer {
  margin-top: auto;
  background: var(--crisp-white);
  border-top: 1px solid var(--border);
  border-bottom: 4px solid var(--giants-orange);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer.site-footer strong {
  color: var(--as-green);
}

/* Responsive */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.9rem;
  }
  .card {
    padding: 18px;
  }
  .nav-wrap {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    gap: 12px;
  }
}
