*,
::before,
::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x: ;
  --tw-pan-y: ;
  --tw-pinch-zoom: ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position: ;
  --tw-gradient-via-position: ;
  --tw-gradient-to-position: ;
  --tw-ordinal: ;
  --tw-slashed-zero: ;
  --tw-numeric-figure: ;
  --tw-numeric-spacing: ;
  --tw-numeric-fraction: ;
  --tw-ring-inset: ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur: ;
  --tw-brightness: ;
  --tw-contrast: ;
  --tw-grayscale: ;
  --tw-hue-rotate: ;
  --tw-invert: ;
  --tw-saturate: ;
  --tw-sepia: ;
  --tw-drop-shadow: ;
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
  --tw-contain-size: ;
  --tw-contain-layout: ;
  --tw-contain-paint: ;
  --tw-contain-style: ;
}
::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x: ;
  --tw-pan-y: ;
  --tw-pinch-zoom: ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position: ;
  --tw-gradient-via-position: ;
  --tw-gradient-to-position: ;
  --tw-ordinal: ;
  --tw-slashed-zero: ;
  --tw-numeric-figure: ;
  --tw-numeric-spacing: ;
  --tw-numeric-fraction: ;
  --tw-ring-inset: ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur: ;
  --tw-brightness: ;
  --tw-contrast: ;
  --tw-grayscale: ;
  --tw-hue-rotate: ;
  --tw-invert: ;
  --tw-saturate: ;
  --tw-sepia: ;
  --tw-drop-shadow: ;
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
  --tw-contain-size: ;
  --tw-contain-layout: ;
  --tw-contain-paint: ;
  --tw-contain-style: ;
} /* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */
*,
::after,
::before {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}
::after,
::before {
  --tw-content: "";
}
:host,
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  line-height: inherit;
}
hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}
abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
a {
  color: inherit;
  text-decoration: inherit;
}
b,
strong {
  font-weight: bolder;
}
code,
kbd,
pre,
samp {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
button,
select {
  text-transform: none;
}
button,
input:where([type="button"]),
input:where([type="reset"]),
input:where([type="submit"]) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}
:-moz-focusring {
  outline: auto;
}
:-moz-ui-invalid {
  box-shadow: none;
}
progress {
  vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}
::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}
summary {
  display: list-item;
}
blockquote,
dd,
dl,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
pre {
  margin: 0;
}
fieldset {
  margin: 0;
  padding: 0;
}
legend {
  padding: 0;
}
menu,
ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
dialog {
  padding: 0;
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: #9ca3af;
}
[role="button"],
button {
  cursor: pointer;
}
:disabled {
  cursor: default;
}
audio,
canvas,
embed,
iframe,
img,
object,
svg,
video {
  display: block;
  vertical-align: middle;
}
img,
video {
  max-width: 100%;
  height: auto;
}
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.flex {
  display: flex;
}
.h-full {
  height: 100%;
}
.w-\[350px\] {
  width: 350px;
}
.w-full {
  width: 100%;
}
.max-w-\[1200px\] {
  max-width: 1200px;
}
.max-w-\[350px\] {
  max-width: 350px;
}
.flex-col {
  flex-direction: column;
}
.justify-center {
  justify-content: center;
}
.gap-\[20px\] {
  gap: 20px;
}
.p-2 {
  padding: 0.5rem;
}
.pt-\[20px\] {
  padding-top: 20px;
}
.text-center {
  text-align: center;
}
@media (min-width: 640px) {
  .sm\:w-\[800px\] {
    width: 800px;
  }
  .sm\:max-w-\[800px\] {
    max-width: 800px;
  }
  .sm\:flex-row {
    flex-direction: row;
  }
  .sm\:gap-\[50px\] {
    gap: 50px;
  }
  .sm\:pt-\[30px\] {
    padding-top: 30px;
  }
}

@font-face {
  font-family: "UTM Swiss";
  src:
    local("UTM Swiss"),
    url("../assets/fonts/UTM Swiss.ttf") format("truetype");
}

@font-face {
  font-family: "yellowtail";
  src:
    local("LNTH Yellowtail"),
    url(../assets/fonts/lnth-yellowtail.TTF) format("truetype");
}

@font-face {
  font-family: "SVN-Anastasia";
  src:
    local("SVN Anastasia"),
    url(../assets/fonts/SVN-ANASTASIA.TTF) format("truetype");
}

