@import url("./style.css");

* {
  color: rgba(0, 0, 0, 0.92);
}

body {
  background-color: #ffffff;
}

header {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 3rem 2rem;
  background: transparent;
}

#page-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.92);
  text-align: center;
  background: transparent;
  width: fit-content;
  margin-inline: auto;
  border-radius: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  padding-bottom: 1rem;
}

.back-btn {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.88);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 1rem;
  transition: color 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 3rem;
  transition: all 0.2s ease;
}
.back-btn:hover {
  background: rgba(0, 0, 0, 0.88);
  color: #ffffff;
  border-color: rgba(0, 0, 0, 0.88);
}

#results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  padding: 0 1rem 3rem;
}

.result-card {
  width: clamp(17.5rem, 60vw, 42rem);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(1.5rem);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.03);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  animation: fadeUp 0.3s ease both;
}
.result-card:hover {
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.score-ring {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.ring-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.1);
  stroke-width: 4;
}
.ring-arc {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.ring-text {
  font-family: "Didact Gothic", sans-serif;
  font-size: 10px;
  fill: rgba(0, 0, 0, 0.75);
  dominant-baseline: middle;
  text-anchor: middle;
}

.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-topic {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.36);
}

.card-badge {
  flex-shrink: 0;
  text-align: right;
}
.badge-fraction {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.82);
}
.badge-fraction span {
  color: rgba(0, 0, 0, 0.28);
  font-size: 0.85em;
}
.badge-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.3);
  margin-top: 0.1rem;
}

#empty-state {
  display: none;
  text-align: center;
  padding: 5rem 1rem;
  color: rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 2;
}
#empty-state .icon {
  font-size: 2rem;
  opacity: 0.3;
  margin-bottom: 0.75rem;
}

.dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.dialog-overlay.open {
  display: flex;
}

.dialog {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 0.75rem;
  padding: 2rem 2.25rem;
  max-width: 22rem;
  width: 90%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.dialog h2 {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.82);
  margin-bottom: 0.75rem;
}

.dialog p {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.4);
  line-height: 1.75;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.dialog-btn {
  padding: 0.4rem 1.25rem;
  border-radius: 3rem;
  font-family: "Didact Gothic", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  color: rgba(0, 0, 0, 0.45);
}
.dialog-btn:hover {
  border-color: rgba(0, 0, 0, 0.45);
  color: rgba(0, 0, 0, 0.85);
}
.dialog-btn.danger {
  border-color: rgba(192, 57, 43, 0.3);
  color: rgba(192, 57, 43, 0.7);
}
.dialog-btn.danger:hover {
  background: rgba(192, 57, 43, 0.07);
  border-color: rgba(192, 57, 43, 0.5);
  color: rgba(192, 57, 43, 0.9);
}
