/* ========================================
   ELEVATED DESIGN SYSTEM
   Modern, Gaming-Inspired, Mobile-First
======================================== */

/* === CSS Variables === */
:root {
  /* Color Palette */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-elevated: #1a1a1d;
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --text-primary: #fafafa;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  
  --accent-primary: #e85d04;
  --accent-secondary: #f48c06;
  --accent-glow: rgba(232, 93, 4, 0.4);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing - Mobile First */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Desktop spacing overrides */
@media screen and (min-width: 769px) {
  :root {
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --radius-md: 16px;
    --radius-lg: 24px;
  }
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: smooth;
}

@media screen and (min-width: 769px) {
  body {
    font-size: 16px;
  }
}

/* Subtle ambient glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(232, 93, 4, 0.04), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(244, 140, 6, 0.03), transparent);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Layout === */
.wrap {
  min-height: 100vh;
  position: relative;
  padding-bottom: 180px;
  overflow-x: hidden;
}

@media screen and (min-width: 769px) {
  .wrap {
    padding-bottom: 200px;
  }
}

/* ========================================
   HEADER - Mobile First
======================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

header .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

@media screen and (min-width: 769px) {
  header .inner {
    padding: 0.75rem 2.5rem;
  }
}

/* Logo */
header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all var(--transition-smooth);
}

@media screen and (min-width: 769px) {
  header h1 {
    font-size: 1.5rem;
  }
}

header h1 a {
  display: block;
}

/* Desktop Navigation */
.drawer {
  display: none;
}

@media screen and (min-width: 769px) {
  .drawer {
    display: block;
  }
}

.g-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.menu-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.menu-nav li.sp {
  display: none;
}

.menu-nav li a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.menu-nav li a:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Social Icons in header */
header .sns-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

header .sns-nav li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

header .sns-nav li a:hover {
  color: var(--accent-primary);
  background: rgba(232, 93, 4, 0.1);
}

/* ========================================
   MOBILE HAMBURGER MENU
======================================== */
.drawer__btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
}

@media screen and (min-width: 769px) {
  .drawer__btn {
    display: none !important;
  }
}

.drawer__btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger animation when open */
body.menu-open .drawer__btn span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .drawer__btn span:nth-child(2) {
  opacity: 0;
}

body.menu-open .drawer__btn span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 11, 0.98);
  z-index: 999;
  padding: 100px 2rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}

@media screen and (max-width: 768px) {
  .mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

.mobile-menu .menu-nav {
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.mobile-menu .menu-nav li {
  width: 100%;
  text-align: center;
}

.mobile-menu .menu-nav li.sp {
  display: block;
}

.mobile-menu .menu-nav li a {
  display: block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.mobile-menu .sns-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.mobile-menu .sns-nav li a {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
}

/* Header Scrolled State */
body.down header {
  background: rgba(10, 10, 11, 0.95);
}

body.down header .inner {
  padding: 0.5rem 1rem;
}

@media screen and (min-width: 769px) {
  body.down header .inner {
    padding: 0.5rem 2.5rem;
  }
}

body.down header h1 {
  font-size: 1.1rem;
}

@media screen and (min-width: 769px) {
  body.down header h1 {
    font-size: 1.25rem;
  }
}

body.down header .sns-nav {
  display: none;
}

/* ========================================
   HERO SECTION
======================================== */
.Top {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  min-height: 500px;
  overflow: hidden;
}

.top_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) contrast(1.1);
  transition: filter var(--transition-smooth), transform 0.1s ease-out;
  will-change: transform;
}

/* Mobile: Stack vertically */
.top_image_section {
  position: absolute;
  width: 100%;
  height: 33.333%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  overflow: hidden;
}

.section1 { top: 0; }
.section2 { top: 33.333%; }
.section3 { top: 66.666%; }

/* Desktop: Side by side */
@media screen and (min-width: 769px) {
  .top_image_section {
    width: 33.333%;
    height: 100%;
    top: 0;
  }
  
  .section1 { left: 0; }
  .section2 { left: 33.333%; }
  .section3 { left: 66.666%; }
}

.top_image_section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.top_image_section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--accent-primary);
  transition: width var(--transition-smooth);
}

