:root {
  color-scheme: light dark;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
}

body {
  margin: 0;
  padding: 0;
}

header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.site-nav {
  padding: 1.25rem 0 0.5rem;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.site-nav .nav-item {
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a.nav-item {
  text-decoration: none;
  cursor: pointer;
}

.site-nav a.nav-item:hover:not(.disabled) {
  text-decoration: underline;
}

.site-nav .active {
  color: #facc15;
}

.nav-link-strong.active {
  color: #facc15;
}

.site-nav .disabled {
  color: rgba(148, 163, 184, 0.6);
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}


.nav-link-strong {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.home-header {
  padding: 2.5rem 1rem 1.5rem;
}

.home-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.model-main {
  max-width: 920px;
}

.model-section {
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.model-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #facc15;
}

.model-section ul,
.model-section ol {
  margin: 0;
  padding-left: 1.2rem;
}

.model-section li + li {
  margin-top: 0.5rem;
}

.country-grid {
  display: grid;
  gap: 1.5rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(400px, 460px));
}

.country-card {
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 360px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.card-link {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-link:hover:not(.disabled) {
  text-decoration: underline;
}

.card-link.disabled {
  color: rgba(148, 163, 184, 0.6);
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

.card-meta {
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.85);
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.recommendation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommendation-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background-color: rgba(30, 41, 59, 0.65);
}

.recommendation-item:hover {
  background-color: rgba(46, 60, 87, 0.8);
}

.recommendation-rank {
  font-weight: 700;
  font-size: 1.2rem;
  color: #facc15;
  min-width: 2rem;
}

.recommendation-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.recommendation-score {
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
}

.empty {
  color: rgba(203, 213, 225, 0.8);
  font-size: 0.95rem;
}

.detail-header {
  padding: 1.5rem 1rem 1rem;
}


.timestamp {
  margin-top: 0.5rem;
  text-align: center;
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.95rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.table-section {
  margin-top: 1rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

.table-wrapper table {
  min-width: 720px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: rgba(15, 23, 42, 0.8);
}

th,
td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.6);
}

.table-header {
  display: none;
}

#history-section {
  margin-top: 2rem;
}

.daily-summary {
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  line-height: 1.6;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.daily-summary h2 {
  margin-top: 0;
  text-align: center;
}

.daily-summary h3 {
  margin-top: 1.5rem;
}

.daily-summary ul {
  padding-left: 1.25rem;
}

#history-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

#history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: rgba(15, 23, 42, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
}

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

.history-item.active,
.history-item:hover {
  background-color: rgba(30, 41, 59, 0.65);
}

.history-empty {
  padding: 0.75rem 1rem;
  text-align: center;
  color: rgba(203, 213, 225, 0.8);
}

.history-date {
  font-weight: 600;
}

.history-summary {
  font-size: 0.95rem;
  color: #cbd5f5;
  margin-left: 0.5rem;
}

#history-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem auto 0;
}

#history-page-label {
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.85);
}

.history-nav {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.1s ease-in, transform 0.1s ease-in;
}

.history-nav:hover:not(:disabled) {
  background-color: rgba(148, 163, 184, 0.2);
  transform: translateY(-1px);
}

.history-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}

.site-footer {
  max-width: 1100px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: rgba(203, 213, 225, 0.75);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer p {
  margin: 0;
}
