/* ============================================
   PicksByAI - Premium Sports Betting UI
   ============================================ */

/* Base Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Design System Variables */
:root {
  --ink-900: #0b0f1a;
  --ink-800: #121827;
  --ink-700: #1a2235;
  --ink-600: #232d42;
  --field: #141b2e;
  --field-hover: #1a2338;
  --line: #293146;
  --line-light: #3a4560;
  --text: #e6edf7;
  --text-bright: #ffffff;
  --muted: #9aa4b6;
  --accent: #19c37d;
  --accent-glow: rgba(25, 195, 125, 0.4);
  --accent-2: #ffb020;
  --accent-2-glow: rgba(255, 176, 32, 0.4);
  --accent-3: #2b6be6;
  --accent-3-glow: rgba(43, 107, 230, 0.4);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --glass: rgba(20, 27, 46, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(25, 195, 125, 0.15);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Global Styles */
html {
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 1400px 700px at 15% -15%, rgba(25, 195, 125, 0.12), transparent 50%),
    radial-gradient(ellipse 1000px 600px at 85% 5%, rgba(43, 107, 230, 0.15), transparent 50%),
    radial-gradient(ellipse 800px 400px at 50% 100%, rgba(25, 195, 125, 0.08), transparent 50%),
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-800) 40%, var(--ink-700) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
  color: var(--accent-3);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

/* Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  background: rgba(11, 15, 26, 0.85) !important;
  border-bottom: 1px solid var(--glass-border) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  transition: all var(--transition-normal);
}

.navbar-brand {
  font-weight: 800 !important;
  font-size: 1.5rem !important;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.navbar .nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar .nav-link:hover {
  color: var(--text-bright) !important;
  background: rgba(255, 255, 255, 0.05);
}

.navbar .nav-link.active {
  color: var(--accent) !important;
}

/* Sport Stripe - Animated */
.sport-stripe {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-3) 50%,
    var(--accent) 100%
  );
  background-size: 200% 100%;
  animation: stripeMove 3s linear infinite;
}

@keyframes stripeMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--glass-border) !important;
  background: rgba(11, 15, 26, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  margin-top: auto;
  overflow-x: hidden;
}

.footer .container {
  overflow: hidden;
}

.footer-disclaimer {
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  word-break: break-word;
  hyphens: auto;
}

/* ============================================
   Page Headers / Hero
   ============================================ */
.page-header {
  padding: 2.5rem 0 2rem;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-subtitle::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================
   Cards & Containers
   ============================================ */
.card,
.accordion-item,
.list-group-item,
.alert {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.form-control,
.accordion-button {
  background-color: var(--field);
  border-color: var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.form-control:hover {
  border-color: var(--line-light);
}

.form-control:focus {
  background-color: var(--field-hover);
  border-color: var(--accent);
}

.accordion-button {
  background-image: none;
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  color: var(--text);
  background: linear-gradient(135deg, rgba(25, 195, 125, 0.1), rgba(43, 107, 230, 0.1));
  box-shadow: inset 0 -1px 0 var(--line);
}

.accordion-button::after {
  filter: invert(1) opacity(0.5);
}

/* ============================================
   Pick Card - Premium Design
   ============================================ */
.pick-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: all var(--transition-normal);
  position: relative;
}

.pick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.pick-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(25, 195, 125, 0.2);
}

.pick-card:hover::before {
  opacity: 1;
}

.pick-card .card-header {
  background: linear-gradient(135deg, rgba(25, 195, 125, 0.08) 0%, rgba(43, 107, 230, 0.08) 100%);
  border-bottom: 1px solid var(--glass-border);
  padding: 1.25rem 1.5rem;
}

.pick-card .card-body {
  padding: 1.5rem;
}

/* Risk Tier Indicator */
.risk-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.risk-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite;
}

.risk-dot.ultrasafe {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.risk-dot.safe {
  background: var(--accent-3);
  box-shadow: 0 0 12px var(--accent-3-glow);
}

.risk-dot.medium {
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2-glow);
}

@keyframes glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Confidence Meter */
.confidence-meter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.confidence-bar {
  width: 60px;
  height: 6px;
  background: var(--ink-600);
  border-radius: 3px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  border-radius: 3px;
  transition: width var(--transition-slow);
}

/* ============================================
   Badges - Enhanced
   ============================================ */
