:root {
  --primary-color: #87ceeb;
  --secondary-color: #f5f5f5;
  --border-color: #e0e0e0;
  --text-color: #333;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --circle-size: 300px;
  --animation-duration: 20s;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

body {
  min-height: 100vh;
  position: relative;
  background: #f0f8ff;
  overflow-x: hidden;
  margin: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  z-index: -1;
}

body::before {
  background: #87ceeb;
  top: -100px;
  left: -100px;
  animation: moveBlob1 var(--animation-duration) infinite alternate;
}

body::after {
  background: #b0e0e6;
  bottom: -100px;
  right: -100px;
  animation: moveBlob2 var(--animation-duration) infinite alternate;
}

@keyframes moveBlob1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(100px, 100px) scale(1.5);
  }
  66% {
    transform: translate(-50px, 200px) scale(0.8);
  }
  100% {
    transform: translate(150px, 50px) scale(1.2);
  }
}

@keyframes moveBlob2 {
  0% {
    transform: translate(0, 0) scale(1.2);
  }
  33% {
    transform: translate(-100px, -100px) scale(0.8);
  }
  66% {
    transform: translate(50px, -200px) scale(1.5);
  }
  100% {
    transform: translate(-150px, -50px) scale(1);
  }
}

/* Container */
.centered-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh; /* Adjust height as needed */
  background-color: var(--secondary-color);
  padding: 20px;
  box-shadow: var(--shadow);
}

.content-box {
  text-align: center;
  max-width: 900px;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.content-box h2 {
  font-size: 24px;
  color: var(--text-color);
}

.content-box p {
  font-size: 16px;
  color: var(--text-color);
  margin-top: 10px;
}

.image-container {
  margin-top: 20px;
}

/* Home */
.welcome-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .content-box {
    padding: 15px;
  }

  .content-box h2 {
    font-size: 20px;
  }

  .content-box p {
    font-size: 14px;
  }
}

/* basis design */
.logo-container {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
}

