/* Ad System Styles - Scoped to ad-buy-page container to avoid theme conflicts */

/* ========== Ad Buy Page Layout ========== */
.ad-buy-page {
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333;
  line-height: 1.6;
}

.ad-buy-page .container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 25px 15px;
  box-sizing: border-box;
}

/* ========== Header ========== */
.ad-buy-header {
  text-align: center;
  margin: 20px 0 30px;
}
.ad-buy-header h1 {
  color: #ff7f00;
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
}
.ad-buy-header .subtitle {
  color: #888;
  margin: 0;
  font-size: 15px;
}

/* ========== Step Indicator ========== */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 8px;
}
.step-indicator .step {
  padding: 8px 22px;
  border-radius: 20px;
  background: #f0f0f0;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}
.step-indicator .step.active {
  background: linear-gradient(135deg, #ff7f00 0%, #ff9f43 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.3);
}
.step-indicator .step-arrow {
  color: #ccc;
  font-size: 16px;
}

/* ========== Card Components ========== */
.ad-buy-page .card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
  overflow: hidden;
}
.ad-buy-page .card-head {
  font-size: 16px;
  font-weight: 600;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  background: #fafafa;
}
.ad-buy-page .card-head i {
  margin-right: 8px;
  color: #ff7f00;
}
.ad-buy-page .card-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

/* ========== Position Blocks ========== */
.position-block {
  margin-bottom: 35px;
}
.position-block:last-child {
  margin-bottom: 0;
}
.position-title {
  display: flex;
  align-items: center;
  margin: 0 0 5px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}
.position-title i {
  margin-right: 10px;
  color: #ff7f00;
}
.position-desc {
  color: #888;
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* ========== Plan Cards Grid ========== */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.plan-card {
  background: #fff;
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #eee;
  transition: background 0.3s;
}
.plan-card:hover {
  border-color: #ffcc80;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(255, 127, 0, 0.15);
}
.plan-card:hover::before {
  background: #ffcc80;
}
.plan-card.selected {
  border-color: #ff7f00;
  background: linear-gradient(135deg, #fff 0%, #fff7e6 100%);
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.25);
}
.plan-card.selected::before {
  background: linear-gradient(90deg, #ff7f00 0%, #ff9f43 100%);
}

.plan-card .plan-name {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}
.plan-card .plan-price {
  color: #ff7f00;
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0;
}
.plan-card .plan-price .currency {
  font-size: 16px;
  margin-right: 2px;
}
.plan-card .plan-duration {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.plan-card .plan-time-range {
  color: #ff7f00;
  font-size: 12px;
  font-weight: 500;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 8px;
  text-align: center;
}
.plan-card .plan-desc {
  color: #999;
  font-size: 12px;
  margin: 10px 0 15px;
  line-height: 1.5;
  min-height: 36px;
}
.plan-card .btn-select-plan {
  background: linear-gradient(135deg, #ff7f00 0%, #ff9f43 100%);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(255, 127, 0, 0.3);
}
.plan-card .btn-select-plan:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.4);
}
.plan-card.selected .btn-select-plan {
  background: linear-gradient(135deg, #333 0%, #555 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========== Form Styles ========== */
.ad-buy-page .form-group {
  margin-bottom: 20px;
}
.ad-buy-page .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 14px;
}
.ad-buy-page .form-group .required {
  color: #ff4d4f;
  margin-left: 3px;
}
.ad-buy-page input[type="text"],
.ad-buy-page input[type="url"],
.ad-buy-page input[type="date"],
.ad-buy-page input[type="email"],
.ad-buy-page input[type="password"],
.ad-buy-page textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fafafa;
  transition: all 0.3s;
  font-family: inherit;
}
.ad-buy-page input:focus,
.ad-buy-page textarea:focus {
  border-color: #ff7f00;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}
.ad-buy-page .form-hint {
  color: #999;
  font-size: 12px;
  margin: 6px 0 0;
}
.ad-buy-page .form-actions {
  margin-top: 25px;
  text-align: right;
}
.ad-buy-page .btn-submit-order {
  padding: 12px 35px;
  background: linear-gradient(135deg, #ff7f00 0%, #ff9f43 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 127, 0, 0.3);
}
.ad-buy-page .btn-submit-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.4);
}

/* ========== Alert / Badge ========== */
.alert {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}
.alert-danger {
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
}
.alert-success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}
.badge-warning {
  background: #fffbe6;
  color: #faad14;
  border: 1px solid #ffe58f;
}
.badge-secondary {
  background: #f5f5f5;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
}
.badge-danger {
  background: #fff1f0;
  color: #ff4d4f;
  border: 1px solid #ffa39e;
}

/* ========== Table Styles ========== */
.ad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ad-table th,
.ad-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.ad-table th {
  background: #f8f8f8;
  color: #666;
  font-weight: 600;
  font-size: 13px;
}
.ad-table tr:hover td {
  background: #fafafa;
}
.ad-table .price {
  color: #ff7f00;
  font-weight: 700;
}
.ad-table .text-muted {
  color: #999;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  margin: 0;
  border-radius: 4px;
}
.table-scroll::-webkit-scrollbar {
  height: 6px;
}
.table-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 3px;
}
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}
.table-scroll > .ad-table {
  width: max-content;
  min-width: 100%;
  white-space: nowrap;
}
.empty-tip {
  text-align: center;
  color: #999;
  padding: 30px 20px;
  font-size: 14px;
}

