/**
 * Holos AI - Interactive Showcase & Phone Simulator Stylesheet
 * Architectural Module: css/demo.css (v4.7)
 */

/* =========================================================================
   1. SHOWCASE SECTION & HORIZONTAL 3-MODE NAVBAR
   ========================================================================= */

.showcase-section {
  position: relative;
  padding: 40px 0 80px;
  z-index: 1;
}

.showcase-header {
  text-align: center;
  margin-bottom: 24px;
}

.showcase-header .hero-badge {
  display: inline-block;
  margin-bottom: 10px;
}

.showcase-header .section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.showcase-header .demo-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.showcase-header .demo-status-pill.active {
  background: rgba(255, 143, 92, 0.12);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald-light);
  box-shadow: 0 0 20px rgba(255, 143, 92, 0.2);
}

/* 3-Method Navigation Bar (Spanning across top of left & right columns) */
.demo-mode-navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto 36px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.demo-nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.demo-nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.demo-nav-tab.active {
  background: rgba(255, 143, 92, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald-light);
  box-shadow: 0 4px 20px rgba(255, 143, 92, 0.25);
}

.tab-badge {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: inherit;
  transition: all 0.2s ease;
}

.demo-nav-tab.active .tab-badge {
  background: var(--accent-emerald);
  color: #20140C;
}

.tab-progress-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  border-radius: 2px;
  transition: width 0.08s linear;
}

.demo-nav-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  user-select: none;
  opacity: 0.5;
}

/* =========================================================================
   2. TWO-COLUMN SHOWCASE LAYOUT (PHONE DEMO + SECONDARY EXPLANATION)
   ========================================================================= */

.showcase-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
}

/* Left Column: Phone Container */
.showcase-phone-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================================================================
   3. SIMULATED PHONE FRAME & CHAT APP UI (CLEAN & ADAPTABLE)
   ========================================================================= */

:root {
  /* Phone Frame Theme Tokens (Warm Sun Dark by default) */
  --phone-bg: #1C1712;
  --phone-border: #392F26;
  --phone-header-bg: #26201A;
  --phone-header-border: rgba(255, 235, 215, 0.08);
  --phone-chat-bg: #1C1712;
  --phone-incoming-bg: #2B231B;
  --phone-incoming-text: #F3E9DC;
  --phone-incoming-border: rgba(255, 235, 215, 0.06);
  --phone-outgoing-bg: #FF8F5C;
  --phone-outgoing-text: #20140C;
  --phone-input-bar-bg: #26201A;
  --phone-input-box-bg: #1C1712;
  --phone-input-text: #F3E9DC;
  --phone-panel-bg: rgba(38, 32, 26, 0.94);
  --phone-panel-border: rgba(255, 143, 92, 0.4);
  --phone-card-bg: rgba(255, 248, 239, 0.05);
  --phone-card-border: rgba(255, 248, 239, 0.1);
}

@media (prefers-color-scheme: light) {
  :root.theme-auto, [data-theme="light"] {
    --phone-bg: #FCF8EF;
    --phone-border: #EEE1CB;
    --phone-header-bg: #FFFCF5;
    --phone-header-border: rgba(46, 36, 24, 0.08);
    --phone-chat-bg: #FCF8EF;
    --phone-incoming-bg: #F5EEDF;
    --phone-incoming-text: #2E2418;
    --phone-incoming-border: rgba(46, 36, 24, 0.06);
    --phone-outgoing-bg: #F28B4F;
    --phone-outgoing-text: #FFFFFF;
    --phone-input-bar-bg: #FFFCF5;
    --phone-input-box-bg: #F5EEDF;
    --phone-input-text: #2E2418;
    --phone-panel-bg: rgba(255, 252, 245, 0.95);
    --phone-panel-border: rgba(242, 139, 79, 0.4);
    --phone-card-bg: rgba(46, 36, 24, 0.03);
    --phone-card-border: rgba(46, 36, 24, 0.08);
  }
}

