/* 
   NHL Sport Canada — Design System & Main Styles
   Theme: Professional Ice Hockey Arena (Navy, Gold, Ice Blue, Teal)
*/

/* --- Google Fonts Import --- */


/* --- Design Tokens --- */
:root {
  --color-bg-primary: #0A1428;
  --color-bg-secondary: #0E1B33;
  --color-bg-tertiary: #172B4D;
  --color-gold: #D4AF37;
  --color-gold-hover: #F3E5AB;
  --color-ice-blue: #4A6FA5;
  --color-violet: #6C5CE7;
  --color-teal: #3FA7A0;
  --color-text-light: #F5F5F0;
  --color-text-dark: #0A1428;
  --color-text-muted: #8F9CAE;
  --color-border: rgba(74, 111, 165, 0.25);
  --color-border-gold: rgba(212, 175, 55, 0.3);
  --color-overlay: rgba(10, 20, 40, 0.85);

  --font-headings: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(212, 175, 55, 0.3);
  --shadow-glow-blue: 0 0 15px rgba(74, 111, 165, 0.4);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;

  --header-height: 80px;
}

/* --- Base & Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg-primary);
  color: var(--color-text-light);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    radial-gradient(at 0% 0%, rgba(74, 111, 165, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(108, 92, 231, 0.1) 0px, transparent 50%),
    linear-gradient(180deg, #0A1428 0%, #0E1B33 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-light);
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-gold);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: #D1D9E6;
}

strong {
  color: var(--color-text-light);
  font-weight: 600;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-gold {
  color: var(--color-gold);
}

.text-center {
  text-align: center;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background-color: rgba(14, 27, 51, 0.6);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-color: var(--color-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-ice-blue);
}

.btn-secondary:hover {
  background-color: rgba(74, 111, 165, 0.15);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.nav-links .btn-sm {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.btn-block {
  width: 100%;
  display: flex;
}

/* --- 18+ Badge --- */
.badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid #E84118;
  color: #E84118;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  background-color: rgba(232, 65, 24, 0.05);
  user-select: none;
  flex-shrink: 0;
  margin-left: 0.75rem;
  box-shadow: 0 0 10px rgba(232, 65, 24, 0.2);
}

