* {
  box-sizing: border-box;
}

:root {
  --bg: #0b1220;
  --panel: #111827;
  --panel-2: #1f2937;
  --card: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #273449;
  --accent: #3b82f6;
  --accent-2: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --chip-bg: #172554;
  --chip-text: #bfdbfe;
  --soft-blue: rgba(59, 130, 246, 0.16);
  --soft-green: rgba(34, 197, 94, 0.14);
  --soft-red: rgba(239, 68, 68, 0.14);
  --soft-yellow: rgba(245, 158, 11, 0.14);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #09111f 0%, #0b1220 100%);
  color: var(--text);
}

/* LOADING */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

.loading-box {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* HEADER */

.site-header {
  background: linear-gradient(135deg, #111827, #0f172a);
  padding: 20px 20px 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.logo {
  width: 520px;
  max-width: 92%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.45));
}

/* TABS */

.tabs {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(17, 24, 39, 0.9);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.tab-button {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.tab-button:hover {
  background: #243247;
  transform: translateY(-1px);
}

.tab-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* MAIN */

main {
  padding: 20px;
  max-width: 1300px;
  margin: 0 auto;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* CONTROLS */

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.controls input,
.controls select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 220px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
}

.controls input::placeholder {
  color: var(--muted);
}

.small-btn {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.small-btn:hover {
  background: #243247;
  transform: translateY(-1px);
}

.small-btn.danger {
  background: #991b1b;
  color: white;
}

.small-btn.danger:hover {
  background: #b91c1c;
}

.small-btn {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.small-btn:hover {
  background: #243247;
  transform: translateY(-1px);
}

.small-btn.danger {
  background: #991b1b;
  color: white;
}

.small-btn.danger:hover {
  background: #b91c1c;
}

.arsenal-notes-panel {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arsenal-notes-panel label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.arsenal-notes-panel input,
.arsenal-notes-panel textarea {
  width: 100%;
  box-sizing: border-box;
  display: block;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: #0f172a;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.arsenal-notes-panel textarea {
  min-height: 90px;
  resize: vertical;
}

.arsenal-notes-panel {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arsenal-notes-panel label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.arsenal-notes-panel input,
.arsenal-notes-panel textarea {
  width: 100%;
  box-sizing: border-box;
  display: block;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: #0f172a;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.arsenal-notes-panel textarea {
  min-height: 90px;
  resize: vertical;
}

.primary-btn {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.primary-btn:hover {
  background: var(--accent-2);
}

/* RESULTS HEADER */

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.results-header p {
  color: var(--muted);
}

/* CARD GRID */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

/* BALL CARD */

.card {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.card.selected-compare {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3), 0 16px 34px rgba(0, 0, 0, 0.38);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #0b1220;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 8px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.card .brand {
  font-weight: bold;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: white;
}

.brand-storm { background: #2563eb; }
.brand-roto-grip { background: #7c3aed; }
.brand-900-global { background: #0ea5e9; }
.brand-brunswick { background: #f59e0b; color: #111827; }
.brand-hammer { background: #dc2626; }
.brand-radical { background: #f97316; }
.brand-dv8 { background: #84cc16; color: #111827; }
.brand-track { background: #14b8a6; color: #111827; }
.brand-ebonite { background: #64748b; }
.brand-columbia-300 { background: #ec4899; }
.brand-motiv { background: #22c55e; color: #111827; }
.brand-swag { background: #a855f7; }
.brand-default { background: #334155; }

.card .category {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: bold;
  width: fit-content;
}

.role-pill {
  display: inline-block;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 12px;
  font-weight: bold;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* SPECS */

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 14px;
}

.specs div {
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

/* BUTTONS */

.card button {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.card button:hover {
  filter: brightness(1.08);
}

.card button:disabled {
  background: #374151;
  color: #cbd5e1;
  cursor: not-allowed;
}

.add-btn {
  background: var(--success);
}

.remove-btn {
  background: var(--danger);
}

.compare-btn {
  background: #2563eb;
}

.compare-btn:hover {
  background: #1d4ed8;
}

/* ARSENAL */

.arsenal-actions {
  margin-bottom: 16px;
}

.danger {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: #991b1b;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

/* PANELS */

.recommendation-layout,
.bag-builder-layout,
.motion-map-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.recommendation-box,
.radar-panel,
.role-card {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.recommendation-box h3,
.radar-panel h3,
.role-card h3 {
  margin-top: 0;
}

.recommendation-box ul,
.role-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.small-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* RADAR */

.radar-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 24px;
}

#arsenalRadar {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.legend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text);
}

.legend-icon {
  font-size: 18px;
}

/* COVERAGE MAP */

.coverage-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.coverage-tile {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transition: 0.2s ease;
}

.coverage-tile:hover {
  transform: translateY(-2px);
}

.coverage-tile.filled {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 8px 24px rgba(0, 0, 0, 0.24);
}

.coverage-tile.missing {
  border-color: rgba(220, 38, 38, 0.55);
  background: linear-gradient(180deg, #1a1320, #120f18);
}

.coverage-category {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.coverage-icon {
  font-size: 20px;
}

.coverage-count {
  font-size: 30px;
  font-weight: bold;
  color: #60a5fa;
  margin-bottom: 8px;
}

.coverage-tile.missing .coverage-count {
  color: #f87171;
}

.coverage-status {
  font-size: 13px;
  color: var(--muted);
}

.coverage-balls {
  margin-top: 10px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
}

/* BAG BUILDER */

.bag-slot {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
}

.bag-slot h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.bag-slot p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.bag-slot.filled {
  border-color: rgba(34,197,94,0.55);
}

.bag-slot.missing {
  border-color: rgba(239,68,68,0.55);
}

/* OVERLAP */

.overlap-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
}

.overlap-group h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.overlap-group p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.overlap-warning {
  border-color: rgba(245, 158, 11, 0.55);
}

.overlap-safe {
  border-color: rgba(34, 197, 94, 0.4);
}

.overlap-ball-list {
  margin-top: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ROLES */

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.role-card {
  min-height: 150px;
}

.role-card ul li {
  margin-bottom: 8px;
}

.role-empty {
  color: var(--muted);
}

/* ARSENAL SCORE */

.score-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 10px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: radial-gradient(circle at center, rgba(59,130,246,0.16), rgba(59,130,246,0.04));
}

.score-value {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
}

.score-value span {
  display: block;
  font-size: 14px;
  font-weight: normal;
  color: var(--muted);
  margin-top: 4px;
}

.score-details h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.score-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.score-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
}

.score-block.good {
  border-color: rgba(34,197,94,0.45);
}

.score-block.warn {
  border-color: rgba(245,158,11,0.45);
}

/* PATTERN ADVISOR */

.pattern-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.pattern-card h3 {
  margin-top: 0;
}

.pattern-line {
  margin-bottom: 8px;
  color: var(--text);
}

.pattern-line span {
  color: var(--muted);
}

/* MOTION MAP */

#arsenalMap {
  width: 100%;
  height: auto;
  display: block;
}

.map-guide {
  margin: 0;
  padding-left: 18px;
}

.map-guide li {
  margin-bottom: 10px;
  color: var(--text);
}

/* PURCHASE ADVISOR */

.advisor-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.advisor-card.good {
  border-color: rgba(34, 197, 94, 0.45);
}

.advisor-card.warn {
  border-color: rgba(245, 158, 11, 0.45);
}

.advisor-card.bad {
  border-color: rgba(239, 68, 68, 0.45);
}

.advisor-headline {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.advisor-list {
  margin: 0;
  padding-left: 18px;
}

.advisor-list li {
  margin-bottom: 8px;
}

/* COMPARE */

.compare-summary-box {
  margin-bottom: 20px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compare-card {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.compare-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #0b1220;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
  margin-bottom: 12px;
}

.compare-card h3 {
  margin: 0 0 10px;
}

.compare-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  font-size: 14px;
}

.compare-table div {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: 8px;
}

.compare-verdict {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.compare-note {
  color: var(--muted);
  line-height: 1.5;
}

.compare-insights {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.compare-insights h4 {
  margin: 0 0 10px;
}

.compare-insights ul {
  margin: 0;
  padding-left: 18px;
}

.compare-insights li {
  margin-bottom: 8px;
}

/* COMPARE BAR */

.compare-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#1f2937;
  padding:12px 16px;
  border-radius:10px;
  margin-bottom:16px;
  border:1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.compare-bar.hidden {
  display:none;
}

/* EMPTY STATE */

.empty-state {
  background: linear-gradient(180deg, #111827, #0f172a);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* MOBILE */

@media (max-width: 1000px) {
  .coverage-map {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .radar-layout,
  .motion-map-layout {
    grid-template-columns: 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .score-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .recommendation-layout,
  .bag-builder-layout {
    grid-template-columns: 1fr;
  }

  .score-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .coverage-map {
    grid-template-columns: 1fr;
  }

  .logo {
    width: 320px;
  }

  .controls input,
  .controls select {
    min-width: 100%;
  }
}

.advisor-btn{
background:#22c55e;
color:white;
border:none;
padding:8px 10px;
margin-top:6px;
cursor:pointer;
}

.advisor-result{
padding:14px;
border-bottom:1px solid #334155;
}

.advisor-good{
color:#22c55e;
font-weight:600;
}

.advisor-warning{
color:#f59e0b;
font-weight:600;
}

.remove-advisor{
margin-top:8px;
background:#ef4444;
color:white;
border:none;
padding:6px 8px;
cursor:pointer;
}

.compare-remove-btn{
width:100%;
margin-top:14px;
padding:8px 10px;
border-radius:6px;
border:1px solid rgba(148,163,184,0.25);
background:rgba(15,23,42,0.6);
color:#cbd5f1;
font-size:13px;
cursor:pointer;
transition:all .15s ease;
}

.compare-remove-btn:hover{
background:rgba(59,130,246,0.15);
border-color:rgba(96,165,250,0.6);
color:#e0e7ff;
}

.custom-ball-form input,
.custom-ball-form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  width: 100%;
}

.custom-ball-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.custom-ball-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
}

.secondary-btn:hover {
  background: #243247;
}

.hidden {
  display: none !important;
}

.custom-badge {
  display: inline-block;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  font-size: 12px;
  font-weight: bold;
}

.custom-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.edit-btn {
  background: #0f766e;
}

.edit-btn:hover {
  filter: brightness(1.08);
}

.delete-custom-btn {
  background: #b91c1c;
}

.delete-custom-btn:hover {
  filter: brightness(1.08);
}

.advisor-btn {
  background: #2563eb;
}

.advisor-btn:hover {
  background: #1d4ed8;
}

.selected-advisor {
  border-color: rgba(34, 197, 94, 0.75);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.22), 0 16px 34px rgba(0, 0, 0, 0.38);
}

@media (max-width: 900px) {
  .custom-ball-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .custom-ball-grid {
    grid-template-columns: 1fr;
  }
}

/* ARSENAL SCORE CARD */

.arsenal-score-card {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  margin-bottom: 8px;
}

.arsenal-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  cursor: pointer;
}

.arsenal-score-badge-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.arsenal-score-badge {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: white;
  background: radial-gradient(circle at 30% 30%, #60a5fa, #1d4ed8);
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
}

.arsenal-score-header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.arsenal-score-expanded {
  margin-top: 16px;
}

.score-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.score-breakdown-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.score-breakdown-box h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

.score-breakdown-box ul {
  margin: 0;
  padding-left: 18px;
}

.score-breakdown-box li {
  margin-bottom: 8px;
}

/* EXPANDABLE ARSENAL CARDS */

.expand-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.expandable-card {
  cursor: pointer;
}

.expandable-card.expanded {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2), 0 16px 34px rgba(0, 0, 0, 0.38);
}

.arsenal-extra {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.arsenal-note-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.arsenal-extra input,
.arsenal-extra textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}

.arsenal-extra textarea {
  min-height: 100px;
  resize: vertical;
}

.arsenal-extra label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.arsenal-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.arsenal-detail-row div {
  background: rgba(255,255,255,0.03);
  padding: 8px;
  border-radius: 8px;
}

.note-save-status {
  font-size: 12px;
  color: #86efac;
  margin-top: 8px;
}

@media (max-width: 800px) {
  .score-breakdown-grid,
  .arsenal-note-grid,
  .arsenal-detail-row {
    grid-template-columns: 1fr;
  }
}

.site-header {
  background: linear-gradient(135deg, #111827, #0f172a);
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.header-side {
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-nav-btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.header-nav-btn:hover {
  background: #243247;
  transform: translateY(-1px);
}

.account-placeholder-btn {
  opacity: 0.9;
}

.logo {
  width: 420px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.45));
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-left,
  .header-right,
  .header-center {
    justify-content: center;
  }

  .logo {
    width: 300px;
  }
}

.site-header {
  background: rgba(17, 24, 39, 0.82);
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.header-side {
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-nav-btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(31, 41, 55, 0.86);
  color: var(--text);
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.header-nav-btn:hover {
  background: #243247;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.account-placeholder-btn {
  opacity: 0.95;
}

.logo {
  width: 420px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.38));
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
  opacity: 0.98;
}

.logo:hover {
  transform: scale(1.02);
  filter:
    drop-shadow(0 0 12px rgba(99, 102, 241, 0.42))
    drop-shadow(0 0 22px rgba(59, 130, 246, 0.18));
  opacity: 1;
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-left,
  .header-right,
  .header-center {
    justify-content: center;
  }

  .logo {
    width: 300px;
  }
}

.pattern-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:14px;
margin-bottom:20px;
}

.pattern-grid label{
display:flex;
flex-direction:column;
font-size:14px;
gap:6px;
}

.pattern-grid input{
padding:8px 10px;
border-radius:6px;
border:1px solid var(--border);
background:#0f172a;
color:#e5e7eb;
}

.pattern-result-title{
font-weight:bold;
font-size:18px;
margin-bottom:8px;
}

.pattern-section{
margin-bottom:18px;
}

.pattern-section ul{
padding-left:18px;
}

.pattern-checkbox{
display:flex;
align-items:center;
gap:8px;
font-size:14px;
margin-top:8px;
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 14px;
  line-height: 1.4;
  transform: translateY(8px);
  opacity: 0;
  animation: toast-in 0.18s ease forwards;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.35);
}

.toast.info {
  border-color: rgba(59, 130, 246, 0.35);
}

.toast.warn {
  border-color: rgba(245, 158, 11, 0.35);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.35);
}

.toast.fade-out {
  animation: toast-out 0.18s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 600px) {
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}
.session-games-container {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.session-game-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.025);
}

.session-game-card h4 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.session-game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-form {
  max-width: 100%;
}

.stats-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.stats-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stats-form input,
.stats-form select,
.stats-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  box-sizing: border-box;
}

.stats-form textarea {
  min-height: 100px;
  resize: vertical;
}

@media (max-width: 900px) {
  .stats-form-grid,
  .session-game-grid {
    grid-template-columns: 1fr;
  }
}

.highlight-ball {
  outline: 3px solid #3b82f6;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.6);
  transition: all 0.4s ease;
}

#purchaseAdvisorResults.highlight-ball {
  outline: 3px solid #3b82f6;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.35);
  border-radius: 12px;
}

.about-hero {
  margin-top: 24px;
  margin-bottom: 28px;
  padding: 36px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(168,85,247,0.16), transparent 30%),
    linear-gradient(135deg, rgba(15,23,42,0.95), rgba(10,18,36,0.95));
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.about-hero-text h1 {
  margin: 0 0 14px 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  color: #f8fafc;
}

.about-subtitle {
  max-width: 780px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.about-eyebrow {
  margin: 0 0 12px 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #60a5fa;
}

.about-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.about-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.about-card {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(10,18,36,0.96));
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.about-card h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  color: #f8fafc;
}

.about-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.about-section {
  margin-top: 34px;
}

.about-section-header {
  margin-bottom: 18px;
}

.about-section-header h2 {
  margin: 0 0 6px 0;
  color: #f8fafc;
  font-size: 1.8rem;
}

.about-section-header p {
  margin: 0;
  color: #94a3b8;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.about-feature-card {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(10,18,36,0.96));
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.about-feature-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.about-feature-card h3 {
  margin: 0 0 10px 0;
  color: #f8fafc;
}

.about-feature-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.about-callout {
  margin-top: 34px;
  padding: 28px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(30,41,59,0.9), rgba(15,23,42,0.95));
  border: 1px solid rgba(96, 165, 250, 0.18);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.about-callout h2 {
  margin: 0 0 10px 0;
  color: #f8fafc;
  font-size: 2rem;
}

.about-callout p:last-child {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
  max-width: 900px;
}

.about-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.about-roadmap-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(10,18,36,0.96));
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.account-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(27, 123, 255, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(214, 29, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #0b1220 0%, #111a2e 100%);
  color: #f4f7fb;
}

.account-page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 70px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.account-card {
  width: 100%;
  max-width: 720px;
  background: rgba(12, 18, 32, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.account-card-top {
  margin-bottom: 24px;
}

.account-eyebrow {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #7fb1ff;
}

.account-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.account-subtitle {
  margin: 14px 0 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #b7c3da;
  max-width: 560px;
}

.account-form-wrap {
  margin-top: 26px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #d8e2f2;
}

.form-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.form-field input::placeholder {
  color: #8e9bb3;
}

.form-field input:focus {
  border-color: #5aa0ff;
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.account-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.account-actions .primary-btn,
.account-actions .secondary-btn,
.account-link-btn {
  min-width: 160px;
  justify-content: center;
  text-decoration: none;
}

.account-logged-in {
  margin-top: 10px;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(70, 201, 126, 0.12);
  color: #86e4a6;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.account-email-line {
  color: #c5d0e4;
  font-size: 1rem;
  margin: 10px 0 0;
}

#accountEmail {
  color: #ffffff;
  font-weight: 700;
}

.auth-message {
  min-height: 24px;
  margin-top: 18px;
  color: #d7e6ff;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .account-card {
    padding: 24px;
    border-radius: 22px;
  }

  .account-actions {
    flex-direction: column;
  }

  .account-actions .primary-btn,
  .account-actions .secondary-btn,
  .account-link-btn {
    width: 100%;
  }
}

.account-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(27, 123, 255, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(214, 29, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #0b1220 0%, #111a2e 100%);
  color: #f4f7fb;
}

.account-page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 70px;
  display: flex;
  justify-content: center;
}

.account-card {
  width: 100%;
  max-width: 760px;
  background: rgba(12, 18, 32, 0.84);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.account-eyebrow {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #7fb1ff;
}

.account-subtitle {
  color: #b7c3da;
  line-height: 1.6;
}

.account-form-grid,
.account-info-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.account-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
}

.account-info-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
}

.account-info-box h3 {
  margin: 0 0 8px 0;
  color: #9fb7db;
  font-size: 0.95rem;
}

.account-info-box p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.account-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(70, 201, 126, 0.12);
  color: #86e4a6;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.account-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-message {
  min-height: 24px;
  margin-top: 18px;
}
