/* =======================
   CORE RESET & VARIABLES
======================= */
:root {
  --dark-bg: #0a0f1c;
  --text-light: #ffffff;
  --text-dark: #333333;
  --primary-blue: #0b74de;
  --secondary-blue: #d1e7ff;
  --primary-red: #e74c3c;
  --secondary-red: #ffd7d7;
  --success-green: #28a745;
  --warning-yellow: #ffc107;
  --danger-red: #dc3545;
  --light-bg: #f8f9fa;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

/* =======================
   DARK MODE TOGGLE - Enhanced
======================= */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-blue);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* =======================
   FOOTER - Enhanced
======================= */
.footer {
  background-color: var(--dark-bg);
  color: #ccc;
  padding: 30px 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-section h3 {
  color: var(--text-light);
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #89c4ff;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #1e293b;
}

/* =======================
   ODDS ANIMATION - Enhanced
======================= */
.odds-up {
  animation: pulseGreen 1s ease;
}

.odds-down {
  animation: pulseRed 1s ease;
}

@keyframes pulseGreen {
  0% { background-color: #fff; }
  50% { background-color: #d4f8d4; }
  100% { background-color: #fff; }
}

@keyframes pulseRed {
  0% { background-color: #fff; }
  50% { background-color: #f8d4d4; }
  100% { background-color: #fff; }
}

/* =======================
   ODDS TILE - Enhanced to match Smarkets
======================= */
.odds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.odds-tile {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid #eaeaea;
}

.odds-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.odds-header {
  padding: 12px 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eaeaea;
  font-weight: 600;
}

.odds-content {
  padding: 15px;
}

.odds-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 8px 0;
}

.odds-label {
  font-weight: 500;
  color: #555;
}

.odds-value {
  font-weight: 600;
}

.back-odds {
  background: #f0f7ff;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--primary-blue);
}

.lay-odds {
  background: #fff0f0;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--primary-red);
}

.odds-actions {
  display: flex;
  gap: 10px;
  padding: 10px 15px;
  border-top: 1px solid #eaeaea;
}

/* =======================
   BETSLIP PREVIEW - Enhanced to match Smarkets
======================= */
#betslip-preview {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  color: var(--text-dark);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,\"
}

0.15);
  z-index: 1000;
  width: 320px;
  border: 1px solid #e0e0e0;
  display: none;
  overflow: hidden;
}

.betslip-header {
  background: var(--dark-bg);
  color: white;
  padding: 12px 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.betslip-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.betslip-content {
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
}

.betslip-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.betslip-item:last-child {
  border-bottom: none;
}

.betslip-actions {
  padding: 15px;
  background: #f8f9fa;
  border-top: 1px solid #eaeaea;
}

.betslip-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(11, 116, 222, 0.3);
  z-index: 999;
  font-size: 20px;
}

/* =======================
   MARKET TABS - Enhanced
======================= */
.market-tabs {
  display: flex;
  gap: 10px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.market-tabs .tab {
  background: #eef2f7;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.market-tabs .tab:hover {
  background: #e0e8f2;
}

.market-tabs .tab.active {
  background: var(--primary-blue);
  color: white;
  border-color: #0a68c7;
}

/* =======================
   LIVE STATUS BAR - Enhanced
======================= */
.live-status-bar {
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  color: #7a4a00;
  padding: 10px 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ff0000;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

/* =======================
   ALERT BANNER - Enhanced
======================= */
.alert-banner {
  padding: 12px 20px;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  margin: 15px 0;
}

.alert-banner.info {
  background: #d1ecf1;
  color: #0c5460;
}

.alert-banner.warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-banner.error {
  background: #f8d7da;
  color: #721c24;
}

.alert-banner.success {
  background: #d4edda;
  color: #155724;
}

/* =======================
   LOADER - Enhanced
======================= */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
}

.loader .spinner {
  border: 4px solid rgba(11, 116, 222, 0.2);
  border-top: 4px solid var(--primary-blue);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =======================
   ACCOUNT PANEL - Enhanced
======================= */
.account-panel {
  max-width: 1000px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
}

.account-sidebar {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 20px;
}

.account-content {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 25px;
}

.balance-box {
  background: #f0f8ff;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 25px;
  border: 1px solid #d1e7ff;
}

.balance-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 10px 0;
}

.account-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-btn {
  display: block;
  padding: 12px;
  background: var(--primary-blue);
  color: white;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.account-btn:hover {
  background: #0a68c7;
  transform: translateY(-2px);
}

.account-btn.danger {
  background: var(--danger-red);
}

.account-btn.danger:hover {
  background: #c82333;
}

/* =======================
   ALERT BOX - Enhanced
======================= */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-weight: 500;
}

.alert.info {
  background-color: #e7f4ff;
  border-left: 4px solid var(--primary-blue);
  color: #0c5460;
}

.alert.success {
  background-color: #d4edda;
  border-left: 4px solid var(--success-green);
  color: #155724;
}

.alert.warning {
  background-color: #fff3cd;
  border-left: 4px solid var(--warning-yellow);
  color: #856404;
}

.alert.error {
  background-color: #f8d7da;
  border-left: 4px solid var(--danger-red);
  color: #721c24;
}

/* =======================
   TABLE STYLES - Enhanced
======================= */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  margin: 25px 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.table th {
  background-color: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
}

.table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
}

.table-striped tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
  background-color: #f1f4f8;
}

/* =======================
   ANNOUNCEMENTS WIDGET - Enhanced
======================= */
.announcement-widget {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
  box-shadow: var(--card-shadow);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eaeaea;
}

.widget-title {
  font-size: 20px;
  color: var(--dark-bg);
}

.announcement-list {
  list-style: none;
}

.announcement {
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.announcement:last-child {
  border-bottom: none;
}

.announcement.important {
  border-left: 3px solid var(--warning-yellow);
  padding-left: 15px;
}

.announcement.critical {
  border-left: 3px solid var(--danger-red);
  padding-left: 15px;
  background-color: #fffafa;
}

/* =======================
   LIVE CHAT WIDGET - Enhanced
======================= */
.chat-widget {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 320px;
  height: 400px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 5px 25px rgba(0,0,0,0.15);
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.chat-header {
  background-color: var(--primary-blue);
  color: white;
  padding: 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.chat-messages {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-form {
  display: flex;
  border-top: 1px solid #eaeaea;
  padding: 12px;
  background: #f8f9fa;
}

.chat-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  margin-right: 10px;
}

.chat-send {
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition);
}

.chat-send:hover {
  background: #0a68c7;
}

.user-msg {
  background-color: var(--primary-blue);
  color: white;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 15px;
  max-width: 80%;
  align-self: flex-end;
}

.bot-msg {
  background-color: #f0f2f5;
  color: var(--text-dark);
  border-radius: 18px 18px 18px 4px;
  padding: 10px 15px;
  max-width: 80%;
  align-self: flex-start;
}

/* =======================
   RESPONSIVE DESIGN
======================= */
@media (max-width: 768px) {
  .account-panel {
    grid-template-columns: 1fr;
  }

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

  .chat-widget {
    width: 100%;
    height: 70vh;
    bottom: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
  }

  .betslip-toggle {
    bottom: 80px;
  }
}

@media (max-width: 480px) {
  .market-tabs {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .table {
    font-size: 14px;
  }
}

/* =======================
   UTILITY CLASSES
======================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 40px 0;
}

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

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: #666;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color var(--transition, 0.3s ease);
}

.dot.active {
  background-color: #00cc99;
}

.dot:hover {
  background-color: #00cc99cc;
}

@media (max-width: 768px) {
  .slider-dots {
    gap: 6px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }
}