/* ── HERO ── */
.hero {
  text-align: center;
  padding: 5.5rem 5% 4.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.8rem;
  animation: fadeUp 0.6s ease both;
}

.badge .dot {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}

.hero h1 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 .yellow {
  color: var(--yellow);
}

.hero .sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 2.2rem;
  font-weight: 300;
  animation: fadeUp 0.6s 0.2s ease both;
}

/* ── CONVERTER BOX ── */
.converter-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 1.8rem 2rem 2rem;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeUp 0.6s 0.3s ease both;
  text-align: left;
}

.converter-box label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.6rem;
}

.input-row {
  display: flex;
  gap: 0.6rem;
}

.input-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.link-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0.8rem 4.6rem 0.8rem 1.1rem;
  color: #1A0A05;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.btn-paste {
  position: absolute;
  right: 8px;
  background: rgba(238, 77, 45, 0.08);
  color: var(--orange);
  border: 1px solid rgba(238, 77, 45, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
}

.btn-paste:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.btn-paste:active {
  transform: scale(0.95);
}

.link-input::placeholder {
  color: rgba(60, 20, 10, 0.38);
}

.link-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.2);
}

.link-input.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}

.btn-convert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--yellow);
  color: #1A0A05;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
  flex-shrink: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.btn-convert:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.5);
  background: #F7BC40;
}

.btn-convert:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 0.85rem;
  margin-top: 1rem;
}

.auth-copy {
  min-width: 0;
}

.auth-title {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.18rem;
}

.auth-status {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-auth {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #fff;
  color: var(--orange);
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.62rem 0.85rem;
  transition: transform 0.18s, opacity 0.18s;
  white-space: nowrap;
}

.btn-auth.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-auth:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 10, 5, 0.3);
  border-top-color: #1A0A05;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── RESULT BOX ── */
.result-box {
  display: none;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  color: #1A0A05;
  text-align: left;
}

.result-box.show {
  display: block;
  animation: fadeUp 0.35s ease both;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-open-shopee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, var(--orange) 0%, #FF6B35 100%);
  color: #fff;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 18px rgba(238, 77, 45, 0.45);
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
}

.btn-open-shopee:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(238, 77, 45, 0.55);
}

.btn-open-shopee .shop-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.result-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.7rem;
}

.result-divider::before,
.result-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.result-divider span {
  font-size: 0.72rem;
  color: #999;
  white-space: nowrap;
}

.result-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-link {
  flex: 1;
  font-size: 0.75rem;
  color: #888;
  word-break: break-all;
  line-height: 1.4;
  font-family: monospace;
  background: #F9F9F9;
  padding: 0.45rem 0.7rem;
  border-radius: 7px;
  border: 1px solid #eee;
  min-width: 0;
}

.btn-copy {
  background: #F0F0F0;
  color: #333;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, transform 0.18s;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  flex-shrink: 0;
}

.btn-copy:hover {
  background: #E0E0E0;
  transform: translateY(-1px);
}

.btn-copy.copied {
  background: #dcfce7;
  color: #166534;
}

.result-note {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #F0F0F0;
  line-height: 1.5;
}

.history-panel {
  display: block;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.history-title {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
}

.history-refresh {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
}

.history-list {
  display: grid;
  gap: 0.7rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.history-empty {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  line-height: 1.45;
}

.history-item {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 226, 238, 0.9);
  border-radius: 10px;
  color: #1A0A05;
  padding: 0.85rem;
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: #777;
  font-size: 0.72rem;
  margin-bottom: 0.4rem;
}

.history-subid {
  color: var(--orange);
  font-family: monospace;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.history-link {
  display: block;
  color: #444;
  font-family: monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.history-product {
  display: flex;
  gap: 0.75rem;
}

.history-product-img {
  border-radius: 8px;
  flex: 0 0 54px;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.history-product-img-fallback {
  align-items: center;
  background: #ffe8dc;
  color: var(--orange);
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
}

.history-product-main {
  flex: 1;
  min-width: 0;
}

.history-product-top {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.history-product-name {
  color: #334155;
  display: -webkit-box;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-short-url {
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.history-action {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  min-height: 34px;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.history-copy {
  background: #ff711f;
  box-shadow: 0 2px 6px rgba(255, 113, 31, 0.22);
  color: #fff;
}

.history-copy.copied {
  background: #16a34a;
}

.history-buy {
  background: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
  color: #fff;
}

.history-commission {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
}

.history-commission-text {
  color: #ea580c;
  font-size: 0.88rem;
  font-weight: 800;
}

.history-rate {
  background: #dcfce7;
  border-radius: 7px;
  color: #15803d;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
}

.history-orders-empty {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
}

.history-orders {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
}

.history-order {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem;
}

.history-order-head {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.history-order-id {
  color: #334155;
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.history-order-status {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.2rem 0.45rem;
}

.history-order-status.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.history-order-status.is-approved {
  background: #dbeafe;
  color: #1d4ed8;
}

.history-order-status.is-paid {
  background: #dcfce7;
  color: #15803d;
}

.history-order-status.is-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.history-order-name {
  color: #475569;
  display: -webkit-box;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-order-grid {
  color: #64748b;
  display: grid;
  font-size: 0.72rem;
  gap: 0.25rem 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  line-height: 1.35;
  margin-top: 0.45rem;
}

.config-warning {
  display: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.45;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.8rem;
}

.config-warning.show {
  display: block;
}

.error-msg {
  display: none;
  color: #FECDD3;
  font-size: 0.82rem;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 100, 100, 0.3);
}

.error-msg.show {
  display: block;
  animation: fadeUp 0.3s ease both;
}

/* ── STAT ROW ── */
.hero-stat-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeUp 0.6s 0.45s ease both;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--yellow);
}

.hero-stat span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── CONVERTER TABS ── */
.converter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 0.75rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tab contents */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
