/* =====================================================
   BETTRACK PRO - MODERN APP THEME
   ===================================================== */

:root {
  --bg-dark: #0a0e1a;
  --bg-card: #131829;
  --bg-hover: #1a1f35;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.1);
  --sidebar-width: 260px;
  --topbar-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =====================================================
   SIDEBAR NAVIGATION
   ===================================================== */

.app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease;
}

/* Sidebar Header with Logo */
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* Sidebar Navigation Links */
.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-link i {
  font-size: 18px;
  width: 20px;
}

.sidebar-nav .nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  color: var(--accent-light);
  border-left: 3px solid var(--accent);
}

/* Added admin link styling */
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 16px;
}

.nav-link.admin-link {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--danger);
}

.nav-link.admin-link:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Sidebar Footer with User */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-dark);
  border-radius: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  /* Added positioning for profile image */
  position: relative;
  overflow: hidden;
}

/* Added profile avatar image styles */
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--success);
  text-transform: uppercase;
  font-weight: 600;
}

.user-menu {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--accent);
  color: white;
}

.logout-btn:hover {
  background: var(--danger);
}

/* =====================================================
   MOBILE TOPBAR
   ===================================================== */

.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 999;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.mobile-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  /* Added positioning for mobile profile image */
  position: relative;
  overflow: hidden;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* =====================================================
   PROFILE PICTURE STYLES
   ===================================================== */

.profile-picture-container {
  display: inline-block;
  position: relative;
  margin-bottom: 16px;
}

.profile-picture-large {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.profile-picture-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 4px solid var(--accent);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

#profilePictureInput {
  display: none;
}

/* =====================================================
   MAIN CONTENT AREA
   ===================================================== */

.app-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.content-container {
  padding: 32px 24px;
  max-width: 1600px;
  margin: 0 auto;
}

/* =====================================================
   RESPONSIVE - MOBILE APP BEHAVIOR
   ===================================================== */

@media (max-width: 992px) {
  /* Mobile: sidebar slides from left side like an app */
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  .sidebar-overlay {
    display: block;
  }

  .mobile-topbar {
    display: flex;
  }

  .app-main {
    margin-left: 0;
    padding-top: var(--topbar-height);
  }

  .content-container {
    padding: 20px 16px;
  }

  /* Enhanced mobile table responsiveness */
  /* Ensure tables scroll on mobile */
  .table-card {
    padding: 16px;
    /* Ensure no overflow hidden on parent */
    overflow: visible;
  }

  /* Force table scrolling on mobile */
  .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px;
    margin-bottom: 0;
    /* Add visual indicator for scrollability */
    box-shadow: inset -20px 0 20px -20px rgba(99, 102, 241, 0.3);
  }

  .table {
    /* Reduce min-width slightly for mobile but keep it wide enough to trigger scroll */
    min-width: 800px !important;
    display: table !important;
    margin-bottom: 0;
    table-layout: auto !important;
  }

  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap !important;
    min-width: 80px;
  }

  /* Stat cards stack on mobile */
  .stat-card {
    margin-bottom: 16px;
  }

  /* Charts responsive */
  .chart-container {
    padding: 16px;
  }

  canvas {
    max-height: 250px !important;
  }

  /* Form responsive */
  .form-card {
    padding: 20px;
  }

  /* Button groups stack */
  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    border-radius: 10px !important;
    margin-bottom: 8px;
  }
}

/* Added extra small mobile breakpoint for very small screens */
@media (max-width: 576px) {
  .content-container {
    padding: 16px 12px;
  }

  .table {
    /* Keep minimum width to ensure scrolling works */
    min-width: 700px !important;
  }

  .table th,
  .table td {
    padding: 8px 10px;
    font-size: 12px;
    min-width: 70px;
  }

  .stat-card h3 {
    font-size: 11px;
  }

  .stat-card .value {
    font-size: 2rem;
  }

  h1 {
    font-size: 24px;
  }

  h4 {
    font-size: 16px;
  }
}

/* =====================================================
   STAT CARDS
   ===================================================== */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.6s;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.stat-card.win {
  border-color: var(--success);
}

.stat-card.win:hover {
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.stat-card.loss {
  border-color: var(--danger);
}

.stat-card.loss:hover {
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.stat-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: 1px;
  font-weight: 600;
}

.stat-card .value {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 10px 0;
  color: var(--text-primary);
}

/* =====================================================
   FORMS
   ===================================================== */

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
}

.form-label {
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control,
.form-select {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-dark);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-secondary);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border: none;
  border-radius: 10px;
  padding: 12px 32px;
  font-weight: 700;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  color: white;
}

.btn-success {
  background: var(--success);
  border: none;
  color: white;
}

.btn-success:hover {
  background: #059669;
  color: white;
}

.btn-danger {
  background: var(--danger);
  border: none;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

/* =====================================================
   TABLES
   ===================================================== */

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  /* Changed from overflow: visible to allow scrolling */
  overflow: hidden;
}

/* Enhanced table-responsive for guaranteed horizontal scrolling */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-dark);
  margin-bottom: 16px;
  /* Force scrollbar to always be available */
  position: relative;
  border-radius: 8px;
}

/* Custom scrollbar styling for better UX */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.table {
  color: var(--text-primary);
  margin: 0;
  /* Ensure table maintains minimum width to force scrolling */
  min-width: 900px;
  width: 100%;
  white-space: nowrap;
  /* Prevent table from breaking layout */
  table-layout: auto;
}

