body {
  min-height: 100vh;
  padding-top: 60px;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.main-container {
  width: min(360px, calc(100% - 30px));
  margin: 30px auto;
  padding: 40px 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.content-container {
  width: min(760px, calc(100% - 30px));
  margin: 30px auto;
  padding: 34px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.action-entry {
  position: relative;
}

.action-entry.with-language {
  padding-top: 30px;
}

.action-btn,
.submit-btn,
.line-btn,
.option-card {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #2e8b8b;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover,
.submit-btn:hover,
.line-btn:hover,
.option-card:hover,
.option-card.active {
  transform: translateY(-2px);
  background: #2e8b8b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(46, 139, 139, 0.25);
}

.lang-switcher {
  position: absolute;
  top: -28px;
  left: 25%;
  transform: translateX(-50%);
  z-index: 5;
  width: 152px;
}

.lang-current,
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid rgba(46, 139, 139, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
  color: #355454;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(46, 139, 139, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lang-current:hover,
.lang-option:hover,
.lang-option.active {
  color: #2e8b8b;
  border-color: rgba(46, 139, 139, 0.42);
  box-shadow: 0 14px 28px rgba(46, 139, 139, 0.18);
  transform: translateY(-1px);
}

.lang-flag-wrap,
.lang-option-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-option-main {
  justify-content: flex-start;
}

.lang-current [data-lang-current-label],
.lang-option span:last-child {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.lang-flag-circle {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7f7 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 4px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.lang-flag-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lang-caret {
  font-size: 11px;
  color: #5d7b7b;
}

.lang-menu {
  display: none;
  margin-top: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(46, 139, 139, 0.12);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
}

.lang-switcher.open .lang-menu {
  display: grid;
  gap: 8px;
}

.main-title,
.page-title {
  margin: 0 0 12px;
  text-align: center;
}

.title-line {
  display: block;
  color: #2e8b8b;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1px;
}

.page-title {
  color: #2e8b8b;
  font-size: 28px;
  font-weight: 700;
}

.page-subtitle,
.english-subtitle {
  margin: 0 0 25px;
  color: #888;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  font-weight: 500;
}

.description {
  margin-bottom: 25px;
}

.description p {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.9;
  text-align: justify;
  text-indent: 2em;
}

.download-section {
  margin-bottom: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  text-align: center;
}

.download-tip,
.footer p {
  margin: 0 0 15px;
  color: #666;
  font-size: 12px;
}

.app-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.app-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f5f5f5;
  color: #555;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-icon:hover {
  transform: scale(1.08);
  background: #2e8b8b;
  color: #fff;
}

.footer {
  padding-top: 10px;
  text-align: center;
}

.help-link {
  color: #2e8b8b;
  font-weight: 500;
  text-decoration: none;
}

.help-link:hover {
  color: #1f6b6b;
  text-decoration: underline;
}

.line-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.line-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fafafa;
}

.line-name {
  color: #2e8b8b;
  font-weight: 700;
}

.line-url {
  margin-top: 6px;
  color: #666;
  font-size: 13px;
  word-break: break-all;
}

.line-card .line-btn {
  width: 112px;
}

.line-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-latency {
  min-width: 74px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
}

.line-latency.fast {
  color: #2ea44f;
}

.line-latency.medium {
  color: #d4a017;
}

.line-latency.slow {
  color: #d14343;
}

.line-latency.testing {
  color: #888;
}

.line-empty {
  padding: 18px 16px;
  border: 1px dashed #ddd;
  border-radius: 6px;
  color: #888;
  font-size: 13px;
  text-align: center;
  background: #fafafa;
}

.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  color: #555;
  font-size: 14px;
  font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  color: #333;
  background: #fff;
}

.form-row textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #2e8b8b;
  box-shadow: 0 0 0 3px rgba(46, 139, 139, 0.12);
}

.hint {
  margin: 18px 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.success-box,
.error-box,
.info-box {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.7;
}

.success-box {
  border: 1px solid #b7dfd8;
  background: #edf9f6;
  color: #1f6b6b;
}

.error-box {
  border: 1px solid #f0c7c7;
  background: #fff5f5;
  color: #b34848;
}

.info-box {
  display: block;
  border: 1px solid #e8e8e8;
  background: #fafafa;
  color: #666;
}

.progress-bar {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
}

.step {
  text-align: center;
  color: #999;
  font-size: 13px;
}

.step-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e9e9e9;
  color: #777;
  font-weight: 700;
}

.step.active {
  color: #2e8b8b;
  font-weight: 700;
}

.step.active .step-icon {
  background: #2e8b8b;
  color: #fff;
}

.step-line {
  height: 1px;
  background: #ddd;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.option-card {
  padding: 18px 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
}

.option-card small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: inherit;
  opacity: 0.8;
}

.inline-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.inline-actions .submit-btn,
.inline-actions .line-btn {
  flex: 1;
}

.success-hero {
  margin-bottom: 24px;
  padding: 24px 22px;
  border: 1px solid #e8f1ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fcfb 0%, #ffffff 100%);
  text-align: center;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(46, 139, 139, 0.12);
  color: #2e8b8b;
  font-size: 13px;
  font-weight: 700;
}

.success-title {
  margin: 0 0 10px;
  color: #2e8b8b;
  font-size: 30px;
  font-weight: 700;
}

.success-subtitle {
  margin: 0;
  color: #6c7a7a;
  font-size: 14px;
  line-height: 1.9;
}

.summary-panel {
  padding: 22px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
}

.summary-title {
  margin: 0 0 16px;
  color: #2e8b8b;
  font-size: 20px;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  gap: 12px;
}

.summary-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e5e5e5;
  font-size: 14px;
}

.summary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.summary-label {
  color: #777;
  font-weight: 700;
}

.summary-value {
  color: #333;
  word-break: break-all;
}

.success-notes {
  margin-top: 18px;
}

.success-notes ul {
  margin: 0;
  padding-left: 18px;
}

.success-notes li {
  margin-bottom: 8px;
}

.success-notes li:last-child {
  margin-bottom: 0;
}

.popup-mask {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}

.popup-mask.show {
  display: flex;
}

.popup-card {
  width: min(420px, 100%);
  padding: 26px 22px 22px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.popup-title {
  margin: 0 0 14px;
  color: #2e8b8b;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.popup-message {
  margin: 0 0 16px;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

.popup-detail {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #ececec;
  border-radius: 6px;
  background: #fafafa;
}

.popup-detail-row {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #e2e2e2;
  font-size: 14px;
  line-height: 1.8;
}

.popup-detail-row:last-child {
  border-bottom: 0;
}

.popup-label {
  flex: 0 0 72px;
  color: #666;
  font-weight: 700;
}

.popup-value {
  flex: 1;
  color: #333;
  word-break: break-all;
}

.popup-tips {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #666;
  font-size: 13px;
  line-height: 1.9;
}

.popup-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.popup-actions .line-btn,
.popup-actions .submit-btn {
  flex: 1;
}

@media (max-width: 560px) {
  .main-container {
    width: calc(100% - 30px);
    margin: 15px auto;
    padding: 30px 20px;
  }

  .content-container {
    width: calc(100% - 30px);
    margin: 15px auto;
    padding: 26px 20px;
  }

  .lang-switcher {
    width: 148px;
  }

  .title-line {
    font-size: 22px;
  }

  .page-title,
  .success-title {
    font-size: 24px;
  }

  .description p {
    font-size: 13px;
  }

  .line-card {
    grid-template-columns: 1fr;
  }

  .line-actions {
    justify-content: space-between;
  }

  .line-latency {
    min-width: auto;
    text-align: left;
  }

  .line-card .line-btn {
    width: 112px;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .progress-bar {
    grid-template-columns: 1fr;
  }

  .step-line {
    display: none;
  }

  .inline-actions,
  .popup-actions {
    flex-direction: column;
  }

  .popup-card {
    padding: 22px 18px 18px;
  }

  .popup-detail-row,
  .summary-item {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 2px;
  }

  .popup-label {
    flex-basis: auto;
  }
}

.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(46, 139, 139, 0.1);
  color: #2e8b8b;
  font-weight: 600;
}

.deposit-hero {
  margin-bottom: 24px;
}

.success-hero-strong {
  background: linear-gradient(180deg, rgba(46, 139, 139, 0.08), rgba(46, 139, 139, 0.03));
}

.deposit-order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 20px;
  margin-bottom: 22px;
}

.deposit-summary-panel,
.deposit-qr-panel {
  height: 100%;
}

.deposit-order-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.deposit-order-actions .line-btn,
.deposit-order-actions .submit-btn {
  flex: 1;
}

.deposit-qr-wrap {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(46, 139, 139, 0.18);
  border-radius: 20px;
  background: #f9fcfc;
  padding: 18px;
}

.deposit-qr-wrap img {
  max-width: 100%;
  width: 240px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.deposit-qr-empty {
  color: #7a8b8b;
  font-size: 14px;
  text-align: center;
}

.disabled {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 768px) {
  .deposit-order-grid {
    grid-template-columns: 1fr;
  }

  .deposit-order-actions {
    flex-direction: column;
  }
}