.logo-container-Login {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

nav {
  display: flex;
  justify-content: space-around;
  background: var(--primary-color);
  padding: 10px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.nav-item:hover::before {
  left: 0;
}

.nav-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: black;
  border-radius: 50%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
  transform: rotate(360deg);
}

nav a {
  color: white;
  text-decoration: none;
  position: relative;
  padding: 5px 0;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.nav-item:hover a::after {
  width: 100%;
}

.login-btn {
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

/* Players Stats Match Selection */
.match-selection select {
  padding: 10px 15px;
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-color);
  cursor: pointer;
  width: 200px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
}

.match-selection select::after {
  content: "\25BC";
  font-size: 16px;
  color: var(--text-color);
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.match-selection select:hover {
  border-color: var(--primary-color);
  background-color: #f0f8ff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.match-selection select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #f0f8ff;
  box-shadow: 0 0 8px rgba(135, 206, 235, 0.5);
}

.match-selection select:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.6;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-btn img {
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: black;
  border-radius: 50%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.login-btn:hover img {
  transform: rotate(360deg);
}

.login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.login-btn:hover::before {
  left: 0;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-btn a {
  color: white;
  text-decoration: none;
  position: relative;
}

.login-btn a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.login-btn:hover a::after {
  width: 100%;
}

/* Login Form Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 20px;
  box-sizing: border-box;
}

.login-form {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  background: #87ceeb;
  border-radius: 10px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 25px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-sizing: border-box;
}

/* Button Styles */
.btn-primary {
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 10px;
}

.btn-secondary {
  background: white;
  color: var(--text-color);
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

/* =====================================================================Table Styles */

/* Match Table container styling */
.schedule-table-wrapper {
  overflow: hidden;
  width: 100%;
}

.schedule-table-matches {
  width: 100%;
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  table-layout: fixed;
  border-spacing: 0;
}

.schedule-table-matches thead {
  position: sticky;
  top: 0;
  background-color: var(--secondary-color);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.schedule-table-matches tbody {
  display: block;
  max-height: 400px;
  overflow-y: auto;
  width: 100%;
}

.schedule-table-matches tbody td,
.schedule-table-matches tbody th {
  width: 200px;
}

.schedule-table-matches tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.schedule-table-matches th,
.schedule-table-matches td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box;
  word-wrap: break-word;
}

.schedule-table-matches th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

.schedule-table-matches tr:hover {
  background-color: #f8f9fa;
}

.schedule-table-matches tbody tr:hover {
  background-color: #636b74;
}

.schedule-table-matches tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

.schedule-table-matches tbody tr:nth-child(even) {
  background-color: #ffffff;
}

@media (max-width: 768px) {
  .schedule-table-matches th,
  .schedule-table td {
    font-size: 14px;
    padding: 10px;
  }

  .schedule-table-matches tbody {
    max-height: 300px;
  }
}

.schedule-table-matches tbody::-webkit-scrollbar {
  width: 8px;
}

.schedule-table-matches tbody::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 4px;
}

.schedule-table-matches tbody::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

/* Team/Players Table container styling */
.schedule-table-team {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 12px;
  table-layout: fixed; /* Fixes column alignment */
}

.schedule-table-team thead {
  display: table;
  width: calc(100% - 8px); /* Adjusted to match scrollbar width */
  table-layout: fixed;
  background-color: var(--secondary-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.schedule-table-team thead th {
  padding: 4px;
  text-align: left;
  color: white;
  font-weight: bold;
  font-size: 11px;
  white-space: nowrap;
  background-color: var(--primary-color);
}

.schedule-table-team tbody {
  display: block;
  max-height: 400px;
  overflow-y: auto;
  width: 100%;
}

.schedule-table-team tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.schedule-table-team tbody td {
  padding: 4px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box;
  word-wrap: break-word;
  font-size: 11px;
}

.schedule-table-team tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

.schedule-table-team tbody tr:nth-child(even) {
  background-color: #ffffff;
}

.schedule-table-team tbody tr:hover {
  background-color: #f8f9fa;
}

.schedule-table-team tbody::-webkit-scrollbar {
  width: 8px;
}

.schedule-table-team tbody::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 4px;
}

.schedule-table-team tbody::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

/* After Selection Table container styling */

.schedule-table-AfterSelection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-table-AfterSelection thead {
  position: sticky;
  top: 0;
  background-color: var(--secondary-color);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.schedule-table-AfterSelection tbody {
  display: block;
  max-height: 400px;
  overflow-y: auto;
  width: 100%;
}

.schedule-table-AfterSelection tbody td,
.schedule-table-AfterSelection tbody th {
  width: 200px;
}

.schedule-table-AfterSelection tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.schedule-table-AfterSelection th,
.schedule-table-AfterSelection td {
  border: 1px solid var(--border-color);
  padding: 10px;
  text-align: center;
  word-wrap: break-word; /* Prevents overflow */
  white-space: nowrap; /* Keeps content on one line */
  overflow: hidden;
  text-overflow: ellipsis; /* Adds "..." for overflowed text */
}

.schedule-table-AfterSelection th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

.schedule-table-AfterSelection tr:hover {
  background-color: #f8f9fa;
}

.schedule-table-AfterSelection tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

.schedule-table-AfterSelection tbody tr:nth-child(even) {
  background-color: #ffffff;
}

@media (max-width: 768px) {
  .schedule-table-AfterSelection th,
  .schedule-table td {
    font-size: 14px;
    padding: 10px;
  }

  .schedule-table-AfterSelection tbody {
    max-height: 300px;
  }
}

.schedule-table-AfterSelection tbody::-webkit-scrollbar {
  width: 8px;
}

.schedule-table-AfterSelection tbody::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 4px;
}

.schedule-table-AfterSelection tbody::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

/* Player card style after Selection */
.chosen-player-card-image {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 200px;
  margin: 0 auto; /* Centers the element horizontally */
  text-align: center;
}

.chosen-player-card-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Player Grid Styles */
.players-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
  padding: 0 20px;
  box-sizing: border-box;
}

.player-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.player-avatar img {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 50%;
  margin-bottom: 15px;
}

.player-card h3 {
  font-size: 18px;
  color: var(--text-color);
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .players-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* statistics btn */
.btn-stats {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-stats:hover {
  background-color: #00bfff;
}

.btn-selection {
  gap: 5px;
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-selection::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.btn-selection:hover::before {
  left: 0;
}

.btn-selection:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-selection a {
  color: white;
  text-decoration: none;
  position: relative;
}

.btn-selection a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.btn-selection:hover a::after {
  width: 100%;
}

/* Stats Form Styles */
.stats-form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.stats-table th,
.stats-table td {
  padding: 8px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.match-select {
  margin-bottom: 20px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 200px;
}