.table th,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  /* Prevent text wrapping to maintain table width */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table thead th {
  background: var(--bg-dark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table tbody tr {
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: var(--bg-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
  padding: 6px 12px;
  font-weight: 600;
  border-radius: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.badge-primary {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
}

/* =====================================================
   CHARTS
   ===================================================== */

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-container h4 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
  border-radius: 12px;
  border: none;
  font-weight: 500;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-left: 4px solid #3b82f6;
}

/* =====================================================
   UTILITIES
   ===================================================== */

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animated-value {
  animation: countUp 0.6s ease-out;
}

/* =====================================================
   ANDROID APK DOWNLOAD BUTTON - PREMIUM FLOATING
   ===================================================== */

/* Replaced basic FAB with premium animated floating button */
.android-download-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #3ddc84 0%, #2eb872 50%, #1fa25a 100%);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(61, 220, 132, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  text-decoration: none;
  animation: fabBounce 3s ease-in-out infinite;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.android-download-fab.show {
  display: flex;
}

.android-download-fab:hover {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 12px 48px rgba(61, 220, 132, 0.8), 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: none;
}

.android-download-fab i {
  font-size: 32px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: iconPulse 2s ease-in-out infinite;
}

.android-download-fab:hover i {
  animation: iconSpin 0.6s ease-in-out;
}

/* Glowing pulsing ring effect - triple rings */
.android-download-fab::before,
.android-download-fab::after {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 4px solid #3ddc84;
  opacity: 0;
  animation: fabPulse 3s ease-out infinite;
}

.android-download-fab::after {
  animation-delay: 1.5s;
}

/* Sparkle effect */
.android-download-fab:hover::before {
  animation: sparkle 0.6s ease-out;
}

@keyframes fabBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-12px) scale(1.05);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-6px) scale(1.02);
  }
}

@keyframes fabPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes iconSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes sparkle {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
  }
}

/* Premium tooltip with gradient */
.download-tooltip {
  position: absolute;
  right: 85px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.download-tooltip::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #a855f7;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.android-download-fab:hover .download-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  right: 85px;
}

/* Add download icon pulse inside button */
.android-download-fab::before {
  content: "↓";
  position: absolute;
  font-size: 16px;
  color: white;
  font-weight: bold;
  bottom: 8px;
  right: 12px;
  animation: downloadPulse 2s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes downloadPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.8;
  }
  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

/* Mobile responsive with better positioning */
@media (max-width: 576px) {
  .android-download-fab {
    bottom: 90px;
    right: 20px;
    width: 64px;
    height: 64px;
  }

  .android-download-fab i {
    font-size: 28px;
  }
}

/* ================= */

/* =====================================================
   SHARED BETSLIPS STYLES
   ===================================================== */

/* Added styles for betslip sharing feature */

/* Page Header */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Card Styles */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
}

.card-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
}

.bg-gradient {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.05));
}

/* Selection Card for Create Betslip */
.selection-card {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.selection-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.selection-header h5 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-light);
  margin: 0;
}

/* Summary Card */
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item span {
  color: var(--text-secondary);
  font-size: 14px;
}

.summary-item strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.summary-item.total {
  padding-top: 16px;
  margin-top: 8px;
}

.summary-item.total strong {
  font-size: 24px;
  color: var(--success);
}

/* Betslip Selections Display */
.betslip-selections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.betslip-selection-item {
  display: grid;
  grid-template-columns: 40px 1fr 80px 100px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.betslip-selection-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.betslip-selection-item.won {
  border-left: 4px solid var(--success);
}

.betslip-selection-item.lost {
  border-left: 4px solid var(--danger);
}

.betslip-selection-item.pending {
  border-left: 4px solid var(--warning);
}

.selection-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
}

.selection-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selection-league {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.selection-match {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.selection-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.selection-time i {
  margin-right: 4px;
}

.selection-bet {
  margin-top: 4px;
}

.bet-type {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.selection-odds {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-light);
  text-align: center;
}

.selection-status {
  text-align: center;
}

/* Info Items */
.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item i {
  width: 24px;
  color: var(--accent);
  font-size: 16px;
}

.info-item span {
  flex: 1;
  color: var(--text-secondary);
  font-size: 14px;
}

.info-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Share Section */
.share-section {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-dark);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.share-section .form-label {
  margin-bottom: 8px;
  display: block;
}

.input-group {
  display: flex;
  gap: 0;
}

.input-group .form-control {
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.input-group .btn {
  border-radius: 0 10px 10px 0;
}

/* Betslip Card Grid */
.betslip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.betslip-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.betslip-card-header {
  padding: 20px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.betslip-card-header h5 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.betslip-card-body {
  padding: 20px;
  flex: 1;
}

.betslip-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.info-box {
  background: var(--bg-dark);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.info-box small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 600;
}

.info-box strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.betslip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.betslip-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.betslip-meta i {
  color: var(--accent);
}

.betslip-card-footer {
  padding: 16px 20px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
}

/* Sticky positioning for summary sidebar */
.sticky-top {
  position: sticky;
  top: 20px;
}

/* Responsive adjustments for betslips */
@media (max-width: 768px) {
  .betslip-selection-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .selection-odds,
  .selection-status {
    text-align: left;
  }

  .selection-number {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .betslip-info-grid {
    grid-template-columns: 1fr;
  }

  .sticky-top {
    position: relative;
    top: 0;
  }
}

/* Page transitions */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-container > * {
  animation: fadeInUp 0.5s ease-out;
}