@font-face {
  font-family: "UTM American Sans";
  src:
    local("UTM American Sans"),
    url("../assets/fonts/UTM American Sans.ttf") format("truetype");
}

@font-face {
  font-family: "SVN Product Sans";
  src:
    local("SVN Product Sans"),
    url("../assets/fonts/SVN-Product Sans Regular.otf") format("opentype");
}

/* Gỡ background khỏi .main-wrapper */
.main-wrapper {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  justify-content: center;
}

/* Gán background cho toàn trang */
body {
  margin: 0 auto;
  line-height: inherit;
  background: url("../assets/bg-login.jpg") no-repeat center center/cover;
  background-size: cover;
  background-attachment: fixed; /* background không cuộn theo nội dung */
}

#frame-wrapper {
  transform-origin: top left; /* giữ scale từ top-left */
  /* loại bỏ width cố định, để JS scale */
}

.bg-pinkred {
  --tw-bg-opacity: 1;
  background-color: rgb(0 145 202 / var(--tw-bg-opacity));
  justify-content: center; /* căn giữa theo chiều ngang */
}

.frame-wrapper {
  position: relative;
  height: fit-content;
}

.frame-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.image-choosen {
  width: 151px;
  height: 151px;
  position: absolute;
  left: 76px;
  top: 141px;
  z-index: -1;
}

.name {
  position: absolute;
  left: 60px;
  bottom: 88px;
  width: 186px;
  height: 35px;
  text-align: center;
  vertical-align: middle;
  padding: 6px 2px;
  font-family: "SVN-Anastasia";
  font-size: 18px;
  color: #fff;
}

.title {
  position: absolute;
  text-align: center;
  left: 55px;
  bottom: 52px;
  width: 192px;
  height: 34px;
  vertical-align: middle;
  padding: 2px 10px;
  color: #030361;
  font-size: 10px;
  font-family: "SVN Product Sans";
}

.unit {
  position: absolute;
  left: 49px;
  bottom: 13px;
  width: 210px;
  height: 35px;
  text-align: center;
  vertical-align: middle;
  padding: 6px 2px;
  font-family: "SVN-Anastasia";
  font-size: 10.5px;
  color: #030361;
}

.message {
  position: absolute;
  left: 305px;
  bottom: 80px;
  width: 457px;
  height: 164px;
  font-family: "SVN Product Sans";
  font-size: 16px;
  line-height: 1.3;
  color: #fff;
  text-align: justify;
}

.name,
.title,
.unit,
.message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

.message {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

@media only screen and (max-width: 600px) {
  .image-choosen {
    width: 66px;
    height: 66px;
    left: 33px;
    top: 62px;
  }

  .name {
    left: 27px;
    bottom: 38px;
    width: 80px;
    height: 16px;
    font-size: 8px;
    padding: 3px 2px;
  }

  .title {
    left: 23px;
    bottom: 22px;
    width: 85px;
    height: 15px;
    font-size: 4px;
    padding: 1px 2px;
  }

  .unit {
    left: 18px;
    bottom: 4.5px;
    width: 100px;
    height: 16px;
    font-size: 4.5px;
    padding: 3px 2px;
  }

  .message {
    left: 133px;
    bottom: 26px;
    width: 200px;
    height: 80px;
    font-size: 7px;
  }
}

/* ==== Modern, Minimal & Subtle Scrollbar ==== */

/* Toàn bộ scrollbar */
::-webkit-scrollbar {
  width: 8px; /* Chiều rộng scrollbar dọc */
  height: 8px; /* Chiều cao scrollbar ngang */
  background: transparent; /* Nền trong suốt */
}

/* Track (nền của scrollbar) */
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05); /* Mờ nhẹ, nhìn subtle */
  border-radius: 8px;
}

/* Thumb (phần kéo được) */
::-webkit-scrollbar-thumb {
  background-color: rgb(0, 145, 202); /* Màu xanh mờ, dịu mắt */
  border-radius: 8px;
  transition:
    background-color 0.3s ease,
    opacity 0.3s ease;
}

/* Thumb hover */
::-webkit-scrollbar-thumb:hover {
  background-color: #0091ca99; /* Đậm hơn khi hover */
}

/* Ẩn mũi tên trên scrollbar */
::-webkit-scrollbar-button {
  display: none;
}