.section_text {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-spring);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Hover/Touch Effects */
.top_image_section:hover::before,
.top_image_section:active::before {
  opacity: 1;
}

.top_image_section:hover::after,
.top_image_section:active::after {
  width: 50%;
}

.top_image_section:hover .section_text,
.top_image_section:active .section_text {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section1:hover, .section1:active {
  background: linear-gradient(135deg, rgba(232, 93, 4, 0.85) 0%, rgba(244, 140, 6, 0.7) 100%);
}

.section2:hover, .section2:active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.85) 0%, rgba(16, 185, 129, 0.7) 100%);
}

.section3:hover, .section3:active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(99, 102, 241, 0.7) 100%);
}

/* ========================================
   NEWS SECTION - Premium Timeline Design
======================================== */
.section--info {
  padding: var(--space-xl) var(--space-sm);
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

@media screen and (min-width: 769px) {
  .section--info {
    padding: var(--space-xl) var(--space-lg);
  }
}

.block--news {
  width: 100%;
  position: relative;
}

/* 區塊標題 */
.block-tit {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-bottom: var(--space-xl);
  color: var(--text-muted);
  position: relative;
  text-transform: uppercase;
}

.block-tit::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent-primary);
  margin-top: 0.75rem;
}

/* 新聞列表 - 高級時間軸佈局 */
.list--information {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 單個新聞項目 */
.list--information li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
  position: relative;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(20px);
  animation: newsReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.list--information li:last-child {
  border-bottom: none;
}

.list--information li:nth-child(1) { animation-delay: 0.1s; }
.list--information li:nth-child(2) { animation-delay: 0.25s; }
.list--information li:nth-child(3) { animation-delay: 0.4s; }

@keyframes newsReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (min-width: 769px) {
  .list--information li {
    grid-template-columns: 120px 1fr;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
  }
}

/* 左側時間區域 */
.list--information .date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding-top: 0.3rem;
  position: relative;
  transition: color 0.3s ease;
}

.list--information .date .year {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 0.15rem;
  letter-spacing: 0.1em;
}

/* 時間軸線和節點 */
.list--information .date::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--bg-primary);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.list--information .date::before {
  content: '';
  position: absolute;
  right: -10px;
  top: 1rem;
  width: 2px;
  height: calc(100% + var(--space-lg));
  background: linear-gradient(180deg, var(--border-subtle), transparent);
}

.list--information li:last-child .date::before {
  display: none;
}

@media screen and (min-width: 769px) {
  .list--information .date {
    font-size: 0.8rem;
    text-align: right;
    padding-right: var(--space-md);
  }
  
  .list--information .date::after {
    right: -8px;
    width: 8px;
    height: 8px;
  }
  
  .list--information .date::before {
    right: -6px;
    top: 1.2rem;
    height: calc(100% + var(--space-xl));
  }
}

/* 右側內容區域 */
.list--information .news-content {
  padding-left: var(--space-sm);
}

@media screen and (min-width: 769px) {
  .list--information .news-content {
    padding-left: var(--space-md);
  }
}

/* 新聞標題 */
.list--information .news-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

@media screen and (min-width: 769px) {
  .list--information .news-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
  }
}

