/* ===========================
   Minimalist TOTP Generator
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[v-cloak] {
  display: none;
}

/* --- Base --- */
html,
body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #eef1f5;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100vh;
}

/* --- Card --- */
.card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 10px 30px -5px rgba(0, 0, 0, 0.08);
  padding: 48px 56px;
  width: 100%;
  max-width: 780px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Title --- */
.title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: #1a1a2e;
  margin-bottom: 36px;
  letter-spacing: -0.02em;
}

/* --- Inputs Row --- */
.inputs-row {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.field--half {
  flex: 1;
  margin-bottom: 0;
}

.label {
  font-size: 11px;
  font-weight: 600;
  color: #5a5a6e;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  background: #f5f7fa;
  border: 1.5px solid #e2e6ec;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input::placeholder {
  color: #a0a4b0;
  font-weight: 400;
}

.input:hover {
  border-color: #c5cad4;
}

.input:focus {
  border-color: #3b82d9;
  box-shadow: 0 0 0 3px rgba(59, 130, 217, 0.12);
  background: #ffffff;
}

/* --- Token Section --- */
.token-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.token-box {
  flex: 1;
  background: #f5f7fa;
  border: 1.5px solid #e2e6ec;
  border-radius: 16px;
  padding: 28px 32px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.token-value {
  font-size: 64px;
  font-weight: 900;
  color: #1a1a2e;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.token-countdown {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #7a7e8c;
  margin-bottom: 12px;
}

/* --- Progress Bar --- */
.progress-track {
  width: 100%;
  height: 5px;
  background: #e2e6ec;
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82d9, #60a5fa);
  border-radius: 100px;
  transition: width 1s linear;
}

/* --- Copy Button --- */
.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #3b82d9, #2563c0);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 217, 0.35);
}

.copy-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(59, 130, 217, 0.45);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn svg {
  width: 26px;
  height: 26px;
}

/* --- Guide --- */
.guide {
  margin-top: 24px;
  border-top: 1px solid #e2e6ec;
  padding-top: 16px;
}

.guide-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #7a7e8c;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s ease;
}

.guide-toggle::-webkit-details-marker {
  display: none;
}

.guide-toggle:hover {
  color: #3b82d9;
}

.guide-toggle svg {
  flex-shrink: 0;
}

.guide-content {
  margin-top: 14px;
  padding: 16px;
  background: #f5f7fa;
  border-radius: 10px;
}

.guide-content p {
  font-size: 12px;
  font-weight: 600;
  color: #5a5a6e;
  margin-bottom: 6px;
  margin-top: 12px;
}

.guide-content p:first-child {
  margin-top: 0;
}

.guide-content code {
  display: block;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  color: #3b82d9;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e2e6ec;
  word-break: break-all;
}

.guide-note {
  color: #9a9eb0 !important;
  font-weight: 400 !important;
  font-size: 11px !important;
  margin-bottom: 0 !important;
}

/* --- Responsive --- */
@media screen and (max-width: 640px) {
  .card {
    padding: 32px 24px;
    border-radius: 18px;
  }

  .title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .inputs-row {
    flex-direction: column;
    gap: 12px;
  }

  .token-value {
    font-size: 42px;
  }

  .token-box {
    padding: 20px 20px 16px;
  }

  .copy-btn {
    width: 56px;
    height: 56px;
  }

  .copy-btn svg {
    width: 22px;
    height: 22px;
  }
}