/* WrestleDelaware — Wrestler Profile2 (clean rebuild) */

:root {
  --bg0: #070b12;
  --bg1: #0b1220;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --text: #eaf0ff;
  --muted: rgba(234,240,255,.72);
  --accent: #4aa3ff;
  --accent2: #16d3a2;
  --accent-dark: #3a8fef;
  --win: #2fe59a;
  --loss: #ff5d6c;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 600px at 15% 0%, rgba(74,163,255,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(22,211,162,.14), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.wp2-wrap { max-width: 1100px; margin: 0 auto; padding: 18px; }

/* Sticky header */
.wp2-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7,11,18,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0 10px;
}

/* Navigation row */
.wp2-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 14px;
}

/* Title */
.wp2-title {
  margin: 8px 0 4px;
  font-size: 30px;
  font-weight: 800;
}

.wp2-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.wp2-aka {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  opacity: .88;
}

/* Badge grid (badges left + sig wins right) */
.wp2-badge-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wp2-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 260px;
  flex: 1 1 420px;
}

.wp2-badge {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  font-size: 13px;
}

.wp2-badge--champ {
  font-size: 14px;
  font-weight: 800;
  padding: 9px 14px;
  background: linear-gradient(135deg, rgba(255,215,0,.25), rgba(255,165,0,.18));
  border-color: rgba(255,215,0,.5);
  color: rgba(255,255,255,.98);
  box-shadow: 0 0 12px rgba(255,215,0,.15);
}

/* Significant wins */
.wp2-sigwins {
  flex: 0 1 520px;
  min-width: 280px;
  max-width: 100%;
}

.wp2-sigwins-title {
  font-weight: 800;
  margin: 2px 0 8px;
}

.wp2-sigwins--empty .wp2-sigwins-empty { color: var(--muted); padding: 10px 0; }

/* Vertical reel — shows ~4 cards */
.sw-reel-wrap {
  height: 268px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.sw-reel-wrap::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

.sw-reel {
 display: flex;
 flex-direction: column;
 animation: sw-scroll var(--sw-dur, 8s) linear infinite;
 padding: 4px 0;
}

.sw-reel:hover { animation-play-state: paused; }
.sw-reel--static { animation: none; }
.sw-reel--static + .sw-reel-wrap::after,
.sw-reel-wrap:has(.sw-reel--static)::after { display: none; }

@keyframes sw-scroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* Single win card */
.sw-card {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.sw-opp { font-weight: 600; font-size: 14px; }
.sw-opp a { color: var(--accent); text-decoration: none; }
.sw-opp a:hover { text-decoration: underline; }
.sw-state { font-weight: 400; font-size: 12px; color: var(--muted); }

.sw-event { font-size: 12px; color: var(--muted); margin-top: 1px; }

.sw-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 12px;
}

.sw-result { color: #4ade80; font-weight: 700; }
.sw-date   { color: var(--muted); }

/* Show All button */
.sw-show-all {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 0;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.sw-show-all:hover { background: rgba(255,255,255,.1); }

/* Popup modal */
.sw-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.sw-modal.sw-open { display: flex; }

.sw-modal-backdrop {
 position: fixed;
 inset: 0;
 background: rgba(0,0,0,.92);
 backdrop-filter: blur(6px);
 z-index: 9999;
}

.sw-modal-content {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 background: #0d1526;
 border: 1px solid rgba(255,255,255,.18);
 border-radius: 14px;
 width: 90%;
 max-width: 480px;
 max-height: 80vh;
 display: flex;
 flex-direction: column;
 box-shadow: 0 20px 60px rgba(0,0,0,.7);
 z-index: 10000;
}

.sw-modal-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 14px 18px;
 border-bottom: 1px solid rgba(255,255,255,.15);
 background: rgba(255,255,255,.04);
}

.sw-modal-title { font-weight: 800; font-size: 16px; }

.sw-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.sw-modal-close:hover { color: #fff; }

.sw-modal-body { overflow-y: auto; padding: 4px 0; }
.sw-modal-body .sw-card { padding: 10px 18px; }

/* Cards / sections */
.wp2-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.wp2-section { margin-top: 14px; }
.wp2-section h2 { margin: 0 0 10px; font-size: 18px; }

/* Section header row (title + season record) */
.wp2-h2row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.wp2-h2row h2 { margin: 0; }

.wp2-season-rec {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  font-size: 13px;
  color: rgba(234,240,255,.92);
  font-weight: 700;
}

/* Season tabs */
.wp2-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.wp2-tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
}

.wp2-tab:hover {
  border-color: rgba(74,163,255,.4);
  background: rgba(74,163,255,.08);
}

.wp2-tab.active {
  border-color: rgba(74,163,255,.6);
  background: linear-gradient(90deg, rgba(74,163,255,.22), rgba(22,211,162,.18));
}

/* Bout tables */
.wp2-table-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: auto;
  background: rgba(255,255,255,.04);
}

.wp2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.wp2-table thead th {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  color: rgba(234,240,255,.75);
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid var(--border);
  padding: 10px;
  white-space: nowrap;
}

.wp2-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(234,240,255,.92);
  vertical-align: top;
}

.wp2-table tbody tr:hover { background: rgba(74,163,255,.07); }
tr.wp2-win td:nth-child(3) { color: var(--win); font-weight: 800; }
tr.wp2-loss td:nth-child(3) { color: var(--loss); font-weight: 800; }

/* Opponent links */
a.wp2-opp { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a.wp2-opp:hover { color: var(--accent-dark); }

/* Loading spinner */
.wp2-loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.wp2-loading::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(74,163,255,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: wp2-spin .8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes wp2-spin { to { transform: rotate(360deg); } }

/* No bouts state */
.wp2-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Mobile */
@media (max-width: 700px) {
  .wp2-wrap { padding: 14px; }
  .wp2-title { font-size: 24px; }

  .wp2-sticky {
    position: static;
    background: transparent;
    border-bottom: 0;
    padding: 0;
    backdrop-filter: none;
  }

  .wp2-h2row { flex-wrap: wrap; }
  .wp2-season-rec { font-size: 12px; padding: 6px 9px; }

  .wp2-sigwins { flex: 1 1 100%; min-width: 0; }
  .wp2-badges { flex: 1 1 100%; min-width: 0; }

  .wp2-table { font-size: 12.5px; }
  .wp2-table td, .wp2-table thead th { padding: 8px 6px; }
}