/* 新聞內容 */
.list--information .t {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

@media screen and (min-width: 769px) {
  .list--information .t {
    font-size: 0.95rem;
    line-height: 1.8;
  }
}

/* 連結樣式 */
.list--information li a {
  display: contents;
  text-decoration: none;
}

/* 懸停效果 */
.list--information li:hover .date {
  color: var(--accent-primary);
}

.list--information li:hover .date::after {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
  transform: scale(1.3);
}

.list--information li:hover .news-title {
  color: var(--accent-secondary);
}

.list--information li:hover .t {
  color: var(--text-secondary);
}

/* VIEW MORE 按鈕 */
.list__more {
  margin-top: var(--space-xl);
  padding-left: 100px;
}

@media screen and (min-width: 769px) {
  .list__more {
    padding-left: 145px;
  }
}

.list__more a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.list__more a::after {
  content: '→';
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.list__more a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.list__more a:hover {
  color: var(--accent-primary);
}

.list__more a:hover::after {
  transform: translateX(5px);
}

.list__more a:hover::before {
  width: 100%;
}

/* Loading 狀態 */
.list--information li.loading {
  opacity: 0.4;
  animation: pulse 1.5s ease-in-out infinite;
}

.list--information li.loading .date::after,
.list--information li.loading .date::before {
  display: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

/* News animation states */
.news-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.news-visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   TOOLS SECTION - Game HUD Style
======================================== */
.section--projects {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
  background: transparent;
}

.section--projects .section-tit {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(232, 93, 4, 0.5);
}

.section--projects .section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  width: 100%;
  max-width: 1100px;
}

@media screen and (min-width: 600px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }
}

/* Game Style Card */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 2rem;
  background: rgba(15, 15, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 200px; /* 固定高度 */
  clip-path: polygon(
    0 0, 
    100% 0, 
    100% calc(100% - 20px), 
    calc(100% - 20px) 100%, 
    0 100%
  ); /* 右下角切角 */
  opacity: 0;
  transform: translateY(30px);
  animation: projectReveal 0.8s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes projectReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 裝飾線條 - 左邊框 */
.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border-subtle);
  transition: all 0.3s ease;
}

/* 裝飾 - 角落標記 */
.project-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--border-subtle);
  border-right: 2px solid var(--border-subtle);
  transition: all 0.3s ease;
}

/* 背景掃描線 */
.project-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 3px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* 序號裝飾 */
.project-index {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

/* 標題 */
.project-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

/* 描述 */
.project-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
  max-width: 90%;
}

/* Hover Effects */
.project-card:hover {
  background: rgba(232, 93, 4, 0.05);
  border-color: rgba(232, 93, 4, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.project-card:hover::before {
  background: var(--accent-primary);
  width: 6px;
  box-shadow: 0 0 15px var(--accent-primary);
}

.project-card:hover .project-corner {
  border-color: var(--accent-primary);
  width: 20px;
  height: 20px;
}

.project-card:hover .project-index {
  color: rgba(232, 93, 4, 0.2);
  transform: scale(1.2);
}

.project-card:hover .project-name {
  color: var(--accent-secondary);
  transform: translateX(10px);
  text-shadow: 0 0 10px rgba(232, 93, 4, 0.5);
}

.project-card:hover .project-desc {
  color: var(--text-secondary);
  transform: translateX(10px);
}

/* Glitch animation on hover */
.project-card:hover .project-name::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  color: var(--accent-primary);
  clip: rect(0, 0, 0, 0);
  animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(10px, 9999px, 30px, 0); transform: translate(-2px, -2px); }
  20% { clip: rect(50px, 9999px, 60px, 0); transform: translate(2px, 2px); }
  40% { clip: rect(20px, 9999px, 80px, 0); transform: translate(-2px, 2px); }
  60% { clip: rect(90px, 9999px, 100px, 0); transform: translate(2px, -2px); }
  80% { clip: rect(40px, 9999px, 60px, 0); transform: translate(-2px, -2px); }
  100% { clip: rect(70px, 9999px, 90px, 0); transform: translate(2px, 2px); }
}

/* ========================================
   VIDEO SECTION
======================================== */

/* Keyframe Animations */
@keyframes slideInRotate {
  0% {
    opacity: 0;
    transform: perspective(1000px) rotateY(-15deg) translateX(-40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) rotateY(0) translateX(0) scale(1);
  }
}

