@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #fff5f7;
  --card: #ffffff;
  --text: #3b0724;
  --muted: #9d4c73;
  --primary: #ec4899;
  --primary2: #db2777;
  --primary-glow: rgba(236, 72, 153, 0.28);
  --soft: #fdf2f8;
  --soft-border: #fbcfe8;
  --line: #fce7f3;
  --shadow: 0 10px 32px rgba(219, 39, 119, 0.08);
  --r: 22px;
  --font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding: 14px 12px 96px;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 10% 0%, #fce7f3 0%, transparent 40%),
              radial-gradient(circle at 90% 15%, #fbcfe8 0%, transparent 35%),
              linear-gradient(180deg, #fff1f2 0%, #fdf2f8 60%, #fff5f7 100%);
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 20px;
  margin: 4px 0 16px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 55%, #db2777 100%);
  color: #fff;
  box-shadow: 0 14px 35px rgba(236, 72, 153, 0.28);
  position: relative;
  overflow: hidden;
}

.hero:after {
  content: "";
  position: absolute;
  right: -45px;
  top: -45px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .9;
}

.hero h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sub {
  font-size: 13px;
  opacity: .9;
}

.pill {
  position: relative;
  z-index: 1;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.card {
  background: #ffffff !important;
  border: 1px solid #fce7f3 !important;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 14px 0;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 850;
  color: #4a0429;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.quick {
  min-height: 86px;
  text-decoration: none;
  color: #db2777 !important;
  background: #ffffff !important;
  border: 1.5px solid #fbcfe8 !important;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.06);
  transition: all 0.15s ease;
}

.quick:active {
  transform: scale(0.97);
  background: #fdf2f8 !important;
}

.quick span {
  font-size: 13px;
  font-weight: 800;
}

.quick.danger {
  color: #db2777 !important;
}

.field {
  margin: 12px 0;
}

.field label, label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 800;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input, input, textarea, select {
  width: 100%;
  border: 1.5px solid #fbcfe8;
  background: #ffffff;
  border-radius: 15px;
  padding: 13px 14px;
  color: var(--text);
  outline: none;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 650;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  border-color: #ec4899 !important;
  box-shadow: 0 0 0 3.5px rgba(236, 72, 153, 0.18) !important;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.copy-row button {
  width: 52px;
  border: 1px solid var(--soft-border);
  border-radius: 14px;
  background: var(--soft);
  color: #db2777;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-row button:active {
  transform: scale(0.92);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 0;
  text-decoration: none;
  font-family: var(--font-family);
  font-weight: 850;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #db2777 100%);
  box-shadow: 0 10px 24px var(--primary-glow);
  cursor: pointer;
  font-size: 15.5px;
  transition: all 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn.wide, button.wide {
  width: 100%;
  margin-top: 10px;
}

.btn.soft {
  background: var(--soft) !important;
  color: #db2777 !important;
  border: 1px solid var(--soft-border) !important;
  box-shadow: none !important;
}

.btn.soft:hover, .btn.soft:active {
  background: #fce7f3 !important;
}

.btn.danger {
  background: #fff0f3 !important;
  color: #f03a5e !important;
  border: 1px solid #ffd2dc !important;
  box-shadow: none !important;
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.empty {
  padding: 22px;
  border-radius: 18px;
  background: #fff5f7;
  border: 1.5px dashed #fbcfe8;
  color: var(--muted);
  text-align: center;
  font-weight: 650;
}

.muted {
  display: block;
  color: var(--muted);
  margin-top: 10px;
  font-size: 13px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.list.small {
  max-height: 330px;
  overflow: auto;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px;
  background: #fffbfe;
  border: 1px solid #fce7f3;
  border-radius: 17px;
  word-break: break-word;
  font-size: 15px;
}

.list-item a {
  color: var(--primary2);
  text-decoration: none;
  font-weight: 700;
}

.stat, .big-result {
  font-size: 24px;
  font-weight: 900;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fdf2f8, #fff5f7);
  border: 1.5px solid var(--line);
  color: #db2777;
  word-break: break-all;
}

.otpbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #4a0429, #db2777);
  color: #fff;
  box-shadow: 0 10px 28px rgba(219, 39, 119, 0.25);
}

.otpbox small {
  display: block;
  opacity: .8;
  font-weight: 700;
}

.otpcode, .otpbox b {
  font-size: 28px;
  letter-spacing: .12em;
  font-weight: 950;
}

.otpbox button {
  border: 0;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 14px;
  width: 48px;
  height: 46px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.otpbox button:active {
  transform: scale(0.92);
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin: 8px 0;
  border: 1px solid #fce7f3;
  border-radius: 17px;
  background: #fffbfe;
  font-weight: 750;
}

.switch input {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #ec4899;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 22px));
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(251, 207, 232, 0.9);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(236, 72, 153, 0.16);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  padding: 7px;
  z-index: 100;
}

.bottom-nav a {
  text-decoration: none;
  color: #9d4c73;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 18px;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.15s ease;
}

.bottom-nav b {
  font-size: 20px;
}

.bottom-nav a.on {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.32);
}

.bottom-nav a.on b, .bottom-nav a.on span {
  color: #ffffff !important;
}

/* Toast Floating Notification */
.toast {
  position: fixed !important;
  left: 50% !important;
  bottom: 96px !important;
  transform: translateX(-50%) translateY(0) !important;
  background: #3b0724 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  padding: 13px 24px !important;
  border-radius: 9999px !important;
  box-shadow: 0 14px 35px rgba(219, 39, 119, 0.32), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  font-family: var(--font-family) !important;
  font-size: 14.5px !important;
  font-weight: 750 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  pointer-events: none !important;
  animation: toastFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  max-width: calc(100vw - 32px) !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
}

.toast.toast-hide {
  animation: toastFadeOut 0.22s forwards cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.toast.toast-warn {
  background: #b43403 !important;
  box-shadow: 0 12px 30px rgba(180, 52, 3, 0.35) !important;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.94); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes toastFadeOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.94); }
}

/* Button Copied State Animation ("hiện lên chữ") */
.btn-copied,
.mini-copy.btn-copied,
.input-copy.btn-copied,
.row-copy.btn-copied,
.copy-row button.btn-copied {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  animation: popIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes popIn {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.notice {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #fce7f3;
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.05);
  font-weight: 700;
  color: #3b0724;
}

.notice.ok {
  background: #fdf2f8;
  border: 1.5px solid #fbcfe8;
  color: #9d174d;
}

.notice.warn {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #92400e;
}

.mini-copy, .input-copy, .row-copy {
  height: 46px;
  border: 1px solid var(--soft-border) !important;
  border-radius: 14px !important;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  background: var(--soft) !important;
  color: #db2777 !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-copy:active, .input-copy:active, .row-copy:active {
  transform: scale(0.92);
  background: #fce7f3 !important;
}

.input-clear {
  height: 44px;
  border: 1px solid #ffd2dc !important;
  border-radius: 14px !important;
  background: #fff0f3 !important;
  color: #f03a5e !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.input-paste {
  height: 44px;
  border: 1px solid #fbcfe8 !important;
  border-radius: 14px !important;
  background: #fdf2f8 !important;
  color: #ec4899 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.input-clear:active, .input-paste:active {
  transform: scale(0.92);
}

.input-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.input-action-row input {
  flex: 1 1 0;
  min-width: 0;
}

.input-action-row .input-paste,
.input-action-row .input-copy,
.input-action-row .input-clear,
.quick-copy-row .input-copy {
  box-sizing: border-box;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}

.quick-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-copy-row input {
  flex: 1 1 0;
  min-width: 0;
}

@media(min-width: 620px) {
  .btn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero h1 {
    font-size: 36px;
  }
  .quick-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media(max-width: 420px) {
  body {
    padding-left: 8px;
    padding-right: 8px;
  }
  .hero {
    padding: 18px 16px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .card {
    padding: 15px;
    border-radius: 20px;
  }
}
