body {
  font-family: Arial, sans-serif;
  background: transparent;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* Scale wrapper để tính toán scale theo viewport width */
.scale-container {
  transform-origin: center top; /* Center origin để không bị lệch */
  width: 750px; /* Base width */
  display: flex;
  justify-content: center;
}

.main-container {
  width: 750px; /* Fixed base width */
  background: white;
  overflow: hidden;
  padding: 25px;
  position: relative;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* TICKET SECTION */
.ticket-section {
  border: 2px solid #ddd;
  margin: 20px;
  display: flex;
  background: white;
  height: 300px; /* Fixed height */
}

.ticket-left {
  writing-mode: vertical-rl;
  padding: 12px;
  font-size: 10px;
  color: #667;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  width: 50px; /* Fixed width */
  flex-shrink: 0;
}

.event-logo {
  margin-top: 10px;
  width: 35px;
  height: 35px; /* Fixed height */
  transform: rotate(90deg);
  flex-shrink: 0;
}

.ticket-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ticket-banner {
  object-fit: fill;
  width: 100%;
  height: 100%;
}

.ticket-right {
  padding: 12px;
  font-size: 10px;
  color: #667;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px; /* Fixed width */
  flex-shrink: 0;
}

#qrcode-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 85px;
  padding: 10px 2px 10px 10px;
}

#barcode {
  width: 60px;
  height: 150px; /* Fixed height */
}

#qrcode {
  margin-top: 8px;
  width: 85px;
  height: 85px;
}

.side-text {
  writing-mode: vertical-rl;
  rotate: 180deg;
  text-orientation: mixed;
}

/* CONTENT SECTION */
.content-section {
  padding: 30px;
  background: white;
  border: 2px solid #ddd;
  margin: 20px;
  margin-top: 30px;
}

.success-message {
  color: #333;
  padding-bottom: 20px;
}

.content-box {
  border-top: 2px solid #ddd;
}

.terms-list {
  padding: 0;
}

.section-title {
  color: #333;
  margin-bottom: 15px;
  margin-top: 20px;
}

.terms-list {
  list-style: none;
  margin-bottom: 20px;
}

.terms-list li {
  color: #3b3b3b;
  margin-bottom: 10px;
  padding-left: 15px;
  position: relative;
  font-size: 13px;
  line-height: 1.5;
}

.terms-list li:before {
  content: "-";
  position: absolute;
  left: 0;
}

.terms-list li a {
  color: #4caf50;
  text-decoration: none;
}

.contact-section {
  border-top: 2px solid #ddd;
  margin-top: 20px;
}

.contact-section p {
  color: #3b3b3b;
  margin-bottom: 8px;
  font-size: 13px;
}

.contact-section a {
  color: #4caf50;
  text-decoration: none;
}

.organizer-section {
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  position: relative;
}

.organizer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.organizer-text {
  text-align: right;
  flex: 1;
  margin-right: 20px;
}

.organizer-question {
  color: #3b3b3b;
  margin-bottom: 5px;
}

.organizer-text p {
  color: #3b3b3b;
  font-size: 13px;
  margin-bottom: 5px;
}

.organizer-text a {
  color: #4caf50;
  text-decoration: none;
  font-size: 13px;
}

.ticketbox-logo-footer {
  object-fit: cover;
  width: 100px;
  height: auto;
}

/* JavaScript sẽ tính toán scale factor dựa trên viewport width */