@keyframes borderGlow {
  0%, 100% { border-color: #e85d04; }
  33% { border-color: #22c55e; }
  66% { border-color: #3b82f6; }
}

@keyframes scanLine {
  0% { top: -100%; }
  100% { top: 100%; }
}

.section--video {
  padding: var(--space-lg) var(--space-sm);
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

@media screen and (min-width: 769px) {
  .section--video {
    padding: var(--space-lg) var(--space-lg);
  }
}

.section-tit {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

.section-tit::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  border-radius: 2px;
}

.video-container {
  position: relative;
  padding: 0 35px;
}

@media screen and (min-width: 769px) {
  .video-container {
    padding: 0 60px;
  }
}

.video-wrapper {
  overflow: hidden;
}

.list--video {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-sm) 0;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

@media screen and (min-width: 769px) {
  .list--video {
    gap: var(--space-md);
  }
}

.list--video::-webkit-scrollbar {
  display: none;
}

/* Video cards */
.video-item {
  --neon-color: #e85d04;
  flex: 0 0 85%;
  min-width: 260px;
  scroll-snap-align: center;
  position: relative;
  animation: slideInRotate 0.7s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  will-change: transform, opacity;
}

@media screen and (min-width: 769px) {
  .video-item {
    flex: 0 0 calc(50% - var(--space-sm));
    min-width: 300px;
    scroll-snap-align: start;
  }
}

.video-item:nth-child(1) {
  --neon-color: #e85d04;
  animation-delay: 0.1s;
}

.video-item:nth-child(2) {
  --neon-color: #22c55e;
  animation-delay: 0.25s;
}

.video-item:nth-child(3) {
  --neon-color: #3b82f6;
  animation-delay: 0.4s;
}

.video-item:nth-child(4) {
  --neon-color: #a855f7;
  animation-delay: 0.55s;
}

/* Gaming glow border on hover */
.video-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-md) + 2px);
  border: 2px solid transparent;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.video-item:hover::before {
  opacity: 1;
  border-color: var(--neon-color);
  box-shadow: 0 0 20px var(--neon-color), inset 0 0 20px rgba(255,255,255,0.05);
}

/* Scan line effect */
.video-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-color), transparent);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.video-item:hover::after {
  opacity: 0.6;
  animation: scanLine 1.5s linear infinite;
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-item:hover iframe {
  transform: scale(1.02);
  border-color: var(--neon-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Corner decorations */
.video-item .corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--neon-color);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

@media screen and (min-width: 769px) {
  .video-item .corner {
    width: 16px;
    height: 16px;
  }
}

.video-item:hover .corner {
  opacity: 1;
}

.corner-tl { top: -3px; left: -3px; border-right: none; border-bottom: none; }
.corner-tr { top: -3px; right: -3px; border-left: none; border-bottom: none; }
.corner-bl { bottom: -3px; left: -3px; border-right: none; border-top: none; }
.corner-br { bottom: -3px; right: -3px; border-left: none; border-top: none; }

/* Video animation states */
.video-hidden {
  opacity: 0;
  transform: perspective(1000px) rotateY(-15deg) translateX(-30px) scale(0.95);
}

.video-visible {
  opacity: 1;
  transform: perspective(1000px) rotateY(0) translateX(0) scale(1);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation Buttons */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  color: var(--accent-primary);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

@media screen and (min-width: 769px) {
  .nav-btn {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

.nav-btn:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 25px var(--accent-glow);
}

.nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-btn.prev { left: 0; }
.nav-btn.next { right: 0; }

.slick-dots li:not(:first-child) {
  display: none !important;
}

/* ========================================
   FOOTER
======================================== */
footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg) var(--space-sm);
  background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 100%);
}

@media screen and (min-width: 769px) {
  footer {
    padding: var(--space-lg) var(--space-md);
  }
}

footer .sns-nav {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
  gap: var(--space-xs);
}

footer .sns-nav li a {
  width: 40px;
  height: 40px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

@media screen and (min-width: 769px) {
  footer .sns-nav li a {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

footer .sns-nav li a:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

footer .copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

@media screen and (min-width: 769px) {
  footer .copyright {
    font-size: 0.85rem;
  }
}

/* ========================================
   UTILITY CLASSES
======================================== */
.sp {
  display: block;
}

.pc {
  display: none;
}

@media screen and (min-width: 769px) {
  .sp {
    display: none !important;
  }
  
  .pc {
    display: block !important;
  }
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ========================================
   SCROLLBAR
======================================== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

@media screen and (min-width: 769px) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* === Selection === */
::selection {
  background: var(--accent-primary);
  color: var(--text-primary);
}
