* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #0f172a;
  color: #f8fafc;
}

.card {
  width: min(90%, 500px);

  padding: 40px;

  background: #1e293b;

  border-radius: 20px;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35);

  text-align: center;
}

h1 {
  margin-top: 0;

  font-size: 2.5rem;
}

.description {
  color: #94a3b8;
}

form {
  margin-top: 30px;

  text-align: left;
}

label {
  display: block;

  margin-bottom: 8px;

  color: #cbd5e1;
}

input {
  width: 100%;

  padding: 14px 16px;

  border: 1px solid #475569;
  border-radius: 10px;

  background: #0f172a;
  color: white;

  font-size: 16px;

  outline: none;
}

input:focus {
  border-color: #60a5fa;
}

button {
  width: 100%;

  margin-top: 15px;

  padding: 14px;

  border: 0;
  border-radius: 10px;

  background: #3b82f6;
  color: white;

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;
}

button:hover {
  background: #2563eb;
}

a {
  display: inline-block;

  margin-top: 25px;

  color: #60a5fa;

  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#status {
  min-height: 24px;

  margin-top: 15px;
}

.success {
  color: #4ade80;
}

.error {
  color: #f87171;
}

.display-card {
  padding: 60px 40px;
}

.display-card .label {
  margin: 0;

  color: #94a3b8;

  text-transform: uppercase;

  letter-spacing: 2px;

  font-size: 13px;
}

#visitorName {
  margin: 20px 0 10px;

  font-size: clamp(
    2.5rem,
    10vw,
    5rem
  );

  overflow-wrap: anywhere;
}

#updated {
  color: #64748b;
}
.display-container {
  width: min(900px, 92%);
  margin: 0 auto;
  padding: 50px 0;
}

.display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 30px;
}

.display-header h1 {
  margin: 5px 0 0;
  font-size: 3rem;
}

.label {
  margin: 0;

  color: #60a5fa;

  text-transform: uppercase;
  letter-spacing: 3px;

  font-size: 13px;
  font-weight: 700;
}

.visitor-count {
  min-width: 100px;

  padding: 15px 20px;

  background: #1e293b;

  border-radius: 15px;

  text-align: center;
}

.visitor-count span {
  display: block;

  font-size: 2rem;
  font-weight: 700;
}

.visitor-count small {
  color: #94a3b8;
}

.visitor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visitor {
  display: flex;
  align-items: center;

  padding: 18px 22px;

  background: #1e293b;

  border-radius: 12px;

  animation: appear 0.25s ease-out;
}

.number {
  width: 40px;

  color: #64748b;

  font-size: 14px;
  font-weight: 600;
}

.name {
  color: #f8fafc;

  font-size: 1.4rem;
  font-weight: 600;

  overflow-wrap: anywhere;
}

.empty {
  padding: 60px 20px;

  color: #64748b;

  text-align: center;
  font-size: 1.2rem;

  background: #1e293b;
  border-radius: 15px;
}

.error {
  color: #f87171;
}

.back-link {
  display: block;

  margin-top: 30px;

  color: #60a5fa;

  text-align: center;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.visitor {
  display: flex;
  align-items: center;

  padding: 18px 22px;

  background: #1e293b;

  border-radius: 12px;

  animation: appear 0.25s ease-out;
}

.number {
  width: 40px;

  flex-shrink: 0;

  color: #64748b;

  font-size: 14px;
  font-weight: 600;
}

.visitor-info {
  display: flex;
  flex-direction: column;

  gap: 4px;

  min-width: 0;
}

.name {
  color: #f8fafc;

  font-size: 1.4rem;
  font-weight: 600;

  overflow-wrap: anywhere;
}

.sign-in-time {
  color: #94a3b8;

  font-size: 0.85rem;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.display-actions {
  margin-top: 30px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 5px;
}

.clear-button {
  padding: 11px 20px;

  border: 1px solid #7f1d1d;
  border-radius: 8px;

  background: #450a0a;
  color: #fca5a5;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.clear-button:hover {
  background: #7f1d1d;
  color: white;
}

.clear-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.back-link {
  display: inline-block;

  margin-top: 15px;

  color: #60a5fa;

  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}