/* Phone Mockup Frame */
.phone-frame {
  width: 340px;
  height: 580px;
  background: var(--phone-bg);
  border: 4px solid var(--phone-border);
  border-radius: 38px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(255, 143, 92, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* Phone Top Notch & Status Bar */
.phone-notch {
  width: 110px;
  height: 16px;
  background: var(--phone-border);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin: 0 auto;
  z-index: 40;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 18px 2px;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
  z-index: 30;
}

/* App Header (Clean WhatsApp/Telegram style) */
.app-header {
  height: 52px;
  background: var(--phone-header-bg);
  border-bottom: 1px solid var(--phone-header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB07D, #FF7A45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.contact-meta {
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.2;
}

.contact-status {
  font-size: 0.68rem;
  color: var(--accent-emerald-light);
}

.app-header-icons {
  display: flex;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Chat Area */
.chat-area {
  flex: 1;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  position: relative;
  background: var(--phone-chat-bg);
}

/* Message Bubbles */
.chat-msg {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 84%;
  position: relative;
  word-break: break-word;
}

.chat-msg.incoming {
  background: var(--phone-incoming-bg);
  color: var(--phone-incoming-text);
  border: 1px solid var(--phone-incoming-border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-msg.outgoing {
  background: var(--phone-outgoing-bg);
  color: var(--phone-outgoing-text);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(255, 143, 92, 0.35);
  font-weight: 500;
}

.msg-time {
  font-size: 0.62rem;
  opacity: 0.7;
  display: block;
  text-align: right;
  margin-top: 3px;
}

/* App Input Area */
.app-input-area {
  height: 56px;
  background: var(--phone-input-bar-bg);
  border-top: 1px solid var(--phone-header-border);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.app-input-box {
  flex: 1;
  background: var(--phone-input-box-bg);
  border: 1px solid var(--phone-header-border);
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.82rem;
  color: var(--phone-input-text);
  overflow: hidden;
}

.typing-indicator {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typing-indicator.typed {
  color: #fff;
  font-weight: 500;
}

.app-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-emerald);
  color: #042f2e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 143, 92, 0.4);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.app-send-btn:active {
  transform: scale(0.9);
}

/* =========================================================================
   4. HOLOS FLOATING BUBBLE (EDGE-DOCKED)
   ========================================================================= */

.holos-bubble {
  position: absolute;
  top: 175px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 143, 92, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.holos-bubble img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

/* 5s Countdown Badge for Mode 1 */
.bubble-countdown {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
  animation: pulse 1s infinite;
}

/* =========================================================================
   5. HOLOS SUGGESTION PANEL (COMPACT, FROSTED GLASS)
   ========================================================================= */

.holos-panel {
  position: absolute;
  top: 145px;
  left: 10px;
  right: 10px;
  background: var(--phone-panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--phone-panel-border);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 143, 92, 0.15);
  padding: 12px;
  z-index: 26;
  display: none;
  flex-direction: column;
  gap: 8px;
  transform-origin: top right;
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-header h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-header svg {
  fill: var(--accent-emerald);
}

.panel-translation {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.trans-title, .intent-title {
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.intent-title {
  margin-top: 6px;
}

.trans-text {
  color: #f1f5f9;
  font-weight: 500;
}

.intent-text {
  color: #cbd5e1;
}

/* Panel Cards */
.panel-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reply-card {
  background: var(--phone-card-bg);
  border: 1px solid var(--phone-card-border);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.reply-card:hover, .reply-card.selected {
  background: rgba(255, 143, 92, 0.14);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 12px rgba(255, 143, 92, 0.2);
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 2px;
}

.card-text-en {
  font-size: 0.78rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.3;
}

.card-text-zh {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* =========================================================================
   6. MAGNIFIER OVERLAY (MODE 3) & EXACT REPLY SVG BUTTON
   ========================================================================= */

.phone-magnifier-lens {
  position: absolute;
  top: 70px;
  left: 18px;
  width: 140px;
  height: 28px;
  border: 1.5px dashed var(--accent-cyan);
  background: rgba(245, 185, 94, 0.15);
  border-radius: 6px;
  z-index: 24;
  display: none;
  animation: fadeIn 0.3s ease;
}

.magnifier-tooltip {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--phone-panel-bg);
  border: 1px solid var(--accent-cyan);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 25;
}

.magnifier-trans-text {
  font-size: 0.7rem;
  color: #e2e8f0;
}

/* User's exact reply button with customized SVG */
.magnifier-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(255, 143, 92, 0.2), rgba(245, 185, 94, 0.2));
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald-light);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.magnifier-reply-btn svg {
  fill: var(--accent-emerald-light);
  width: 15px;
  height: 15px;
}

.magnifier-reply-btn:hover {
  background: var(--accent-emerald);
  color: #042f2e;
}
.magnifier-reply-btn:hover svg {
  fill: #042f2e;
}

/* =========================================================================
   7. VIRTUAL TOUCH CURSOR & RIPPLE ANIMATIONS
   ========================================================================= */

.sim-touch-cursor {
  position: absolute;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 60;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 143, 92, 0.5);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, left 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sim-touch-cursor.tapping {
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(255, 143, 92, 0.95);
  border-color: var(--accent-emerald-light);
}

.sim-touch-cursor.tapping::after {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border: 2px solid var(--accent-emerald);
  border-radius: 50%;
  animation: tapRipple 0.4s ease-out forwards;
}

@keyframes tapRipple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* =========================================================================
   8. RIGHT COLUMN: SECONDARY AUXILIARY EXPLANATION PANEL
   ========================================================================= */

.showcase-info-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Clean, lightweight single-layer container (No heavy double backgrounds!) */
.demo-side-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px 36px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all 0.3s ease;
}

.mode-card-block {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 143, 92, 0.12);
  color: var(--accent-emerald-light);
  border: 1px solid rgba(255, 143, 92, 0.3);
  margin-bottom: 14px;
}

.mode-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 12px;
}

.mode-desc-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.mode-highlight-pill {
  display: inline-block;
  font-size: 0.8rem;
  color: #F5B95E;
  background: rgba(245, 185, 94, 0.1);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Shared Security & Translation Guarantee (无论哪种场景) */
.shared-guarantee-box {
  background: rgba(38, 32, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 16px 18px;
  margin-top: 20px;
  border-left: 3px solid var(--accent-emerald);
}

.guarantee-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guarantee-item {
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 4px;
}
.guarantee-item:last-child {
  margin-bottom: 0;
}

/* Action Button Row */
.demo-action-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =========================================================================
   9. MOBILE & TABLET BREAKPOINTS
   ========================================================================= */

@media (max-width: 960px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .showcase-phone-col {
    order: 1;
  }
  .showcase-info-col {
    order: 2;
  }
  .demo-mode-navbar {
    flex-direction: column;
    border-radius: 20px;
    gap: 8px;
    padding: 10px;
  }
  .demo-nav-tab {
    width: 100%;
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  .demo-nav-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .phone-frame {
    width: 100%;
    max-width: 320px;
    height: 540px;
  }
  .demo-side-panel {
    padding: 22px 18px;
  }
  .mode-title {
    font-size: 1.25rem;
  }
}