/* ========== Buttons ========== */
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: #1890ff;
  color: #fff;
}
.btn-primary:hover {
  background: #40a9ff;
  color: #fff;
  text-decoration: none;
}

/* ========== User Active Ads ========== */
.ad-buy-page .user-active-card {
  background: linear-gradient(135deg, #ff7f00 0%, #ff9f43 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.25);
}
.ad-buy-page .user-active-card h3 {
  color: #fff;
  margin: 0 0 15px;
  font-size: 18px;
}
.ad-buy-page .user-active-card .ad-item {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
}
.ad-buy-page .user-active-card .ad-item:last-child {
  margin-bottom: 0;
}
.ad-buy-page .user-active-card .ad-link {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
}
.ad-buy-page .user-active-card .ad-link:hover {
  text-decoration: underline;
}
.ad-buy-page .user-active-card .ad-meta {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.95;
}
.ad-buy-page .user-active-card .ad-meta span {
  display: inline-flex;
  align-items: center;
}
.ad-buy-page .user-active-card .ad-meta i {
  margin-right: 4px;
}
.ad-buy-page .user-active-card .days-left {
  background: #fff;
  color: #ff7f00;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}

/* ========== Pay Page ========== */
.pay-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 15px;
}
.pay-card {
  background: #fff;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.pay-header {
  text-align: center;
  margin-bottom: 25px;
}
.pay-header h2 {
  color: #ff7f00;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.order-info {
  background: #fafafa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
}
.order-info h3 {
  margin: 0 0 15px;
  color: #333;
  font-size: 16px;
}
.info-table {
  width: 100%;
  border-collapse: collapse;
}
.info-table td {
  padding: 8px 10px;
  font-size: 14px;
  border-bottom: 1px dashed #eee;
}
.info-table td:first-child {
  color: #888;
  width: 120px;
  font-weight: 500;
}
.info-table tr:last-child td {
  border-bottom: none;
}
.info-table .order-no {
  font-family: monospace;
  color: #333;
  font-weight: 500;
}
.info-table tr.total td {
  font-weight: 700;
  font-size: 16px;
  padding-top: 12px;
}
.info-table .pay-amount {
  color: #ff7f00;
  font-size: 24px;
  font-weight: 700;
}

.pay-methods {
  margin-bottom: 25px;
}
.pay-methods h3 {
  margin: 0 0 15px;
  color: #333;
  font-size: 16px;
}
.method-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.method-option {
  flex: 1;
  min-width: 120px;
}
.method-option input {
  display: none;
}
.method-option .method-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
}
.method-option:hover .method-icon {
  border-color: #ffcc80;
}
.method-option input:checked + .method-icon {
  border-color: #ff7f00;
  background: #fff7e6;
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.15);
}
.method-icon i,
.method-icon svg {
  font-size: 32px;
  margin-bottom: 8px;
  color: #ff7f00;
  display: block;
}
.method-icon.alipay i,
.method-icon.alipay svg { color: #1677ff; fill: #1677ff; }
.method-icon.maqr i,
.method-icon.maqr svg { color: #faad14; }
.method-icon.yizhifu i,
.method-icon.yizhifu svg { color: #52c41a; }
.method-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

#pay-form {
  margin: 20px 0;
}
.btn-pay {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff7f00 0%, #ff9f43 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 127, 0, 0.3);
}
.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.4);
}
.pay-security {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin-top: 15px;
}