.badge {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.4em 0.8em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.bg-success {
  background: linear-gradient(135deg, var(--accent), #14a76c) !important;
  color: var(--ink-900);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--accent-3), #1e54b7) !important;
  color: white;
  box-shadow: 0 2px 8px var(--accent-3-glow);
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--accent-2), #e09a00) !important;
  color: var(--ink-900);
  box-shadow: 0 2px 8px var(--accent-2-glow);
}

.badge.bg-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626) !important;
  color: white;
  box-shadow: 0 2px 8px var(--danger-glow);
}

.badge.bg-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
  color: white;
}

.badge.bg-dark {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  color: var(--muted);
}

/* ============================================
   Leg Items - Enhanced
   ============================================ */
.leg-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: all var(--transition-fast);
}

.leg-item:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--line-light);
}

.leg-item:last-child {
  margin-bottom: 0;
}

.leg-player {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
}

.leg-team {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leg-pick {
  color: var(--accent);
  font-weight: 600;
}

.leg-odds {
  color: var(--muted);
  font-size: 0.875rem;
}

.leg-reasoning {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.leg-confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Picks Summary */
.picks-summary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

/* Sport Section Header */
.sport-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(25, 195, 125, 0.15), rgba(43, 107, 230, 0.15));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sport-header svg {
  color: var(--accent);
}

/* ============================================
   Game Cards - Grid Layout
   ============================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.game-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.game-card:hover {
  background: var(--field-hover);
  border-color: var(--line-light);
  transform: translateX(4px);
  color: var(--text);
}

.game-card:hover::before {
  opacity: 1;
}

.game-teams {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-bright);
}

.game-teams .vs {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
  margin: 0 0.25rem;
}

.game-time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.game-time::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* List Group Enhanced */
.list-group {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.list-group-item {
  border-color: var(--glass-border);
  padding: 1rem 1.25rem;
  transition: all var(--transition-fast);
}

.list-group-item + .list-group-item {
  border-top: 1px solid var(--glass-border);
}

.list-group-item-action:hover {
  background: var(--field-hover);
  transform: translateX(4px);
}

.list-group-item-action .text-muted {
  white-space: nowrap;
}

/* ============================================
   Buttons - Premium
   ============================================ */
.btn {
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #14a76c);
  color: var(--ink-900);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1ed98a, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline-primary:hover {
  background: var(--accent);
  color: var(--ink-900);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-outline-secondary {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--muted);
}

.btn-outline-secondary:hover {
  background: var(--field);
  border-color: var(--line-light);
  color: var(--text);
}

/* ============================================
   Alerts - Enhanced
   ============================================ */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border-left: 4px solid;
}

.alert-info {
  background: rgba(43, 107, 230, 0.1);
  border-left-color: var(--accent-3);
  color: var(--text);
}

.alert-light {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--muted);
  color: var(--muted);
}

.alert-success {
  background: rgba(25, 195, 125, 0.1);
  border-left-color: var(--accent);
  color: var(--text);
}

.alert-warning {
  background: rgba(255, 176, 32, 0.1);
  border-left-color: var(--accent-2);
  color: var(--text);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--danger);
  color: var(--text);
}

/* ============================================
   Section Dividers
   ============================================ */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 2rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
  border-radius: 2px;
}

/* ============================================
   Date Picker Enhancement
   ============================================ */
input[type="date"] {
  color-scheme: dark;
}

/* ============================================
   Stats / Metrics Display
   ============================================ */
.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ============================================
   Loading States
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--field) 25%, var(--field-hover) 50%, var(--field) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767.98px) {
  .page-title {
    font-size: 1.75rem;
  }

  .pick-card .card-header,
  .pick-card .card-body {
    padding: 1rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .navbar-brand {
    font-size: 1.25rem !important;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-muted {
  color: var(--muted) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-accent {
  box-shadow: 0 0 20px var(--accent-glow);
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ink-800);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--line-light);
}

/* ============================================
   Dropdown Menu - Dark Theme
   ============================================ */
.dropdown-menu-dark {
  background: var(--ink-800);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
}

.dropdown-menu-dark .dropdown-item {
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
  background: var(--glass);
  color: var(--text-bright);
}

.dropdown-menu-dark .dropdown-item svg {
  color: var(--accent);
}

.nav-link.dropdown-toggle::after {
  margin-left: 0.4em;
}
