/* ==========================================================================
   App section — the calculator card: header, input field and the
   multiplication table (plus its skeleton-loading state).
   ========================================================================== */

.app {
  display: flex;
  justify-content: center;
  padding: 3rem 1.25rem 6rem;
}

.card--app {
  width: 100%;
  max-width: 620px;
  padding: clamp(1.75rem, 4vw, 3rem);
}

.card__header {
  text-align: center;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.badge {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--violet-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.1);
}

.card__header h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card__header p {
  color: var(--text-2);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

#valorA {
  width: 100%;
  padding: 0.95rem 1.1rem;
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

#valorA::placeholder {
  color: var(--text-2);
}

#valorA:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

#valorA:focus {
  border-color: var(--violet-soft);
  background: rgba(124, 92, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16);
}

.table-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

table#tabuada {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

#tabuada thead td {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0.85rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--glass-border);
}

#tabuada tbody td {
  padding: 0.8rem 0.6rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-1);
}

#tabuada tbody tr:hover {
  background: rgba(124, 92, 255, 0.07);
}

#tabuada tbody tr td:last-child {
  color: var(--text-0);
  font-weight: 700;
}

/* skeleton loading */
#tabuada tbody tr.skeleton-row td {
  padding: 0.9rem 0.6rem;
}

.skeleton-bar {
  height: 12px;
  border-radius: 6px;
  margin: 0 auto;
  width: 60%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.14) 37%,
    rgba(255, 255, 255, 0.06) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
