/* =============================================
   Mobile-First CSS - 9:16 Portrait Priority
   Base styles = Mobile (375px)
   Desktop via min-width media queries
   ============================================= */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0b0b10;
  --bg-secondary: #13131a;
  --bg-card: #1a1a24;
  --bg-card-border: #2a2a3a;
  --purple: #9b5de5;
  --purple-light: #b47cff;
  --purple-gradient: linear-gradient(135deg, #9b5de5 0%, #b47cff 100%);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --header-height: 48px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

/* =============================================
   HEADER - Mobile First
   ============================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(11, 11, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-ws {
  height: 20px;
  filter: brightness(0) invert(1);
}

.divider {
  display: none;
}

.logo-rm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.logo-rm-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.brand-logo {
  gap: 8px;
  align-items: center;
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #b47cff 0%, #e0c3ff 50%, #9b5de5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hide non-essential nav on mobile */
.nav-btn,
.nav-btn-outline,
.credits,
.nav-btn-help {
  display: none;
}

.btn-login {
  padding: 7px 16px;
  background: var(--purple);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  transition: all 0.3s;
}

.btn-login:hover {
  background: var(--purple-light);
}

/* =============================================
   SIDEBAR - Hidden on mobile
   ============================================= */
.sidebar {
  display: none;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-muted);
  transition: all 0.2s;
  width: 48px;
  cursor: pointer;
}

.sidebar-item:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
}

.sidebar-item.active {
  color: var(--purple-light);
  background: rgba(155, 93, 229, 0.12);
}

.sidebar-icon {
  font-size: 18px;
}

/* =============================================
   MAIN CONTENT - Mobile First
   ============================================= */
.main-content {
  margin-left: 0;
  padding-top: var(--header-height);
}

/* =============================================
   HERO SECTION - Full screen mobile
   ============================================= */
.hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 30%, #1a1a2e 60%, #0d0d1a 100%);
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.1) 40%,
    rgba(0,0,0,0.3) 70%,
    rgba(0,0,0,0.6) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px 12vh;
  width: 100%;
}

.hero-title {
  font-size: 9vw;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 3.8vw;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 36px;
}

.hero-subtitle .sep {
  margin: 0 8px;
  opacity: 0.5;
}

.btn-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
  width: calc(100% - 40px);
  max-width: 320px;
  background: linear-gradient(135deg, #8b4fd4 0%, #a855f7 50%, #b47cff 100%);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  letter-spacing: 1px;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(155, 93, 229, 0.45);
}

.btn-icon {
  font-size: 14px;
}

/* =============================================
   SECTION: Product Advantages - Mobile
   ============================================= */
.section-advantages {
  padding: 48px 16px;
  text-align: center;
}

.section-title-main {
  font-size: 6vw;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(to right, #fff, #ddd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-weight: 400;
}

.advantages-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 16px;
  margin: 0 -16px;
}

.advantages-grid::-webkit-scrollbar {
  display: none;
}

.advantage-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s;
  flex: 0 0 60vw;
  max-width: 240px;
  scroll-snap-align: center;
}

.advantage-card:hover {
  border-color: rgba(155, 93, 229, 0.3);
}

.advantage-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.advantage-text {
  /* no special styles needed on mobile */
}

.advantage-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.advantage-card p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================
   SECTION: Product Introduction
   ============================================= */
.section-intro {
  padding: 40px 16px;
  text-align: center;
}

.section-title-purple {
  font-size: 22px;
  font-weight: 700;
  color: var(--purple-light);
  margin-bottom: 24px;
}

.video-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.intro-video {
  width: 100%;
  display: block;
  background: #000;
}

/* =============================================
   SECTION: Product Philosophy
   ============================================= */
.section-philosophy {
  padding: 40px 16px;
  text-align: center;
}

.philosophy-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.philosophy-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  overflow: hidden;
}

.philosophy-card.reverse {
  flex-direction: column;
}

.philosophy-text {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.philosophy-text h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.philosophy-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.philosophy-img {
  overflow: hidden;
  max-height: 220px;
}

.philosophy-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============================================
   SECTION: Promo Video - Mobile Full Width
   ============================================= */
.section-video {
  margin: 0 0 20px;
  padding: 0 12px;
  width: 100%;
}

.section-robot-video {
  margin: 0 0 20px;
  padding: 0 12px;
  width: 100%;
}

.video-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  border: none;
  border-radius: 14px;
  box-shadow: none;
}

