* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: beige;
  min-height: 100vh;
  color: #333;
}

/* Hide scrollbars globally */
*::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.main-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
}

.sidebar {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar h3 {
  color: #1e3c72;
  margin-bottom: 20px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.config-section:last-child {
  border-bottom: none;
}

.modal-content .form-group input,
.modal-content .form-group select {
  margin-bottom: 10px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 5px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.main-content {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
}

.tab {
  padding: 15px 25px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab.active {
  background: white;
  color: #1e3c72;
  border-bottom: 3px solid #667eea;
}

.tab:hover {
  background: #e9ecef;
}

.tab-content {
  display: none;
  padding: 30px;
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

.team-selector {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.team-selector h4 {
  margin-bottom: 15px;
  color: #1e3c72;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.team-tab {
  padding: 8px 16px;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.team-tab.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.team-tab:hover {
  border-color: #667eea;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.stat-card h3 {
  font-size: 2rem;
  margin-bottom: 5px;
}

.stat-card p {
  opacity: 0.9;
  font-weight: 500;
}

.stat-card.danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.stat-card.success {
  background: linear-gradient(135deg, #48cae4 0%, #023047 100%);
}

.auction-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  table-layout: fixed;
}

.auction-table th {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.auction-table th:last-child {
  border-right: none;
}

.auction-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
  font-size: 14px;
}

.auction-table tr:hover {
  background: #f8f9fa;
}

.auction-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  font-size: 13px;
}

.auction-table input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.indian-player {
  color: #28a745;
  font-weight: 600;
}

.overseas-player {
  color: #dc3545;
  font-weight: 600;
}

.rtm-checkbox {
  transform: scale(1.2);
  accent-color: #667eea;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: hidden; /* Prevent scrolling on modal background */
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-height: 80vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  color: #1e3c72;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

.upload-area {
  border: 2px dashed #667eea;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: #1e3c72;
  background: #f8f9fa;
}

.upload-area.dragover {
  border-color: #1e3c72;
  background: #e3f2fd;
}

.file-input {
  display: none;
}

.player-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #f1f3f4;
}

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

.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.scroll-container {
  max-height: 500px;
  overflow-y: auto;
}

.analytics-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.chart-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.autocomplete-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  width: max-content;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: none;
}

.autocomplete-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.autocomplete-suggestion:hover {
  background: #f8f9fa;
}

@media (max-width: 1200px) {
  .main-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

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

  .team-tabs {
    justify-content: center;
  }

  .analytics-charts {
    grid-template-columns: 1fr;
  }
}
