/* ===== Xiaomi Showcase Banner ===== */
.xiaomi-showcase {
  position: relative;
  padding: 48px 0 56px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 45%, #eef2ff 100%);
}

.xiaomi-showcase::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 105, 0, 0.12) 0%, transparent 70%);
  top: -120px;
  right: -100px;
  animation: pulseGlow 4s ease-in-out infinite;
}

.xiaomi-showcase::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: pulseGlow 5s ease-in-out infinite reverse;
}

.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.showcase-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.phone-mockup {
  position: relative;
  width: 220px;
  height: 420px;
  animation: floatPhone 5s ease-in-out infinite;
}

.phone-frame {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1e293b, #334155);
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ff6900 0%, #ff8534 40%, #6366f1 100%);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.phone-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  animation: screenShine 3s ease-in-out infinite;
}

.phone-notch {
  position: absolute;
  top: 10px;
  width: 80px;
  height: 22px;
  background: #1e293b;
  border-radius: 0 0 14px 14px;
}

.phone-logo {
  font-size: 2.8rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
  animation: logoPulse 2s ease-in-out infinite;
  letter-spacing: -1px;
}

.phone-sub {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 8px;
  animation: fadeInOut 3s ease-in-out infinite;
}

.phone-chip {
  margin-top: 24px;
  width: 60px;
  height: 60px;
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  animation: chipSpin 8s linear infinite;
}

.orbit-ring {
  position: absolute;
  border: 2px solid rgba(255, 105, 0, 0.3);
  border-radius: 50%;
  animation: orbitExpand 3s ease-out infinite;
}

.orbit-ring:nth-child(1) { width: 280px; height: 280px; animation-delay: 0s; }
.orbit-ring:nth-child(2) { width: 340px; height: 340px; animation-delay: 1s; }
.orbit-ring:nth-child(3) { width: 400px; height: 400px; animation-delay: 2s; }

.floating-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ff6900;
  border-radius: 50%;
  animation: floatDot 6s ease-in-out infinite;
}

.floating-dot:nth-child(4) { top: 20%; left: 10%; animation-delay: 0s; }
.floating-dot:nth-child(5) { top: 60%; right: 5%; animation-delay: 1.5s; background: #6366f1; }
.floating-dot:nth-child(6) { bottom: 15%; left: 20%; animation-delay: 3s; }

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.home-help-box {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(8px);
  text-align: center;
}

.home-help-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.home-help-typewriter-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin: 4px 0 14px;
  padding: 8px 12px;
}

.home-help-typewriter {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
}

.typewriter-gradient-text {
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 35%, #06b6d4 70%, #2563eb 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientTextFlow 4s linear infinite;
}

@keyframes gradientTextFlow {
  to { background-position: 220% center; }
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline-start: 3px;
  vertical-align: text-bottom;
  background: linear-gradient(180deg, #2563eb, #7c3aed);
  animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
  50% { opacity: 0; }
}

.home-help-line {
  margin: 0 0 10px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #475569;
}

.home-help-line:last-child {
  margin-bottom: 0;
}

.home-help-community {
  color: #64748b;
  font-size: 0.92rem;
}

.showcase-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6900, #ff8534);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  animation: slideDown 0.6s ease;
}

.showcase-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #0f172a, #ff6900);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ===== Instructions ===== */
.instructions-section {
  padding-top: 20px;
  padding-bottom: 48px;
}

.instructions-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  border-right: 4px solid #ff6900;
}

html[dir="ltr"] .instructions-card {
  border-right: 1px solid #e2e8f0;
  border-left: 4px solid #ff6900;
}

.instructions-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
}

.instructions-card h2::before {
  content: '⚠️';
  font-size: 1.3rem;
}

.instructions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instructions-list li {
  position: relative;
  padding: 14px 18px;
  padding-inline-start: 48px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.65;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.instructions-list li:hover {
  box-shadow: 0 4px 16px rgba(255, 105, 0, 0.1);
  border-color: #fed7aa;
}

.instructions-list li::before {
  content: '•';
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6900;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.instructions-list li.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.instructions-list li.warning::before {
  content: '!';
  font-size: 0.95rem;
  background: #ffedd5;
  border-radius: 50%;
  color: #ea580c;
  border: 1px solid #fdba74;
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ===== Keyframes ===== */
@keyframes floatPhone {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(1deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes screenShine {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(200%) rotate(25deg); }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes chipSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbitExpand {
  0% { opacity: 0.6; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes floatDot {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  50% { transform: translate(10px, -15px); opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Enhanced client interactions ===== */
body.client-theme .btn {
  transition: transform 0.2s, box-shadow 0.2s;
}

body.client-theme .btn:hover {
  transform: translateY(-2px);
}

body.client-theme .btn-primary {
  background: linear-gradient(135deg, #ff6900, #ff8534);
  box-shadow: 0 4px 14px rgba(255, 105, 0, 0.35);
}

body.client-theme .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(255, 105, 0, 0.45);
}

body.client-theme .btn-outline {
  border-color: #ff6900;
  color: #ff6900;
}

body.client-theme .btn-outline:hover {
  background: #ff6900;
  color: white;
}

body.client-theme .nav-btn.active {
  color: #ff6900;
  border-color: #ff6900;
  background: rgba(255, 105, 0, 0.08);
}

/* ===== Professional Agent Cards ===== */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.agent-card-pro {
  position: relative;
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 28px 24px 20px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

.agent-card-photo {
  width: calc(100% + 48px);
  margin: -28px -24px 20px;
  height: 180px;
  overflow: hidden;
  background: #f1f5f9;
}

.agent-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-image-preview {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 160px;
}

.agent-image-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.agent-card-pro .agent-links {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.agent-card-pro:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.18);
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 20px;
  flex-wrap: wrap;
}

.agent-badge-agent {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.agent-badge-main {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.agent-card-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2563eb;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.agent-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.agent-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 0.95rem;
  line-height: 1.5;
}

.agent-info-label {
  color: #0f172a;
  font-weight: 600;
  white-space: nowrap;
}

.agent-info-value {
  color: #334155;
}

.agent-info-link {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
}

.agent-info-link:hover {
  text-decoration: underline;
}

.agent-payments {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: 4px;
}

.agent-payments-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 10px;
}

.agent-payment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-payment-tag {
  display: inline-block;
  padding: 5px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.agent-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.btn-agent-details {
  background: #475569;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s;
}

.btn-agent-details:hover,
.btn-agent-details.active {
  background: #334155;
  transform: translateY(-1px);
}

.agent-details-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
  animation: slideDown 0.3s ease;
}

.agent-details-panel .agent-links {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }

  .agent-card-name {
    font-size: 1.45rem;
  }

  .showcase-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .showcase-visual {
    min-height: 280px;
    order: -1;
  }

  .phone-mockup {
    width: 180px;
    height: 340px;
  }

  .showcase-content h1 {
    font-size: 1.75rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .instructions-card {
    padding: 20px;
  }
}
