/* ==========================================================================
   Yupitek Online Project Demo — Main Stylesheet (CIS tech-dark)
   ========================================================================== */

/* 基礎重置與佈局 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.tech-dark-body {
  background-color: var(--yp-ui-bg, #0B0E11);
  color: var(--yp-ui-text, #FFFFFF);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* 語言切換選單 (Fixed 置頂右上) */
.lang-switcher {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  gap: 0.35rem;
  background: rgba(11, 14, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(51, 181, 238, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

@media (max-width: 640px) {
  .lang-switcher {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.2rem 0.3rem;
    gap: 0.15rem;
  }
  .lang-btn {
    padding: 0.2rem 0.35rem;
    font-size: 0.7rem;
  }
  .back-home {
    top: 0.75rem;
    left: 0.75rem;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
  }
  .back-home .back-label {
    display: none;
  }
}


.lang-btn {
  background: transparent;
  color: var(--yp-ui-text-muted, #B5BCC4);
  border: 1px solid transparent;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-btn:hover {
  color: #FFFFFF;
  background: rgba(51, 181, 238, 0.1);
  border-color: rgba(51, 181, 238, 0.4);
}

.lang-btn.active {
  color: #FFFFFF;
  background: rgba(2, 160, 233, 0.25);
  border-color: var(--yp-ui-primary, #02A0E9);
  box-shadow: 0 0 10px rgba(2, 160, 233, 0.3);
}

/* 返回主站按鈕 (Fixed 置頂左上) */
.back-home {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 14, 17, 0.85);
  backdrop-filter: blur(12px);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(51, 181, 238, 0.25);
  color: var(--yp-ui-text-muted, #B5BCC4);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.back-home:hover {
  color: #FFFFFF;
  border-color: var(--yp-ui-primary, #02A0E9);
  box-shadow: 0 0 10px rgba(2, 160, 233, 0.3);
}

/* Hero Section (全屏沉浸) */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yp-ui-border-tech, #33B5EE);
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.8rem;
  background: rgba(2, 160, 233, 0.08);
  border: 1px solid rgba(51, 181, 238, 0.3);
  border-radius: 4px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero__title span.highlight {
  color: var(--yp-ui-accent, #FF7A45);
  text-shadow: 0 0 20px rgba(255, 122, 69, 0.3);
}

.hero__subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--yp-ui-text-muted, #B5BCC4);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* 機甲按鈕 (Mecha Buttons) */
.btn-mecha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px 12px 4px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.btn-mecha--primary {
  background: var(--yp-ui-primary, #02A0E9);
  color: #FFFFFF;
  border: 1px solid #33B5EE;
  box-shadow: 0 0 15px rgba(2, 160, 233, 0.4);
}

.btn-mecha--primary:hover {
  background: #1ab0f5;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(2, 160, 233, 0.6);
}

.btn-mecha--ghost {
  background: rgba(35, 40, 46, 0.6);
  color: var(--yp-ui-text, #FFFFFF);
  border: 1px solid rgba(74, 82, 91, 0.8);
  backdrop-filter: blur(8px);
}

.btn-mecha--ghost:hover {
  background: rgba(46, 53, 61, 0.8);
  border-color: var(--yp-ui-accent, #FF7A45);
  color: var(--yp-ui-accent, #FF7A45);
  transform: translateY(-2px);
}

/* Sticky 專案跳轉導航列 */
.project-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(11, 14, 17, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(51, 181, 238, 0.15);
  padding: 0.65rem 0;
}

.project-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 數字bar 01 to 11 緊鄰專案導覽標籤 */
  gap: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

@media (min-width: 960px) {
  .project-nav {
    /* 預留右側空間，防止滾動時與右上角語言切換器重疊 */
    padding-right: 280px;
  }
}

.project-nav::-webkit-scrollbar {
  display: none;
}

.project-nav__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--yp-ui-text-subtle, #8B939B);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.project-nav__list {
  display: flex;
  gap: 0.45rem;
  list-style: none;
  align-items: center;
  flex-shrink: 0;
}

.project-nav__item {
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 40, 46, 0.5);
  border: 1px solid rgba(74, 82, 91, 0.5);
  border-radius: 4px;
  color: var(--yp-ui-text-muted, #B5BCC4);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.project-nav__item:hover {
  border-color: var(--yp-ui-primary, #02A0E9);
  color: #FFFFFF;
}

.project-nav__item.active {
  background: rgba(255, 122, 69, 0.15);
  border-color: var(--yp-ui-accent, #FF7A45);
  color: var(--yp-ui-accent, #FF7A45);
  box-shadow: 0 0 10px rgba(255, 122, 69, 0.3);
}

/* 專案展示列表區塊 */
.projects-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  background: var(--yp-ui-bg-elevated, #14181D);
  border: 1px solid rgba(51, 181, 238, 0.15);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 4.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 960px) {
  .project-card {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 460px);
    gap: 3rem;
    padding: 3rem;
    align-items: center;
  }
}

.project-card:hover {
  border-color: rgba(51, 181, 238, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* HUD 科技裝飾邊角 */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--yp-ui-primary, #02A0E9);
  border-left: 2px solid var(--yp-ui-primary, #02A0E9);
}

.project-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-bottom: 2px solid var(--yp-ui-accent, #FF7A45);
  border-right: 2px solid var(--yp-ui-accent, #FF7A45);
}

/* 左側：專案資訊 */
.project-card__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card__header {
  margin-bottom: 1.25rem;
}

.project-card__index {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--yp-ui-accent, #FF7A45);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.4rem;
  color: #FFFFFF;
}

.project-card__subtitle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--yp-ui-border-tech, #33B5EE);
  font-style: italic;
  margin-bottom: 1rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag-mecha {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(35, 40, 46, 0.8);
  border: 1px solid rgba(74, 82, 91, 0.6);
  border-radius: 3px 8px 3px 8px;
  color: var(--yp-ui-text-muted, #B5BCC4);
}

.project-card__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(11, 14, 17, 0.5);
  border-left: 2px solid var(--yp-ui-primary, #02A0E9);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.meta-item span {
  color: var(--yp-ui-text-subtle, #8B939B);
  display: block;
}

.meta-item strong {
  color: #FFFFFF;
  font-weight: 500;
}

.project-card__description {
  color: var(--yp-ui-text-muted, #B5BCC4);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* 右側：互動多媒體控制台 (Media HUD Console) */
.project-card__media {
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* 媒體 HUD 控制列 */
.media-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 24, 29, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(51, 181, 238, 0.25);
  border-bottom: none;
  border-radius: 4px 12px 0 0;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
}

.media-tabs {
  display: flex;
  gap: 0.4rem;
}

.media-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  color: var(--yp-ui-text-muted, #B5BCC4);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-tab:hover {
  color: #FFFFFF;
  background: rgba(51, 181, 238, 0.1);
  border-color: rgba(51, 181, 238, 0.3);
}

.media-tab.active {
  color: #FFFFFF;
  background: rgba(2, 160, 233, 0.2);
  border-color: var(--yp-ui-primary, #02A0E9);
  box-shadow: 0 0 10px rgba(2, 160, 233, 0.3);
}

.media-tab__icon {
  font-size: 0.85rem;
}

.media-tab__badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 122, 69, 0.2);
  border: 1px solid var(--yp-ui-accent, #FF7A45);
  color: var(--yp-ui-accent-bright, #FFA07A);
  border-radius: 10px;
}

.media-tab__count {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  background: rgba(51, 181, 238, 0.2);
  border: 1px solid rgba(51, 181, 238, 0.4);
  color: #33B5EE;
  border-radius: 10px;
}

/* 影院全螢幕模式按鈕 */
.media-cinema-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(35, 40, 46, 0.8);
  border: 1px solid rgba(74, 82, 91, 0.7);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  color: var(--yp-ui-text-muted, #B5BCC4);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-cinema-btn:hover {
  color: #FFFFFF;
  border-color: var(--yp-ui-accent, #FF7A45);
  box-shadow: 0 0 8px rgba(255, 122, 69, 0.4);
}

.cinema-icon {
  font-size: 0.85rem;
}

/* 主舞台舞台容器 (精巧 16:9 尺寸，避免版面過大壓迫) */
.media-stage-wrapper {
  position: relative;
  background: #000000;
  border: 1px solid rgba(51, 181, 238, 0.25);
  border-radius: 0 0 4px 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 270px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.media-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.media-panel.active {
  opacity: 1;
  pointer-events: auto;
}

/* 影片面板 */
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-container:hover .video-poster {
  transform: scale(1.02);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(11, 14, 17, 0.85);
  border: 1px solid var(--yp-ui-primary, #02A0E9);
  border-radius: 30px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(2, 160, 233, 0.4);
  transition: all 0.25s ease;
}

.video-container:hover .video-play-btn {
  background: rgba(2, 160, 233, 0.85);
  border-color: #33B5EE;
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 0 25px rgba(2, 160, 233, 0.7);
}

.inline-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 相簿面板 (主圖 + 縮圖底盤) */
.media-panel--gallery {
  display: flex;
  flex-direction: column;
}

.gallery-main-view {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: zoom-in;
  background: #000;
}

.gallery-active-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease, transform 0.4s ease;
}

.gallery-main-view:hover .gallery-active-img {
  transform: scale(1.02);
}

.gallery-filmstrip {
  height: 48px;
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  background: #14181D;
  border-top: 1px solid rgba(74, 82, 91, 0.4);
  overflow-x: auto;
  scrollbar-width: thin;
}

.thumb-btn {
  position: relative;
  height: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
  transition: all 0.2s ease;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-btn:hover {
  opacity: 0.9;
  border-color: var(--yp-ui-border-tech, #33B5EE);
}

.thumb-btn.active {
  opacity: 1;
  border: 2px solid var(--yp-ui-primary, #02A0E9);
  box-shadow: 0 0 8px rgba(2, 160, 233, 0.6);
}

/* 品牌漸層分隔線 */
.brand-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(51, 181, 238, 0.4), var(--yp-ui-accent, #FF7A45), transparent);
  margin: 4rem 0;
}

/* CTA 區塊 */
.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
  background: radial-gradient(circle at center, rgba(2, 160, 233, 0.12) 0%, transparent 70%);
  border-top: 1px solid rgba(51, 181, 238, 0.15);
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.cta-section__desc {
  font-size: 1.1rem;
  color: var(--yp-ui-text-muted, #B5BCC4);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Lightbox 影院全螢幕彈窗 */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2010;
}

.lightbox__close:hover {
  background: var(--yp-ui-accent, #FF7A45);
  border-color: #FF7A45;
  box-shadow: 0 0 12px rgba(255, 122, 69, 0.6);
}

.lightbox__content {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-media-wrapper {
  position: relative;
  width: 100%;
  background: #14181D;
  border: 1px solid rgba(51, 181, 238, 0.3);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9);
}

.lightbox-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #0B0E11;
  border-bottom: 1px solid rgba(74, 82, 91, 0.4);
  font-family: var(--font-mono);
}

.lightbox-hud__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF;
}

.lightbox-hud__counter {
  font-size: 0.8rem;
  color: var(--yp-ui-primary-bright, #33B5EE);
  background: rgba(2, 160, 233, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.lightbox-stage {
  width: 100%;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-video {
  width: 100%;
  max-height: 75vh;
  outline: none;
  background: #000;
}

.lightbox-arrow {
  position: absolute;
  top: calc(50% + 20px);
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(11, 14, 17, 0.75);
  border: 1px solid rgba(51, 181, 238, 0.4);
  color: #FFFFFF;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 10;
  line-height: 1;
}

.lightbox-arrow:hover {
  background: var(--yp-ui-primary, #02A0E9);
  border-color: #33B5EE;
  box-shadow: 0 0 15px rgba(2, 160, 233, 0.6);
}

.lightbox-arrow--prev {
  left: 1rem;
}

.lightbox-arrow--next {
  right: 1rem;
}
