@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard';
  font-weight: 200;
}

/* Hide scrollbar for all browsers */
html,
body {
  overflow: hidden;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

body {
  background: transparent;
  min-height: 100vh;
  padding: 0;
}

.container {
  width: fit-content;
  max-width: 600px;
  margin: 0;
}

#ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
  border-radius: 8px;
  overflow: hidden;
}

/* Header */
#ranking-table thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

#ranking-table thead th {
  padding: 4px;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  border: none;
  white-space: nowrap;
}

/* Body rows */
#ranking-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

#ranking-table tbody tr:last-child {
  border-bottom: none;
}

#ranking-table td {
  padding: 4px 10px;
  vertical-align: middle;
  border: none;
  white-space: nowrap;
}

/* Column widths and alignment */
.col-rank {
  width: auto;
  text-align: center;
}

.col-name {
  width: auto;
  text-align: center;
}

.col-score {
  width: auto;
  text-align: right;
}

/* Rank cell */
.rank-cell {
  font-weight: 400;
  font-size: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Name cell */
.name-cell {
  font-weight: 400;
  font-size: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Score cell */
.score-cell {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Hide header when showHeader is false */
#table-header.hidden {
  display: none;
}

/* Animation for new entries */
@keyframes highlight {
  0% {
    filter: brightness(1.5);
    transform: scale(1.02);
  }

  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

.row-highlight {
  animation: highlight 0.8s ease-out;
}

/* Animation for score change */
@keyframes scoreUpdate {
  0% {
    transform: scale(1.2);
    color: #4caf50;
  }

  100% {
    transform: scale(1);
  }
}

.score-updated {
  animation: scoreUpdate 0.5s ease-out;
}