.section-video-player {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.video-meta {
  padding: 10px 4px 4px;
}

.video-title {
  font-size: 16px;
  font-weight: 700;
  color: #c891ff;
  line-height: 1.45;
  margin-bottom: 4px;
}

.video-cycle {
  font-size: 13px;
  color: #e0c3ff;
  line-height: 1.5;
  opacity: 0.95;
}

/* =============================================
   SECTION: Popular Works - Mobile Full Width
   ============================================= */
.section-works {
  padding: 48px 0;
  text-align: center;
}

.section-title-large {
  font-size: 7.5vw;
  font-weight: 900;
  margin-bottom: 8px;
  padding: 0 16px;
}

.works-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  padding: 0 16px;
}

.works-carousel {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin-bottom: 32px;
  padding: 40px 16px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  perspective: 800px;
}

.works-carousel::-webkit-scrollbar {
  display: none;
}

.work-card {
  flex: 0 0 65vw;
  max-width: 260px;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
  opacity: 0.6;
  transform: scale(0.78) rotateY(8deg) translateZ(-60px);
  scroll-snap-align: center;
  transform-style: preserve-3d;
  margin: 0 -8px;
}

.work-card.active {
  opacity: 1;
  transform: scale(1) rotateY(0deg) translateZ(0);
  box-shadow: 0 8px 40px rgba(155, 93, 229, 0.35);
  z-index: 2;
}

.work-card.featured {
  flex: 0 0 65vw;
  max-width: 260px;
}

.work-card img {
  width: 100%;
  height: auto;
  display: block;
}

.work-card:hover {
  opacity: 0.9;
}

.btn-create-bottom {
  margin-top: 24px;
}

/* =============================================
   FOOTER - Mobile
   ============================================= */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 0 16px 32px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-secondary);
}

.hotline-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.hotline-number {
  font-size: 18px;
  font-weight: 700;
  color: #f0a030;
  margin-top: 4px;
}

.follow-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 18px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.footer-logo {
  height: 48px;
  margin-bottom: 6px;
}

.footer-slogan {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px;
  text-align: center;
}

.footer-bottom p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-links a,
.footer-links span {
  font-size: 10px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

/* Scrollbar - thin for mobile */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card-border);
  border-radius: 3px;
}

/* =============================================
   TABLET (min-width: 768px)
   ============================================= */
@media (min-width: 768px) {
  :root {
    --header-height: 52px;
  }

  .header {
    padding: 0 20px;
  }

  .brand-text {
    font-size: 22px;
  }

  .brand-logo-img {
    width: 36px;
    height: 36px;
  }

  .nav-btn-outline {
    display: flex;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-content {
    margin-top: 10vh;
  }

  .btn-create {
    width: auto;
    padding: 15px 80px;
  }

  .section-advantages {
    padding: 60px 32px;
  }

  .section-title-main {
    font-size: 28px;
  }

  .advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    overflow: visible;
    scroll-snap-type: none;
    margin: 0;
    padding: 0;
  }

  .advantage-card {
    flex: none;
    max-width: none;
  }

  .section-video {
    margin: 32px auto;
    padding: 0 24px;
    max-width: 720px;
  }

  .video-wrapper {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  }

  .video-meta {
    padding: 12px 6px 0;
  }

  .video-title {
    font-size: 18px;
  }

  .video-cycle {
    font-size: 14px;
  }

  .section-works {
    padding: 60px 32px;
  }

  .section-title-large {
    font-size: 36px;
    padding: 0;
  }

  .works-carousel {
    flex-direction: row;
    justify-content: center;
    gap: 0;
    padding: 40px 0;
  }

  .work-card {
    width: auto;
    flex: 0 0 220px;
    max-width: none;
  }

  .work-card.featured {
    width: auto;
    flex: 0 0 220px;
    max-width: none;
  }

  .works-subtitle {
    padding: 0;
  }

  .philosophy-cards {
    max-width: 700px;
    margin: 0 auto;
  }

  .section-intro,
  .section-philosophy {
    padding: 50px 32px;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 32px 40px;
  }
}

/* =============================================
   DESKTOP (min-width: 1024px)
   ============================================= */
