/* Picks and Pools — Retro 1999 Theme
   Hand-authored CSS. A future "modern" theme can replace retro.css entirely. */

:root {
  --bg-body: #c0c0c0;
  --bg-page: #ffffff;
  --bg-sidebar: #000080;
  --bg-header: #000080;
  --border-dark: #404040;
  --border-light: #ffffff;
  --link: #0000ee;
  --link-visited: #551a8b;
  --accent-green: #008000;
  --accent-red: #cc0000;
  --accent-yellow: #ffff00;
  --text: #000000;
  --focus: #ff6600;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background-color: var(--bg-body);
  background-image:
    linear-gradient(135deg, #999 25%, transparent 25%),
    linear-gradient(225deg, #999 25%, transparent 25%),
    linear-gradient(45deg, #999 25%, transparent 25%),
    linear-gradient(315deg, #999 25%, #bbb 25%);
  background-size: 20px 20px;
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:visited {
  color: var(--link-visited);
}

a:hover, a:focus {
  color: var(--accent-red);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-yellow);
  color: #000;
  padding: 8px 16px;
  z-index: 9999;
  font-weight: bold;
}

.skip-link:focus {
  left: 0;
}

.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px;
}

.site-header {
  background: var(--bg-header);
  color: #fff;
  border: 2px outset #8080ff;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.site-header h1 {
  font-family: "Times New Roman", Times, serif;
  font-size: 28px;
  margin: 0 0 4px;
  text-shadow: 2px 2px #000;
}

.site-header .tagline {
  font-size: 11px;
  font-style: italic;
  color: #ccc;
}

.construction-banner {
  background: var(--accent-yellow);
  color: #000;
  border: 2px inset #808000;
  padding: 4px 8px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 8px;
}

.layout-table {
  width: 100%;
  border-collapse: collapse;
}

.layout-table td {
  vertical-align: top;
}

.sidebar {
  width: 180px;
  background: var(--bg-sidebar);
  color: #fff;
  border: 2px inset #4040aa;
  padding: 8px;
  font-size: 12px;
}

.sidebar h2 {
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin: 0 0 8px;
  border-bottom: 1px solid #8080ff;
  padding-bottom: 4px;
}

.sidebar ul {
  list-style: square;
  padding-left: 18px;
  margin: 0 0 12px;
}

.sidebar a {
  color: #ffff99;
}

.sidebar a:visited {
  color: #ffccff;
}

.sidebar .logout-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.sidebar .logout-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #ffff99;
  text-decoration: underline;
  cursor: pointer;
}

.sidebar .logout-link:hover,
.sidebar .logout-link:focus {
  color: var(--accent-red);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.main-content {
  background: var(--bg-page);
  border: 2px inset var(--border-dark);
  padding: 12px 16px;
  min-height: 400px;
}

.main-content h2 {
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  border-bottom: 2px solid var(--bg-header);
  padding-bottom: 4px;
  margin-top: 0;
}

.panel {
  border: 2px groove var(--border-dark);
  padding: 10px;
  margin-bottom: 12px;
  background: #f0f0f0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  border: 1px solid var(--border-dark);
  padding: 6px 8px;
  text-align: left;
}

.data-table th {
  background: #000080;
  color: #fff;
  font-family: Arial, sans-serif;
}

.data-table tr:nth-child(even) {
  background: #e8e8e8;
}

.btn {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 10px 16px;
  min-height: 44px;
  min-width: 44px;
  border: 2px outset #ccc;
  background: linear-gradient(180deg, #eee 0%, #bbb 100%);
  color: #000;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: linear-gradient(180deg, #fff 0%, #ccc 100%);
}

.btn:active, .btn.pressed {
  border-style: inset;
  background: linear-gradient(180deg, #aaa 0%, #ddd 100%);
}

.btn-primary {
  background: linear-gradient(180deg, #90ee90 0%, #008000 100%);
  border-color: #006400;
  color: #fff;
}

.btn-team {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  font-size: 16px;
  padding: 16px;
}

.btn-team .team-name {
  display: block;
  font-size: 18px;
}

.btn-team .team-meta {
  display: block;
  font-size: 11px;
  font-weight: normal;
  opacity: 0.85;
}

.btn-team.selected {
  border-style: inset;
  background: linear-gradient(180deg, #ffd700 0%, #daa520 100%);
}

.form-row {
  margin-bottom: 10px;
}

.form-row label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="datetime-local"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  border: 2px inset var(--border-dark);
  font-family: Verdana, sans-serif;
  font-size: 13px;
}

.errorlist {
  color: var(--accent-red);
  font-weight: bold;
  list-style: none;
  padding: 0;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.messages li {
  padding: 8px;
  border: 2px inset var(--border-dark);
  margin-bottom: 4px;
}

.messages .success { background: #90ee90; }
.messages .error { background: #ffb6c1; }
.messages .info { background: #add8e6; }

.progress-bar {
  border: 2px inset var(--border-dark);
  background: #fff;
  height: 24px;
  margin-bottom: 12px;
  position: relative;
}

.progress-bar-fill {
  background: linear-gradient(180deg, #0000cc 0%, #000080 100%);
  height: 100%;
  transition: width 0.2s ease;
}

.progress-bar-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  line-height: 24px;
  font-weight: bold;
  font-size: 12px;
  color: #000;
  mix-blend-mode: difference;
  color: #fff;
}

.matchup-card {
  border: 3px double var(--bg-header);
  padding: 16px;
  background: #fffff0;
  text-align: center;
}

.matchup-card .game-info {
  font-size: 11px;
  color: #666;
  margin-bottom: 8px;
}

.matchup-card .vs {
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
  font-weight: bold;
  margin: 8px 0;
}

.spread-line {
  background: var(--accent-yellow);
  border: 1px solid #808000;
  display: inline-block;
  padding: 2px 8px;
  font-weight: bold;
  margin-bottom: 12px;
}

.nav-picks {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
}

.marquee-wrap {
  background: #000;
  color: #0f0;
  border: 2px inset #333;
  overflow: hidden;
  margin-bottom: 8px;
  padding: 4px 0;
}

.marquee-text {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.footer {
  margin-top: 12px;
  border: 2px inset var(--border-dark);
  background: #ddd;
  padding: 8px 12px;
  font-size: 11px;
  text-align: center;
}

.footer-badges {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  border: 2px outset #999;
  background: #eee;
  padding: 4px 8px;
  font-size: 10px;
  font-family: Arial, sans-serif;
}

.hit-counter {
  font-family: "Courier New", monospace;
  background: #000;
  color: #0f0;
  padding: 2px 8px;
  border: 1px inset #333;
  letter-spacing: 3px;
}

.blink {
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 640px) {
  .layout-table,
  .layout-table tbody,
  .layout-table tr,
  .layout-table td {
    display: block;
    width: 100%;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 8px;
  }

  .site-header h1 {
    font-size: 22px;
  }

  .btn-team {
    font-size: 15px;
    padding: 14px;
  }

  .main-content {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-text {
    animation: none;
    white-space: normal;
    text-align: center;
    display: block;
  }

  .blink {
    animation: none;
  }
}

/* HTMX loading indicator */
.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-indicator {
  display: none;
  font-weight: bold;
  color: var(--bg-header);
}

.pick-flow-loading.htmx-request .pick-flow-loading-text {
  display: block;
}

.pick-flow-loading-text {
  display: none;
  text-align: center;
  padding: 8px;
  font-style: italic;
}
