@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0B1215;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 95vh;
  width: 100%;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
}

.prev {
  color: aliceblue;
  margin-bottom: 20px;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: fadeInDown 0.8s ease-out;
}

.scores {
  width: 100%;
  overflow-x: auto;
  animation: fadeIn 1s ease-out;
}

button {
  text-transform: uppercase;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: scale(0.98);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { 
    opacity: 0;
    transform: translateY(-20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translateX(-20px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

.scores-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-top: 20px;
  font-family: 'Poppins', sans-serif;
  color: aliceblue;
  min-width: 600px;
}

.scores-table th, .scores-table td {
  padding: 15px;
  text-align: left;
  border: none;
}

.scores-table th {
  background-color: #1E2A32;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.scores-table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, #4A90E2, transparent);
  transform: translateX(-100%);
  animation: slideIn 0.5s forwards;
}

.scores-table tr {
  background-color: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  animation: slideIn 0.5s forwards;
  opacity: 0;
}

.scores-table tr:nth-child(even) {
  animation-delay: 0.1s;
}

.scores-table tr:nth-child(odd) {
  animation-delay: 0.2s;
}

.scores-table tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scores-table td {
  position: relative;
  overflow: hidden;
}

.scores-table td::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: 0.5s;
}

.scores-table tr:hover td::before {
  left: 100%;
}

.no-scores {
  color: aliceblue;
  text-align: center;
  font-size: 1.2rem;
  margin-top: 20px;
  animation: fadeIn 1s ease-out;
}

#btn-back {
  position: fixed;
  top: 0;
  left: 0;
  background: #1E2A32;
  color: white;
  border: none;
  font-size: 20px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s ease;
  z-index: 1000;
  border-radius: 0 0 5px 0;
}

#btn-back:hover {
  background: #365970;
}

.back-icon {
  display: none;
}

#btn-clear {
  position: fixed;
  top: 0;
  right: 0;
  background: linear-gradient(45deg, #FF416C, #FF4B2B);
  color: white;
  border: none;
  font-size: 16px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
  z-index: 1000;
  border-radius: 0 0 0 5px;
  overflow: hidden;
}

#btn-clear::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 80%);
  transform: scale(0);
  transition: transform 0.4s ease-out;
}

#btn-clear:hover::before {
  transform: scale(1);
}

#btn-clear:hover {
  box-shadow: 0 0 20px rgba(255, 75, 43, 0.5);
}
 
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

#btn-clear:active {
  animation: shake 0.3s ease-in-out;
}

@media (max-width: 768px) {
  #btn-back {
    padding: 10px;
    font-size: 24px;
  }

  #btn-clear {
    font-size: 14px;
    padding: 8px 16px;
  }

  .back-text {
    display: none;
  }

  .back-icon {
    display: inline;
  }

  .prev {
    font-size: 2rem;
  }

  .scores-table tr {
    animation: none;
    opacity: 1;
  }

  .scores-table tr:active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
  }

  .scores-table td::before {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  .scores-table {
    font-size: 14px;
  }

  .scores-table th, .scores-table td {
    padding: 10px;
  }

  .prev {
    font-size: 1.8rem;
  }
}