@media (min-width: 1024px) {
  :root {
    --header-height: 56px;
  }

  .header {
    padding: 0 24px;
  }

  .brand-text {
    font-size: 24px;
    letter-spacing: 2px;
  }

  .divider {
    display: inline;
  }

  /* Show all nav items on desktop */
  .nav-btn,
  .nav-btn-outline,
  .credits,
  .nav-btn-help {
    display: flex;
  }

  .nav-btn {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    align-items: center;
    gap: 4px;
  }

  .nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
  }

  .credits {
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
  }

  .nav-btn-help {
    font-size: 18px;
    padding: 4px;
  }

  .btn-login {
    padding: 8px 20px;
    font-size: 13px;
  }

  .header-right {
    gap: 12px;
  }

  /* Show sidebar on desktop */
  .sidebar {
    display: flex;
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: 60px;
    height: calc(100vh - var(--header-height));
    background: rgba(11, 11, 16, 0.9);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    gap: 4px;
    z-index: 999;
    border-right: 1px solid rgba(255,255,255,0.04);
  }

  .main-content {
    margin-left: 60px;
  }

  /* Hero desktop */
  .hero {
    height: calc(100vh - var(--header-height));
    align-items: center;
  }

  .hero-title {
    font-size: clamp(48px, 5vw, 72px);
    letter-spacing: 4px;
  }

  .hero-subtitle {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .hero-subtitle .sep {
    margin: 0 16px;
  }

  .hero-content {
    margin-top: 0;
    padding-bottom: 0;
  }

  .btn-create {
    width: auto;
    max-width: none;
    padding: 16px 120px;
    font-size: 16px;
    white-space: nowrap;
  }

  /* Advantages desktop */
  .section-advantages {
    padding: 80px 60px;
  }

  .section-title-main {
    font-size: clamp(28px, 3vw, 40px);
  }

  .section-subtitle {
    font-size: 20px;
    margin-bottom: 48px;
  }

  .advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
  }

  .advantage-card {
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    flex: none;
    max-width: none;
  }

  .advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(155, 93, 229, 0.1);
  }

  .advantage-card img {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
  }

  .advantage-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .advantage-card p {
    font-size: 13px;
    line-height: 1.7;
  }

  /* Video desktop */
  .section-video {
    max-width: 1120px;
    margin: 40px auto 32px auto;
    padding: 0 24px;
  }

  .video-wrapper {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  }

  .section-video-player {
    aspect-ratio: 16 / 9;
  }

  .video-meta {
    padding: 14px 6px 0;
  }

  .video-title {
    font-size: 20px;
  }

  .video-cycle {
    font-size: 15px;
  }

  /* Philosophy desktop */
  .section-intro {
    padding: 60px 60px 80px;
  }

  .section-title-purple {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .video-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
  }

  .section-philosophy {
    padding: 60px 60px 80px;
  }

  .philosophy-cards {
    max-width: 1100px;
  }

  .philosophy-card {
    flex-direction: row;
    min-height: 280px;
    border-radius: 16px;
  }

  .philosophy-card.reverse {
    flex-direction: row-reverse;
  }

  .philosophy-text {
    flex: 1;
    padding: 48px 40px;
  }

  .philosophy-text h3 {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .philosophy-text p {
    font-size: 15px;
    line-height: 1.8;
  }

  .philosophy-img {
    flex: 1;
    max-height: none;
  }

  /* Works desktop */
  .section-works {
    padding: 80px 60px;
  }

  .section-title-large {
    font-size: clamp(36px, 4vw, 56px);
  }

  .works-subtitle {
    font-size: 16px;
    margin-bottom: 48px;
  }

  .works-carousel {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    gap: 0;
    overflow: visible;
    scroll-snap-type: none;
    justify-content: center;
  }

  .work-card {
    flex: 0 0 280px;
    max-width: none;
  }

  .work-card.featured {
    flex: 0 0 280px;
    max-width: none;
  }

  .work-card:hover {
    opacity: 0.9;
  }

  .btn-create-bottom {
    margin-top: 40px;
  }

  /* Footer desktop */
  .footer {
    padding-top: 60px;
  }

  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    padding: 0 60px 40px;
  }

  .footer-col h4 {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .footer-logo {
    height: 60px;
  }

  .hotline-number {
    font-size: 20px;
  }

  .footer-bottom {
    padding: 20px 60px;
  }

  .footer-bottom p {
    font-size: 12px;
  }

  .footer-links a,
  .footer-links span {
    font-size: 11px;
  }

  /* Scrollbar desktop */
  ::-webkit-scrollbar {
    width: 6px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
  }
}


