* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #f5f2f0; /* subtle outer background, but main app has white background */
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: #1e1a1a;
  line-height: 1.4;
}

/* main app container: white background, full width adaptive */
.app {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background: #ffffff; /* pure white background as requested */
  min-height: 100vh;
  box-shadow: none; /* no shadow to keep clean white */
  overflow-x: hidden;
  position: relative;
  padding-top: 52px;
}

/* ----- TOP BAR ----- */
.top-bar {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 52px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

.menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background 0.2s;
}

.top-bar-title {
  flex: 1;
  text-align: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.lang-btn.active {
  background: #fff;
  color: #b91c1c;
  border-color: #fff;
}

/* ----- DRAWER OVERLAY ----- */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 30;
}

.drawer-overlay.open {
  display: block;
}

/* ----- LEFT DRAWER ----- */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100%;
  background: #fff;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 18px 20px;
  letter-spacing: 0.5px;
}

.drawer-list {
  list-style: none;
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
}

.drawer-lang-wrap {
  padding: 14px 16px;
  border-top: 1px solid #f0e8e8;
}

.drawer-lang-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e5d5d5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1e1a1a;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b91c1c' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.18s;
}

.drawer-lang-select:focus {
  outline: none;
  border-color: #b91c1c;
}

.drawer-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e1a1a;
  padding: 14px 24px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.drawer-item:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.drawer-item.active {
  color: #b91c1c;
  font-weight: 700;
  border-left: 3px solid #b91c1c;
  background: #fff5f5;
}

/* content panels - white background already */
.panels {
  padding: 10px;
  background: #ffffff; /* enforce white background */
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active-panel {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* card style: elegant, subtle red accents, white base */
.support-card {
  background: #ffffff;
  border-radius: 28px;
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.05),
    0 2px 4px rgba(110, 30, 30, 0.02);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 1px solid #f0ece9;
}

.support-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.08);
}

.card-img {
  width: 100%;
  display: block;
  object-fit: cover;
  height: 200px;
  background: #f7f2ef;
}

/* video wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  background: #f3efec;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  display: block;
  vertical-align: middle;
  max-height: 240px;
  object-fit: cover;
}

.card-content {
  padding: 20px 20px 24px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #b91c1c; /* rich red for titles */
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* No icons anywhere, but we keep pure text */
.card-desc {
  color: #2c2826;
  font-size: 0.95rem;
  line-height: 1.48;
  margin-bottom: 16px;
}

.tech-badge {
  display: inline-block;
  background: #fef3ef;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #bc3f2e;
  letter-spacing: 0.3px;
  margin-top: 6px;
}

hr {
  margin: 12px 0;
  border: 0;
  height: 1px;
  background: #f0e2dc;
}

/* footer note */
.footnote {
  text-align: center;
  font-size: 0.7rem;
  color: #b27c6e;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid #f0e3de;
}

/* responsive images and video */
img {
  max-width: 100%;
  vertical-align: middle;
}

/* ensure full width on any device */
@media (max-width: 640px) {
  .panels {
    padding: 10px;
  }
  .card-title {
    font-size: 1.25rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ----- FIRMWARE GUIDE ----- */
.fw-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #fce8e8;
}

.fw-list {
  padding-left: 20px;
  margin: 10px 0 0;
}

.fw-list li {
  font-size: 0.92rem;
  color: #2c2826;
  line-height: 1.6;
  margin-bottom: 8px;
}

.fw-list.fw-ordered {
  list-style-type: decimal;
}

.fw-list:not(.fw-ordered) {
  list-style-type: disc;
}

.fw-sub {
  margin-top: 8px;
  padding-left: 18px;
}

.fw-notice {
  background: #fff8f6;
  border-left: 3px solid #f87171;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin-top: 4px;
}

.fw-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.fw-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fw-step-num {
  flex-shrink: 0;
  background: #b91c1c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.6;
  margin-top: 1px;
}

.fw-step-body {
  font-size: 0.92rem;
  color: #2c2826;
  line-height: 1.6;
  flex: 1;
}

.fw-note {
  background: #f5f2f0;
  border-left: 3px solid #d4a27a;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: #5a3e35;
  line-height: 1.55;
}

.fw-warning {
  background: #fff3f3;
  border-left: 3px solid #b91c1c;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: #7f1d1d;
  line-height: 1.55;
}

.fw-step-img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.fw-img-caption {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #1e40af;
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  border-radius: 0 6px 6px 0;
  padding: 7px 10px;
  margin-top: 6px;
  margin-bottom: 8px;
  line-height: 1.5;
  font-style: normal;
  font-weight: 500;
}
.fw-img-caption::before {
  content: "💡";
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0;
  filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.6));
}

.fw-img-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.fw-img-flow-item {
  display: flex;
  flex-direction: column;
}

.fw-img-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #3b82f6;
  line-height: 1;
  margin: 4px 0;
  user-select: none;
}

/* ----- LIGHTBOX ----- */
.fw-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.fw-lightbox.active {
  display: flex;
}
.fw-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  user-select: none;
}
.fw-lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.fw-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.fw-step-img {
  cursor: zoom-in;
}

/* ----- FAQ ACCORDION ----- */
.faq-list {
  padding: 8px 0 20px;
}

.faq-item {
  background: #ffffff;
  border-radius: 16px;
  margin-bottom: 10px;
  border: 1px solid #f0ece9;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.faq-item.open {
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.09);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  color: #1e1a1a;
  padding: 16px 18px;
  cursor: pointer;
  line-height: 1.45;
  gap: 10px;
  transition: color 0.2s;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: #b91c1c;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.faq-item.open .faq-question {
  color: #b91c1c;
  border-bottom: 1px solid #fce8e8;
}

.faq-item.open .faq-question::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 14px 18px 18px;
  font-size: 0.9rem;
  color: #2c2826;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
  animation: fadeIn 0.2s ease;
}

.faq-answer p {
  margin: 0 0 8px 0;
}

.faq-answer p:last-of-type {
  margin-bottom: 0;
}

.faq-answer a {
  color: #b91c1c;
  word-break: break-all;
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

.faq-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff8f6;
  border-left: 3px solid #b91c1c;
  border-radius: 0 8px 8px 0;
  font-size: 0.86rem;
  color: #5c3d3d;
  line-height: 1.55;
}

.faq-note strong {
  color: #b91c1c;
}

.faq-priority {
  margin-top: 10px;
  padding: 9px 14px;
  background: #fff5f5;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #b91c1c;
  font-weight: 600;
}

/* additional red highlight for text */
.highlight-red {
  color: #c2410c;
  font-weight: 500;
}

/* Manual product selector */
.manual-selector-wrap {
  padding: 12px 10px 8px;
  background: #fff;
  position: sticky;
  top: 12px;
  z-index: 10;
  border-bottom: 1px solid #f0ece9;
}

.manual-select {
  width: 100%;
  padding: 11px 40px 11px 16px;
  border: 1.5px solid #e8d8d4;
  border-radius: 12px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23b91c1c' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  background-size: 20px;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e1a1a;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.manual-select:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

/* Manual tab: zero-gap image stack */
.manual-images {
  padding: 0;
  display: block;
  overflow: hidden;
}

.manual-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: #b0a09a;
  gap: 12px;
}

.manual-empty-icon {
  font-size: 3rem;
  line-height: 1;
}

.manual-empty-text {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 240px;
}

.manual-images img {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  line-height: 0;
  vertical-align: top;
}
