/* Theme Tokens for sanyuhub Yellow Brand Identity */
:root {
  --color-background: #0b0c0f;
  --color-surface: #15171c;
  --color-surface-elevated: #1d2026;
  --color-text-primary: #ffffff;
  --color-text-secondary: #b5b9c3;
  --color-accent: #ffd43b;
  --color-accent-hover: #ffe16a;
  --color-border: #2c3038;
  --color-focus: #ffe16a;
  --color-danger: #f87171;
  --color-success: #34d399;

  /* Sidebar preservation variables */
  --header: #111318;
  --sidebar: #1a1c23;
  --hover: #292b35;
  --line: #30323a;
  --text: #f5f5f7;
  --muted: #a4a9b4;
}

/* Centralized Brand Name Component */
.brand-name {
  display: inline-flex;
  align-items: center;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-name__sanyu {
  color: #ffffff;
}

.brand-name__hub {
  color: var(--color-accent);
}

/* SECTION GEOMETRY, DEPTH & LAYERING SYSTEM */

/* Base Section Structure with Layering Context */
.section-story {
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Depth Glow Behind Section Content */
.section-story::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 212, 59, 0.035) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.section-story > * {
  position: relative;
  z-index: 2;
}

/* Distinct Organic Silhouettes & Overlapping Stacking Contexts */

/* 1. Hero Section Silhouette */
.section-hero {
  z-index: 10;
  border-radius: 0 0 36px 18px;
  margin-bottom: 0;
  padding-bottom: 56px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* 2. Overview / About Section Silhouette (Asymmetric Inset & Overlap) */
.section-overview {
  z-index: 20;
  width: calc(100% - 12px);
  margin-left: auto;
  margin-right: auto;
  margin-top: -24px;
  border-radius: 28px 12px 32px 18px;
  border: 1px solid rgba(255, 212, 59, 0.12);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.65), 0 12px 28px rgba(0, 0, 0, 0.4);
  padding: 52px 22px 44px;
}

/* 3. Simple Setup Section Silhouette (Concave Emerge & Wide Bounds) */
.section-setup {
  z-index: 30;
  width: 100%;
  margin-top: -28px;
  border-radius: 20px 32px 16px 28px;
  border-top: 1px solid rgba(255, 212, 59, 0.15);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6), 0 14px 32px rgba(0, 0, 0, 0.45);
  padding: 56px 20px 48px;
}

/* 4. Directory Grid Section Silhouette (Asymmetric Arc & Layer Depth) */
.section-directory {
  z-index: 40;
  width: calc(100% - 10px);
  margin-left: auto;
  margin-right: auto;
  margin-top: -24px;
  border-radius: 32px 16px 28px 24px;
  border: 1px solid rgba(255, 212, 59, 0.14);
  box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.7), 0 16px 36px rgba(0, 0, 0, 0.5);
  padding: 52px 20px 44px;
}

/* 5. Capabilities / Features Section Silhouette (Organic Convex) */
.section-capabilities {
  z-index: 50;
  width: 100%;
  margin-top: -26px;
  border-radius: 18px 28px 24px 32px;
  border-top: 1px solid rgba(255, 212, 59, 0.12);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.65), 0 14px 32px rgba(0, 0, 0, 0.45);
  padding: 54px 20px 48px;
}

/* 6. CTA / Final Section Silhouette (Curved Dome Cap) */
.section-cta {
  z-index: 60;
  width: 100%;
  margin-top: -24px;
  border-radius: 36px 36px 0 0;
  border-top: 1px solid rgba(255, 212, 59, 0.2);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.75);
  padding: 58px 20px 52px;
}

/* Contact Us & Support Center Styles */
.contact-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-nav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  width: 100%;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-back:hover, .btn-back:focus-visible {
  background: var(--hover);
  border-color: var(--color-accent);
  outline: none;
}

.contact-title-compact {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

/* Category Grid & List */
.support-category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.support-cat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  position: relative;
  outline: none;
}

.support-cat-item:hover, .support-cat-item:focus-visible {
  background: var(--color-surface-elevated);
  border-color: rgba(255, 212, 59, 0.4);
  transform: translateY(-1px);
}

.support-cat-item.active {
  border-color: var(--color-accent);
  background: var(--color-surface-elevated);
  box-shadow: 0 0 12px rgba(255, 212, 59, 0.15);
}