/* --- Header / Navigation --- */
header {
  height: var(--header-height);
  background-color: rgba(10, 20, 40, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-light);
  gap: 0.5rem;
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--color-gold);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links li.active a {
  color: var(--color-text-light);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links li.active a::after {
  width: 100%;
}

/* Exclude buttons from hover underlines and override colors */
.nav-links a.btn::after {
  content: none !important;
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: var(--color-text-dark) !important;
}

.nav-links a.btn-secondary,
.nav-links a.btn-secondary:hover {
  color: var(--color-text-light) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* --- Footer --- */
footer {
  background-color: #050A14;
  border-top: 2px solid var(--color-border);
  padding: 4rem 0 2rem;
  margin-top: auto;
  font-size: 0.85rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.footer-compliance-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-footer-18 {
  border: 2px solid #E84118;
  color: #E84118;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 4px;
}

.badge-footer-play {
  border: 2px solid var(--color-ice-blue);
  color: var(--color-ice-blue);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 4px;
}

.footer-compliance-text {
  max-width: 800px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  gap: 0.4rem;
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-social-link:hover {
  color: var(--color-gold);
}

.footer-payments {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.payment-label {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.payment-icons {
  display: flex;
  gap: 0.75rem;
}

.payment-icon {
  background-color: white;
  border: 1px solid var(--color-border);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.payment-icon svg {
  height: 16px;
  width: auto;
}

.footer-bottom {
  text-align: center;
  color: rgba(143, 156, 174, 0.5);
  font-size: 0.75rem;
  border-top: 1px solid rgba(74, 111, 165, 0.1);
  padding-top: 2rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  background-image: linear-gradient(to right, rgba(10, 20, 40, 0.95) 40%, rgba(10, 20, 40, 0.4) 100%), url('../images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--color-bg-primary), transparent);
}

.hero-content {
  max-width: 650px;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--color-text-light);
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-badge-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

/* --- Features & Grid Cards --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-glow);
}

.card-num {
  font-size: 3rem;
  font-family: var(--font-headings);
  color: rgba(212, 175, 55, 0.15);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
}

.card-icon {
  margin-bottom: 1.5rem;
  width: 48px;
  height: 48px;
  color: var(--color-gold);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --- Stats & Leaderboards --- */
.table-wrapper {
  overflow-x: auto;
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}

th,
td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: rgba(23, 43, 77, 0.6);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 1px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(74, 111, 165, 0.1);
}

.rank-cell {
  font-weight: 700;
  color: var(--color-gold);
  width: 60px;
}

.player-info {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-weight: 600;
  color: var(--color-text-light);
}

.player-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.stat-cell {
  font-family: monospace;
  font-size: 1rem;
}

.stat-highlight {
  color: var(--color-teal);
  font-weight: 600;
}

.sort-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sort-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: rgba(10, 20, 40, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 16px;
  height: 16px;
  accent-color: var(--color-gold);
}

.checkbox-group label {
  margin-bottom: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.error-message {
  color: #E84118;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.input-invalid {
  border-color: #E84118 !important;
}

.input-invalid:focus {
  box-shadow: 0 0 10px rgba(232, 65, 24, 0.2) !important;
}

.submit-success-message {
  color: var(--color-teal);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1rem;
  text-align: center;
  animation: fadeIn 0.4s ease forwards;
  padding: 0.5rem;
  background-color: rgba(63, 167, 160, 0.1);
  border: 1px solid rgba(63, 167, 160, 0.3);
  border-radius: var(--border-radius-md);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- FAQ Accordion --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  background: none;
  border: none;
  color: inherit;
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.accordion-header:hover {
  color: var(--color-gold);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform var(--transition-normal);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.accordion-content p {
  padding-bottom: 1.5rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

/* --- Age Gate --- */
.age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #050A14;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.age-gate-card {
  background: rgba(14, 27, 51, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.age-gate-logo {
  margin-bottom: 2rem;
  display: inline-flex;
}

.age-gate-logo svg {
  width: 60px;
  height: 60px;
  fill: var(--color-gold);
}

.age-gate-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.age-gate-card h2::after {
  display: none;
}

.age-gate-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.age-gate-buttons button {
  flex: 1;
}

.age-gate-disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* --- Cookie Consent Banner & Modal --- */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 900px;
  background: rgba(14, 27, 51, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 2rem;
  z-index: 999;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-content {
  flex: 1;
}

.cookie-content p {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-content a {
  color: var(--color-gold);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* --- General Modals --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  max-width: 550px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-text-light);
}

.modal-close svg {
  width: 24px;
  height: 24px;
}

.modal h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* Cookie Preference Options */
.cookie-preference-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(74, 111, 165, 0.1);
}

.cookie-pref-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--color-text-light);
}

.cookie-pref-info p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--color-teal);
  border-color: var(--color-teal);
}

input:checked+.slider:before {
  transform: translateX(20px);
  background-color: var(--color-text-light);
}

input:disabled+.slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Team Builder --- */
.team-builder-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
}

.player-filters {
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--color-gold);
  color: var(--color-text-light);
  background: rgba(212, 175, 55, 0.1);
}

.builder-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.player-card {
  background: rgba(23, 43, 77, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.player-card:hover {
  border-color: var(--color-ice-blue);
  transform: translateY(-2px);
}

.player-card-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  margin: 0 auto 0.75rem;
  display: block;
  object-fit: cover;
  background-color: var(--color-bg-secondary);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.player-card:hover .player-card-avatar {
  border-color: var(--color-gold);
}

.player-card-pos {
  display: inline-block;
  background-color: rgba(74, 111, 165, 0.2);
  color: var(--color-ice-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.player-card-name {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.player-card-team {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.player-card-stats {
  display: flex;
  justify-content: space-around;
  font-size: 0.8rem;
  border-top: 1px solid rgba(74, 111, 165, 0.1);
  padding-top: 0.75rem;
  margin-bottom: 1rem;
}

.player-card-stats div {
  display: flex;
  flex-direction: column;
}

.player-card-stats span {
  font-weight: 700;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.roster-panel {
  background: rgba(14, 27, 51, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-glow-blue);
}

.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.roster-count {
  font-size: 0.9rem;
  color: var(--color-teal);
  font-weight: 600;
}

.roster-slots {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.roster-slot {
  background: rgba(10, 20, 40, 0.5);
  border: 1px dashed var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.roster-slot.filled {
  border-style: solid;
  border-color: var(--color-border);
  background: rgba(23, 43, 77, 0.4);
}

.remove-player-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #E84118;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-player-btn svg {
  width: 14px;
  height: 14px;
}

/* --- AI Chat Widget --- */
.ai-chat-bubble {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  z-index: 998;
  transition: all var(--transition-fast);
}

.ai-chat-bubble:hover {
  transform: scale(1.05) rotate(5deg);
  background-color: var(--color-gold-hover);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
}

.ai-chat-bubble svg {
  width: 28px;
  height: 28px;
  fill: var(--color-text-dark);
}

.ai-chat-window {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 380px;
  height: 480px;
  background: rgba(14, 27, 51, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.ai-chat-header {
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-header-info {
  display: flex;
  flex-direction: column;
}

.ai-chat-title {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.1rem;
}

.ai-chat-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.ai-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
}

.ai-chat-close:hover {
  color: var(--color-text-light);
}

.ai-chat-close svg {
  width: 20px;
  height: 20px;
}

.ai-chat-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  line-height: 1.4;
}

.chat-msg-bot {
  background-color: rgba(23, 43, 77, 0.6);
  color: var(--color-text-light);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-msg-user {
  background-color: var(--color-gold);
  color: var(--color-text-dark);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.ai-chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg-secondary);
  display: flex;
  gap: 0.5rem;
}

.ai-chat-input-area input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
}

.chat-send-btn {
  background-color: var(--color-gold);
  border: none;
  border-radius: var(--border-radius-md);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.chat-send-btn:hover {
  background-color: var(--color-gold-hover);
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--color-text-dark);
}

/* --- About Us Roster --- */
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-member-card {
  text-align: center;
  background: rgba(14, 27, 51, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
}

.team-member-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  object-fit: cover;
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-glow);
}

/* --- Contact Us Embed Map --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-layout>div:last-child {
  display: flex;
  flex-direction: column;
}

.map-container {
  flex: 1;
  min-height: 350px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.contact-info-list {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-icon {
  color: var(--color-gold);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* --- Blog News Listing --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-glow);
}

.blog-card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
}

.blog-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card-link {
  color: var(--color-gold);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-link:hover {
  color: var(--color-gold-hover);
}

.blog-card-link svg {
  width: 14px;
  height: 14px;
}

/* --- News Article Page --- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-size: 1.8rem;
  margin: 2.5rem 0 1.25rem;
  text-align: left;
  padding-bottom: 0.5rem;
}

.article-body h2::after {
  left: 0;
  transform: none;
}

.article-img {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
}

.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-list a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.sidebar-list a:hover {
  color: var(--color-gold);
}

/* --- Form Success Modal Alert --- */
.lead-success-modal {
  text-align: center;
}

.lead-success-icon {
  color: var(--color-teal);
  width: 50px;
  height: 50px;
  margin: 0 auto 1.5rem;
}

.lead-success-icon svg {
  width: 100%;
  height: 100%;
}

/* --- Account Tabs --- */
.account-card {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.account-tabs {
  display: flex;
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}

.account-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  font-family: var(--font-body);
}

.account-tab:hover {
  color: var(--color-text-light);
}

.account-tab.active {
  color: var(--color-gold);
  background-color: rgba(23, 43, 77, 0.3);
  border-bottom: 2px solid var(--color-gold);
}

.account-form-panel {
  padding: 2.5rem;
  display: none;
}

.account-form-panel.active {
  display: block;
}

/* --- Interactive Accordion Styling & Policy Text layout --- */
.policy-content {
  max-width: 900px;
  margin: 0 auto;
}

.policy-block {
  background: rgba(14, 27, 51, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.policy-block h3 {
  margin-top: 1.5rem;
}

.policy-block h3:first-of-type {
  margin-top: 0;
}

.policy-block ul {
  list-style: square;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.policy-block li {
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: #D1D9E6;
}

/* --- 404 Styling --- */
.error-page-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 0;
}

.error-page-illustration {
  margin-bottom: 2rem;
  display: inline-flex;
  color: var(--color-ice-blue);
  background: rgba(14, 27, 51, 0.6);
  border: 1px solid var(--color-border);
  padding: 2rem;
  border-radius: 50%;
  box-shadow: var(--shadow-glow-blue);
}

.error-page-illustration svg {
  width: 100px;
  height: 100px;
  fill: currentColor;
}

.error-page-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-page-content p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .team-builder-layout {
    grid-template-columns: 1fr;
  }

  .roster-panel {
    position: static;
    margin-top: 2rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .map-container {
    min-height: 300px;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    margin-top: 3rem;
  }
}

@media (max-width: 1260px) {
  header {
    height: 70px;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--color-bg-secondary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: left var(--transition-normal);
    z-index: 99;
    border-top: 1px solid var(--color-border);
  }

  .nav-links.active {
    left: 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-actions {
    display: none;
    /* In mobile we put actions inside nav menu if needed, or hide */
  }
}

/* --- Pipeline Flowchart --- */
.pipeline-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pipeline-step {
  flex: 1;
  background-color: #0E1B33;
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.pipeline-step:hover {
  transform: translateY(-4px);
}

.pipeline-step.step-1 {
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-glow);
}

.pipeline-step.step-2 {
  border: 2px solid var(--color-ice-blue);
  box-shadow: var(--shadow-glow-blue);
}

.pipeline-step.step-3 {
  border: 2px solid var(--color-teal);
  box-shadow: 0 0 15px rgba(63, 167, 160, 0.3);
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-1 .step-badge {
  background-color: var(--color-gold);
  color: var(--color-text-dark);
}

.step-2 .step-badge {
  background-color: var(--color-ice-blue);
  color: var(--color-text-light);
}

.step-3 .step-badge {
  background-color: var(--color-teal);
  color: var(--color-text-light);
}

.pipeline-step h4 {
  font-size: 1.15rem;
  color: var(--color-text-light);
  font-family: var(--font-headings);
  font-weight: 700;
}

.pipeline-step p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ice-blue);
  flex-shrink: 0;
}

.pipeline-arrow svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-normal);
}

@media (max-width: 768px) {

  .pipeline-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pipeline-step {
    width: 100%;
    padding: 1.25rem;
  }
  
  .pipeline-arrow svg {
    transform: rotate(90deg);
  }

  .hero {
    min-height: 60vh;
    padding: 3rem 0;
    background-image: linear-gradient(180deg, rgba(10, 20, 40, 0.95) 0%, rgba(10, 20, 40, 0.8) 100%), url('../images/hero-bg.webp');
  }

  .cookie-banner {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    text-align: center;
    width: calc(100% - 2rem);
  }

  .cookie-buttons {
    justify-content: center;
  }

  .ai-chat-window {
    width: calc(100% - 2rem);
    height: 420px;
    right: 1rem;
    bottom: 5.5rem;
  }

  .footer-middle {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-badge-container {
    justify-content: center;
  }

  .account-form-panel {
    padding: 1.5rem;
  }

  .age-gate-card {
    padding: 2rem 1.5rem;
  }

  .age-gate-buttons {
    flex-direction: column;
  }

  .cookie-buttons {
    flex-direction: column;
  }

  .policy-block {
    padding: 1.5rem;
  }
}

@media (max-width: 450px) {
  .logo {
    font-size: 1.15rem;
  }

  .logo svg {
    width: 24px;
    height: 24px;
  }
}

/* --- General Responsive Table Layouts (No scrollbar) --- */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: visible !important;
    background: rgba(14, 27, 51, 0.4) !important;
    border: 1px solid var(--color-border) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--border-radius-md) !important;
  }

  table {
    min-width: 0 !important;
    width: 100% !important;
  }

  th, td {
    padding: 0.75rem 0.5rem !important;
    font-size: 0.85rem !important;
  }

  table:not(#sortable-stats-table) th:nth-child(3),
  table:not(#sortable-stats-table) td:nth-child(3) {
    display: none;
  }
}

/* --- Responsive Stats Table (Mobile Card Layout) --- */
@media (max-width: 600px) {
  #sortable-stats-table, 
  #sortable-stats-table thead, 
  #sortable-stats-table tbody, 
  #sortable-stats-table tr, 
  #sortable-stats-table th, 
  #sortable-stats-table td {
    display: block;
  }

  /* Style table header as a sorting toolbar */
  #sortable-stats-table thead {
    margin-bottom: 1rem;
    background: rgba(14, 27, 51, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
  }

  #sortable-stats-table thead tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  #sortable-stats-table thead th {
    padding: 0;
    border: none;
    background: none;
  }

  #sortable-stats-table thead th:nth-child(1),
  #sortable-stats-table thead th:nth-child(2),
  #sortable-stats-table thead th:nth-child(3) {
    display: none; /* Hide non-sortable columns */
  }

  #sortable-stats-table thead tr::before {
    content: "Sort by:";
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.25rem;
  }

  #sortable-stats-table .sort-btn {
    background: rgba(74, 111, 165, 0.2);
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-fast);
  }

  #sortable-stats-table .sort-btn:hover {
    background: rgba(74, 111, 165, 0.4);
    border-color: var(--color-gold);
  }

  /* Style each tbody row as an individual player card */
  #sortable-stats-table tbody tr {
    background: rgba(14, 27, 51, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
  }

  #sortable-stats-table tbody tr:hover td {
    background-color: transparent; /* Disable desktop row hover bg */
  }

  #sortable-stats-table tbody td {
    border: none;
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Row 1: Player info (avatar, name, team) */
  #sortable-stats-table tbody td:nth-child(1) {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid rgba(74, 111, 165, 0.15);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
  }

  /* Hide the redundant Team Division column */
  #sortable-stats-table tbody td:nth-child(3) {
    display: none;
  }

  /* Add pseudo labels before data values */
  #sortable-stats-table tbody td:nth-child(2)::before {
    content: "Position";
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
  }

  #sortable-stats-table tbody td:nth-child(4)::before {
    content: "Goals (G)";
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
  }

  #sortable-stats-table tbody td:nth-child(5)::before {
    content: "Assists (A)";
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
  }

  #sortable-stats-table tbody td:nth-child(6)::before {
    content: "Points (PTS)";
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
  }

  #sortable-stats-table tbody td:nth-child(6) {
    border-top: 1px solid rgba(74, 111, 165, 0.15);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
  }
}