/* 专业支付二维码界面 */
.qr-payment-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 0;
  animation: slideUp 0.4s ease;
}

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

/* Hero区域 */
.qr-hero-section {
  text-align: center;
  margin-bottom: 20px;
}
.qr-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(22, 119, 255, 0.3);
}
.qr-hero-icon svg {
  width: 32px;
  height: 32px;
}
.qr-main-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 6px;
}
.qr-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* 金额显示 */
.qr-amount-display {
  text-align: center;
  margin: 20px 0 24px;
  padding: 20px;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-radius: 16px;
  border: 2px dashed #ff4d4f;
}
.amount-currency {
  font-size: 24px;
  font-weight: 600;
  color: #ff4d4f;
  vertical-align: top;
  margin-right: 4px;
}
.amount-value {
  font-size: 48px;
  font-weight: 800;
  color: #ff4d4f;
  line-height: 1;
  letter-spacing: -2px;
}
.amount-unit {
  font-size: 18px;
  font-weight: 500;
  color: #ff4d4f;
  margin-left: 8px;
}

/* 二维码容器 */
.qr-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.qr-frame {
  position: relative;
  padding: 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
}
.qr-frame::before,
.qr-frame::after,
.qr-frame > .qr-scan-line {
  display: none;
}
.qr-code-wrapper {
  position: relative;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 2px solid #f5f5f5;
}
.qr-code-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 240px;
  cursor: pointer;
  transition: transform 0.2s;
}
.qr-code-img:hover {
  transform: scale(1.02);
}
.qr-code-img canvas,
.qr-code-img img {
  display: block;
}
.qr-app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #666;
}
.qr-app-logo svg {
  width: 20px;
  height: 20px;
}

/* 倒计时区域 */
.qr-timer-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  padding: 14px 20px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #eee;
}
.timer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  color: #faad14;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(250, 173, 20, 0.2);
}
.timer-text {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timer-label {
  font-size: 13px;
  color: #666;
}
.timer-countdown {
  font-size: 20px;
  font-weight: 700;
  color: #faad14;
  font-family: 'Courier New', monospace;
  min-width: 60px;
}
.timer-hint {
  font-size: 12px;
  color: #999;
}

/* 支付指引 */
.qr-guide-section {
  margin: 20px 0;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}
.guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px;
}
.guide-title i {
  color: #1677ff;
}
.guide-steps {
  margin: 0;
  padding-left: 20px;
  color: #666;
}
.guide-steps li {
  font-size: 13px;
  line-height: 2;
}
.guide-steps li strong {
  color: #1677ff;
  font-weight: 600;
}

/* 安全提示 */
.qr-notice-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}
.notice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #666;
}
.notice-item i {
  color: #52c41a;
  width: 16px;
}
.notice-item:nth-child(2) i {
  color: #faad14;
}
.notice-item:nth-child(3) i {
  color: #faad14;
}

/* 操作按钮 */
.qr-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}
.btn-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-refresh {
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}
.btn-refresh:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}
.btn-cancel {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e8e8e8;
}
.btn-cancel:hover {
  background: #e8e8e8;
  color: #333;
}

/* 轮询状态 */
.qr-polling-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 10px;
  font-size: 13px;
  color: #52c41a;
  margin-top: 20px;
}
.polling-dot {
  width: 8px;
  height: 8px;
  background: #52c41a;
  border-radius: 50%;
  animation: polling 1.5s infinite;
}
@keyframes polling {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
.polling-success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #52c41a;
  font-weight: 600;
}