.button-wrapper {
  display: flex;
  justify-content: center; /* căn giữa theo ngang */
  gap: 10px; /* khoảng cách giữa 2 nút */
  width: 100%;
  max-width: 400px; /* giống width input search */
  margin: 20px auto 0 auto; /* căn giữa toàn bộ */
  padding: 0 10px; /* khoảng cách 2 bên */
  flex-wrap: nowrap; /* luôn trên cùng 1 hàng */
  box-sizing: border-box;
}

.button-wrapper button {
  flex: 1; /* mỗi nút chiếm 50% */
  padding: 10px 20px; /* giống nút tìm kiếm */
  font-size: 16px;
  font-family: "SVN Product Sans", sans-serif;
  border-radius: 50px; /* bo tròn hoàn toàn */
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  white-space: nowrap; /* không xuống hàng */
}

/* Màu nền riêng cho từng nút */
#download-btn {
  background-color: #00a2e2;
  color: #fff;
}

#download-btn:hover {
  background-color: #0093d2;
  transform: translateY(-1px);
}

#copy-link-btn {
  background-color: #e0e0e0;
  color: #000;
}

#copy-link-btn:hover {
  background-color: #c7c7c7;
  transform: translateY(-1px);
}

/* Responsive trên điện thoại */
@media (max-width: 600px) {
  .button-wrapper {
    gap: 8px;
    max-width: 100%;
  }

  .button-wrapper button {
    font-size: 14px;
    padding: 10px 15px;
  }
}

.search-wrapper {
  width: 100%;
  max-width: 1200px; /* giống main-wrapper */
  display: flex;
  justify-content: center; /* căn giữa theo ngang */
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* responsive nếu màn hình quá nhỏ */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 0 10px; /* khoảng cách 2 bên */
}

/* Input tìm kiếm */
.search-wrapper input#search-code {
  flex: 1; /* chiếm phần lớn */
  min-width: 150px; /* không quá nhỏ */
  max-width: 400px; /* không quá rộng */
  padding: 10px 20px;
  font-family: "SVN Product Sans", sans-serif;
  font-size: 16px;
  border-radius: 50px; /* bo tròn hoàn toàn */
  border: 1px solid #ccc;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-wrapper input#search-code:focus {
  border-color: #00aeef;
  box-shadow: 0 0 5px rgba(0, 145, 202, 0.5);
}

/* Nút tìm kiếm */
.search-wrapper button#search-btn {
  padding: 10px 20px;
  font-size: 16px;
  font-family: "SVN Product Sans", sans-serif;
  background-color: #00a2e2;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 50px;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  white-space: nowrap; /* không xuống hàng */
}

.search-wrapper button#search-btn:hover {
  background-color: #0088c2;
  border-color: #fff;
  transform: translateY(-1px);
}

/* ===== Responsive Mobile ===== */
@media (max-width: 600px) {
  .search-wrapper {
    width: 100%; /* chiếm hết chiều ngang */
    max-width: 400px; /* không quá rộng */
    justify-content: center; /* căn giữa */
    gap: 8px;
    padding: 0 10px; /* khoảng cách 2 bên */
    margin: 0 auto; /* căn giữa toàn bộ wrapper */
    flex-wrap: nowrap; /* luôn cùng hàng */
  }

  .search-wrapper input#search-code,
  .search-wrapper button#search-btn {
    flex: none; /* không kéo dài quá mức */
    width: auto; /* theo nội dung */
    font-size: 14px;
    padding: 10px 15px;
  }
}

#toast {
  position: fixed;
  top: 20px; /* trên cùng */
  left: 50%; /* căn giữa */
  transform: translateX(-50%);
  padding: 10px 24px;
  font-family: "SVN Product Sans", sans-serif;
  font-size: 14px;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  border-radius: 20px; /* tròn hai đầu */
  transition:
    opacity 0.3s,
    transform 0.3s;
  font-weight: 500;
  display: flex;
  justify-content: center; /* căn ngang */
  align-items: center; /* căn dọc */
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0); /* slide xuống nếu muốn */
}

#toast.success {
  background-color: #28a745; /* xanh lá */
}

#toast.error {
  background-color: #dc3545; /* đỏ */
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* nền mờ */
  display: none; /* mặc định ẩn */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #0015ff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