.support-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 212, 59, 0.12);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.support-cat-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.support-cat-content {
  flex: 1;
  min-width: 0;
}

.support-cat-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-cat-num {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.support-cat-desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.support-cat-arrow {
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Category Detail View Modal/Card */
.category-detail-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-accent);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: reveal 0.2s ease-out;
}

.category-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
}

.category-detail-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.grounded-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.grounded-option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text);
}

.grounded-option-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Direct Message Form */
.dm-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 22px 18px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dm-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.dm-sub {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  position: relative;
  width: 100%;
}

.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.required-asterisk {
  color: var(--color-accent);
  margin-left: 3px;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(255, 212, 59, 0.2);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.field-error {
  font-size: 12.5px;
  color: var(--color-danger);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.char-counter {
  font-size: 11.5px;
  color: var(--color-text-secondary);
  text-align: right;
  margin-top: 2px;
}

/* Searchable Country Selector UI */
.country-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  background: var(--color-background);
}

.country-flag-icon {
  font-size: 18px;
  margin-right: 8px;
  line-height: 1;
  display: inline-block;
}

.country-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  place-items: center;
  padding: 16px;
}

.country-modal-backdrop.open {
  display: grid;
}

.country-modal {
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.country-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.country-modal-header h4 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.btn-close-modal:hover {
  background: var(--hover);
  color: #ffffff;
}

.country-search-box {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.country-search-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14.5px;
  outline: none;
}

.country-search-input:focus {
  border-color: var(--color-accent);
}

.country-list-scroll {
  overflow-y: auto;
  max-height: 360px;
  padding: 8px;
}

.country-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  width: 100%;
  text-align: left;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.country-option-item:hover, .country-option-item:focus-visible {
  background: var(--hover);
  outline: none;
}

.country-option-item.selected {
  background: rgba(255, 212, 59, 0.15);
  color: var(--color-accent);
  font-weight: 600;
}

/* Alert banners */
.alert-banner {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--color-success);
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--color-danger);
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

@media (max-width: 480px) {
  .support-cat-item {
    padding: 12px 14px;
    gap: 12px;
  }
  .support-cat-icon {
    width: 36px;
    height: 36px;
  }
  .form-control {
    font-size: 16px; /* Prevents auto-zoom on iOS safari */
  }
}

/* Curved Section Dividers & Soft Boundary Transitions */
.section-divider {
  display: block;
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-right: -20px;
  height: 36px;
  margin-top: 24px;
  margin-bottom: -48px;
  padding: 0;
  pointer-events: none;
  position: relative;
  z-index: 5;
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .section-divider {
    height: 48px;
  }
}

.section-divider path {
  transition: fill 0.2s ease;
}

/* Section Color Fill Helpers */
.fill-bg { fill: var(--color-background) !important; color: var(--color-background) !important; }
.fill-surface { fill: var(--color-surface) !important; color: var(--color-surface) !important; }
.fill-card { fill: var(--color-surface-elevated) !important; color: var(--color-surface-elevated) !important; }
.fill-footer { fill: #111318 !important; color: #111318 !important; }

/* Divider Position Alignment */
.divider-bottom {
  margin-bottom: -48px;
}

.divider-top {
  margin-top: -48px;
}

/* Curved Footer Separator */
.footer-divider-curved {
  width: 100%;
  height: 12px;
  margin: 18px 0;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255, 212, 59, 0.25) 0%, rgba(52, 57, 68, 0.4) 60%, transparent 100%);
  border-radius: 50%;
  opacity: 0.8;
}

/* Organic Curved Contours for Large Content Regions */
.visual-container {
  border-radius: 24px 18px 28px 20px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  position: relative;
}

.visual-container::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 212, 59, 0.2);
  pointer-events: none;
}

.dm-section {
  border-radius: 24px 24px 20px 20px;
  position: relative;
  overflow: hidden;
}

.dm-section::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 10%;
  right: 10%;
  height: 48px;
  background: radial-gradient(ellipse at center, rgba(255, 212, 59, 0.08) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.pinned-container {
  position: relative;
}

.pinned-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255, 212, 59, 0.04) 0%, transparent 100%);
  pointer-events: none;
}