.ad-buy-page .time-preview {
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 5px;
}
.ad-buy-page .time-preview p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #555;
}
.ad-buy-page .time-preview i {
  color: #ff7f00;
  margin-right: 5px;
}
.ad-buy-page .time-preview .preview-detail {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #666;
  font-size: 13px;
}
.ad-buy-page .time-preview .time-item {
  display: inline-block;
  white-space: nowrap;
}
.ad-buy-page .time-preview .time-item strong {
  color: #333;
  margin-right: 4px;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .qr-payment-page {
    padding: 10px 0;
  }
  .amount-value {
    font-size: 40px;
  }
  .qr-code-img {
    width: 200px;
    height: 200px;
  }
  .qr-actions {
    flex-direction: column;
  }
  .btn-action {
    width: 100%;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 保留旧样式兼容 */
.qr-pay-section {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.3s ease;
}
.qr-pay-header {
  margin-bottom: 20px;
}
.qr-code-box {
  display: inline-block;
  padding: 24px;
  background: #fff;
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.qr-code-img img {
  display: block;
  margin: 0 auto;
}

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

.pay-success {
  text-align: center;
  padding: 20px 0;
}
.pay-success .success-icon {
  font-size: 64px;
  color: #52c41a;
  margin-bottom: 15px;
}
.pay-success h3 {
  color: #52c41a;
  margin: 10px 0 15px;
  font-size: 24px;
}
.pay-success p {
  color: #666;
  margin: 8px 0;
  font-size: 14px;
}
.pay-success .pay-time-info {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 15px auto;
  max-width: 320px;
  color: #389e0d;
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}
.pay-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 25px;
}
.btn-back {
  padding: 10px 22px;
  background: #f5f5f5;
  color: #666;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}
.btn-back:hover {
  background: #e0e0e0;
  color: #333;
  text-decoration: none;
}
.pay-pending {
  text-align: center;
  padding: 20px 0;
}
.pay-pending .pending-icon {
  font-size: 60px;
  color: #faad14;
  margin-bottom: 15px;
  animation: spin 2s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}
.pay-pending h3 {
  color: #faad14;
  margin: 10px 0 15px;
  font-size: 20px;
}

/* ========== Auth Pages ========== */
.auth-box {
  max-width: 440px;
  margin: 40px auto;
  background: #fff;
  border-radius: 12px;
  padding: 40px 35px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.auth-header {
  text-align: center;
  margin-bottom: 25px;
}
.auth-header h2 {
  color: #ff7f00;
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}
.auth-header p {
  color: #888;
  margin: 0;
  font-size: 14px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 25px;
}
.auth-tabs a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  color: #999;
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  text-decoration: none;
}
.auth-tabs a:hover {
  color: #ff7f00;
  text-decoration: none;
}
.auth-tabs a.active {
  color: #ff7f00;
  border-bottom-color: #ff7f00;
  font-weight: 600;
}
.auth-form .form-group {
  margin-bottom: 18px;
}
.auth-form label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 14px;
}
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fafafa;
  transition: all 0.3s;
}
.auth-form input:focus {
  border-color: #ff7f00;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}
.auth-form .btn-auth {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #ff7f00 0%, #ff9f43 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.3);
}
.auth-form .btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 127, 0, 0.4);
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}
.auth-footer p {
  color: #999;
  font-size: 13px;
  margin: 0;
}
.auth-footer a {
  color: #ff7f00;
  font-weight: 500;
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .ad-buy-page .container {
    padding: 15px 10px;
  }
  .ad-buy-header h1 {
    font-size: 24px;
  }
  .step-indicator {
    font-size: 12px;
  }
  .step-indicator .step {
    padding: 6px 14px;
    font-size: 12px;
  }
  .plan-cards {
    grid-template-columns: 1fr;
  }
  .method-options {
    flex-direction: column;
  }
  .ad-buy-page .card-body {
    padding: 15px;
  }
  .ad-buy-page .card-head {
    padding: 12px 15px;
    font-size: 15px;
  }
  .pay-card {
    padding: 25px 20px;
  }
  .pay-success .pay-actions {
    flex-direction: column;
  }
  .pay-success .pay-actions .btn-back {
    text-align: center;
  }
  .ad-table {
    font-size: 12px;
  }
  .ad-table th,
  .ad-table td {
    padding: 8px;
  }
  .table-scroll {
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll > .ad-table th,
  .table-scroll > .ad-table td {
    min-width: 90px;
  }
  .table-scroll > .ad-table th:first-child,
  .table-scroll > .ad-table td:first-child {
    min-width: 170px;
  }
  .table-scroll > .ad-table th:nth-child(2),
  .table-scroll > .ad-table td:nth-child(2) {
    min-width: 120px;
  }
  .table-scroll > .ad-table th:nth-last-child(2),
  .table-scroll > .ad-table td:nth-last-child(2) {
    min-width: 160px;
  }
  .info-table td {
    font-size: 13px;
  }
  .auth-box {
    margin: 20px 15px;
    padding: 30px 25px;
  }
  .auth-header h2 {
    font-size: 22px;
  }
  .ad-buy-page .time-preview .preview-detail {
    flex-direction: column;
    gap: 4px;
  }
}
