/**
 * HOYA8 - Layout Fix
 * 修正 Navbar 和 Hero 區塊破版問題
 */

/* ===============================
   全域 Container 統一設定
   =============================== */
.container {
  width: 100% !important;
  max-width: 1140px !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* ===============================
   HEADER & NAVBAR 修正
   =============================== */

/* Header 基本修正 */
#header {
  background: linear-gradient(135deg, rgba(26, 35, 126, 0.95) 0%, rgba(57, 73, 171, 0.95) 100%) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
  padding: 1rem 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 997 !important;
  transition: all 0.3s !important;
  height: auto !important;
}

#header .container {
  width: 100% !important;
  max-width: 1140px !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

#header .d-flex {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
}

/* Logo 區域 */
#header .logo {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
}

#header .logo a {
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

#header .logo-text {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  letter-spacing: 1px !important;
  white-space: nowrap !important;
}

/* 導航選單 */
.nav-menu {
  margin-left: auto !important;
  margin-right: 1rem !important;
}

.nav-menu ul {
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.nav-menu li {
  position: relative !important;
  margin-left: 1.5rem !important;
  white-space: nowrap !important;
}

.nav-menu li:first-child {
  margin-left: 0 !important;
}

.nav-menu a {
  display: flex !important;
  align-items: center !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.3s !important;
  white-space: nowrap !important;
  padding: 0.5rem 0 !important;
}

.nav-menu a:hover,
.nav-menu .active a {
  color: #ffc107 !important;
}

.nav-menu i {
  margin-right: 0.3rem !important;
  font-size: 1.1rem !important;
}

.nav-text {
  white-space: nowrap !important;
}

/* Header Actions (註冊按鈕) */
.header-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.header-actions .get-started-btn {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.5rem 1.5rem !important;
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
  color: #1a237e !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  transition: all 0.3s !important;
  white-space: nowrap !important;
}

.header-actions .get-started-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 25px rgba(255, 193, 7, 0.3) !important;
}

/* ===============================
   HERO 區塊修正
   =============================== */

#hero {
  width: 100% !important;
  min-height: 100vh !important;
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #5e35b1 100%) !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  padding: 120px 0 80px 0 !important;
  margin-top: 0 !important;
}

#hero .container {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 1140px !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

#hero .row {
  display: flex !important;
  align-items: center !important;
  min-height: calc(100vh - 200px) !important;
}

/* Hero 內容 */
.hero-content {
  padding: 2rem !important;
  color: #fff !important;
}

.hero-badge {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255, 193, 7, 0.1) !important;
  border: 1px solid rgba(255, 193, 7, 0.3) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 50px !important;
  margin-bottom: 1.5rem !important;
  font-size: 0.9rem !important;
  color: #ffc107 !important;
}

.hero-badge i {
  margin-right: 0.5rem !important;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-bottom: 1.5rem !important;
  color: #fff !important;
}

.hero-title .brand-highlight {
  display: block !important;
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  margin-bottom: 0.5rem !important;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem) !important;
  font-weight: 400 !important;
  margin-bottom: 1.5rem !important;
  opacity: 0.95 !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.hero-description {
  font-size: clamp(1rem, 1.5vw, 1.2rem) !important;
  line-height: 1.8 !important;
  margin-bottom: 2rem !important;
  opacity: 0.85 !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Hero 按鈕組 */
.hero-actions {
  display: flex !important;
  gap: 1rem !important;
  margin-bottom: 3rem !important;
  flex-wrap: wrap !important;
}

.hero-actions .btn-get-started,
.hero-actions .btn-learn-more {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.75rem 2rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.3s !important;
  white-space: nowrap !important;
}

.hero-actions .btn-get-started {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
  color: #1a237e !important;
}

.hero-actions .btn-learn-more {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
}

.hero-actions .btn-get-started:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 15px 35px rgba(255, 193, 7, 0.3) !important;
}

.hero-actions .btn-learn-more:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Hero 特色項目 */
.hero-features {
  display: flex !important;
  gap: 2rem !important;
  flex-wrap: wrap !important;
}

.hero-features .feature-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.95rem !important;
}

.hero-features .feature-item i {
  color: #ffc107 !important;
  font-size: 1.2rem !important;
}

/* Hero 視覺元素 */
.hero-visual {
  padding: 2rem !important;
  position: relative !important;
}

.hero-cards {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
  max-width: 400px !important;
  margin: 0 auto !important;
}

.game-card {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 20px !important;
  padding: 1.5rem !important;
  transition: all 0.3s !important;
  color: #fff !important;
}

.game-card:hover {
  transform: translateY(-5px) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

.game-card .card-icon {
  font-size: 2.5rem !important;
  margin-bottom: 1rem !important;
  color: #ffc107 !important;
}

.game-card h3 {
  font-size: 1.25rem !important;
  margin-bottom: 0.5rem !important;
  white-space: nowrap !important;
}

.game-card p {
  font-size: 0.9rem !important;
  opacity: 0.8 !important;
  margin: 0 !important;
}

/* 背景動畫 */
.hero-bg-animation {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.floating-card,
.floating-dice {
  position: absolute !important;
  opacity: 0.1 !important;
  animation: float 20s infinite ease-in-out !important;
}

/* ===============================
   響應式修正
   =============================== */

/* 平板 */
@media (max-width: 991px) {
  #header {
    padding: 0.75rem 0 !important;
  }
  
  .nav-menu {
    display: none !important;
  }
  
  .mobile-nav-toggle {
    display: block !important;
    color: #fff !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    margin-left: 1rem !important;
  }
  
  #hero {
    padding: 100px 0 60px 0 !important;
  }
  
  .hero-content {
    text-align: center !important;
    padding: 1.5rem !important;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-actions {
    justify-content: center !important;
  }
  
  .hero-features {
    justify-content: center !important;
  }
}

/* 手機 */
@media (max-width: 768px) {
  #header .logo-text {
    font-size: 1.25rem !important;
  }
  
  .header-actions .get-started-btn {
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem !important;
  }
  
  #hero {
    min-height: auto !important;
    padding: 80px 0 40px 0 !important;
  }
  
  #hero .row {
    flex-direction: column !important;
    min-height: auto !important;
  }
  
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .hero-description {
    font-size: 1rem !important;
  }
  
  .hero-actions {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .hero-actions .btn-get-started,
  .hero-actions .btn-learn-more {
    width: 100% !important;
    max-width: 250px !important;
    justify-content: center !important;
  }
  
  .hero-visual {
    margin-top: 2rem !important;
  }
}

/* 小手機 */
@media (max-width: 480px) {
  #header {
    padding: 0.5rem 0 !important;
  }
  
  #header .logo-text {
    font-size: 1.1rem !important;
  }
  
  .header-actions .get-started-btn span {
    display: none !important;
  }
  
  .header-actions .get-started-btn {
    padding: 0.4rem !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  
  .hero-title {
    font-size: 1.75rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }
  
  .hero-description {
    font-size: 0.9rem !important;
  }
  
  .hero-features {
    flex-direction: column !important;
    align-items: center !important;
  }
}

/* ===============================
   動畫
   =============================== */

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(0) rotate(-5deg);
  }
  75% {
    transform: translateY(20px) rotate(3deg);
  }
}

/* 修正溢出問題 */
body {
  overflow-x: hidden !important;
}

#main {
  position: relative !important;
  z-index: 1 !important;
}