body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* background: #9a01fe; */
  background-color: #160720;
  color: #fff;
}

/* Navbar Styles */
.navbar {
  background: #22142b;
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.navbar-brandwrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}
.navbar-download {
  background-color: #9a01fe;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: #fff;
  text-decoration: none;
}
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand:hover {
  color: #9a01fe;
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  align-self: center;
}

.navbar-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
  position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: #9a01fe;
}

.navbar-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #9a01fe;
}

/* Dropdown Menu Styles */
.navbar-menu .has-dropdown {
  position: relative;
}

.navbar-menu .has-dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.has-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #2a1a35;
  border-radius: 8px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 200px;
  list-style: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background: rgba(154, 1, 254, 0.2);
  color: #9a01fe;
  padding-left: 1.5rem;
}

.dropdown-menu a.active {
  background: rgba(154, 1, 254, 0.15);
  color: #9a01fe;
}

.dropdown-menu a.active::after {
  display: none;
}

.navbar-lang-switcher {
  padding: 0.4rem 1rem;
  background: #9a01fe;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.navbar-lang-switcher:hover {
  background: #7a01ce;
}

/* 漢堡選單按鈕 */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.navbar-toggle-icon {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggle.active .navbar-toggle-icon:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle.active .navbar-toggle-icon:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active .navbar-toggle-icon:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .navbar-brandwrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* 顯示漢堡選單按鈕 */
  .navbar-toggle {
    display: flex;
  }
  
  /* 預設隱藏選單 */
  .navbar-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background: #22142b;
    padding: 1rem 0;
    margin-top: 1rem;
    border-radius: 8px;
  }
  
  /* 選單展開時顯示 */
  .navbar-menu.active {
    display: flex;
  }
  
  .navbar-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navbar-menu li:last-child {
    border-bottom: none;
  }
  
  .navbar-menu a {
    display: block;
    padding: 1rem 1.5rem;
    width: 100%;
  }
  
  .navbar-menu a.active::after {
    display: none;
  }
  
  .navbar-menu a.active {
    background: rgba(154, 1, 254, 0.1);
  }
  
  /* 手機版下拉選單樣式 */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(42, 26, 53, 0.5);
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .has-dropdown.active .dropdown-menu {
    max-height: 500px;
  }
  
  .dropdown-menu a {
    padding: 0.75rem 2.5rem;
    font-size: 0.85rem;
  }
  
  .dropdown-menu a:hover {
    padding-left: 3rem;
  }
  
  .has-dropdown > a {
    justify-content: space-between;
  }
  
  .dropdown-arrow {
    margin-left: auto;
  }
}

[dir="ltr"] body {
  text-align: left;
}

[dir="rtl"] body {
  text-align: right;
}

.hero, footer, #faq h2 {
  text-align: center;
}

.hero {
  padding: 2rem 1rem;
  background-image: url("../assets/images/geometric-intersection.svg");
  background-size: cover;
  background-position: center;
  color: #111;
}

img {
  width: 100%;
  height: auto;
  max-width: 680px;
  border-radius: 8px;
}

h1 {
  font-size: 1.6rem;
  margin: 1rem 0 0.5rem;
  font-weight: 900;
}

p.subtitle {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.download-buttons a img {
  height: 60px;
  width: auto;
  max-width: none;
  display: block;
}

.download-buttons a {
  display: inline-block;
  flex-shrink: 0;
}

.demo-game-container {
  margin-top: 1rem;
  text-align: center;
}

.demo-game-button {
  color: #fff;
  text-decoration: underline;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.demo-game-button:hover {
  color: #ddd;
}

footer {
  background: #111;
  padding: 1rem;
  font-size: 0.8rem;
  color: #aaa;
}

.social {
  margin: 0.5rem 0;
}

.social a {
  margin: 0 0.5rem;
  color: #aaa;
  text-decoration: none;
}

.keywords {
  background: #181818;
  padding: 1rem;
  font-size: 0.75rem;
  color: #bbb;
}

.keywords a {
  margin: 0 0.5rem;
  color: #bbb;
  text-decoration: underline;
}

.age-note {
  font-size: 0.7rem;
  color: #999;
  margin-top: 1rem;
}

.footer-badges {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.footer-badges img {
  width: 100%;
  height: auto;
}

.footer-description {
  max-width: 680px;
  margin: 1rem auto;
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.5;
}

#testimonials, #faq, .game-providers, #additionalIntro {
  padding: 3rem 1rem;
}

#additionalIntro {
  background: #111111;
}

.additionalIntroContent {
  max-width: 680px;
  margin: 0 auto;
}

#additionalIntro h2 {
  font-size: 1.6rem;
  margin: 1rem 0 0.5rem;
}

#additionalIntro p {
  font-size: 1rem;
  color: #ddd;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

#additionalIntro a {
  color: #6580f9;
  text-decoration: underline;
}

.gallery {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.gallery picture {
  flex: 1;
}

.imageDescription {
  font-size: .75rem;
  color: #ddd
}

.language-switcher {
  margin-bottom: 1rem;
}

.language-switcher a {
  color: #fff;
  text-decoration: underline;
  font-weight: bold;
}

#faq {
  background: #2a2a2a;
}

.faq-container {
  max-width: 680px;
  margin: 0 auto;
}

[dir="ltr"] .faq-container {
  text-align: left;
}

[dir="rtl"] .faq-container {
  text-align: right;
}

#faq h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.faq-item {
  border-bottom: 1px solid #444;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.faq-question {
  background: none;
  border: none;
  color: #fff;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}

[dir="ltr"] .faq-question {
  text-align: left;
}

[dir="rtl"] .faq-question {
  flex-direction: row-reverse;
}

.faq-question:hover {
  color: #ddd;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer p {
  margin: 0.8rem 0 0 0;
  color: #ccc;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1rem;
}

.faq-item a {
  color: #6580f9;
  text-decoration: underline;
}

#testimonials {
  background: #1c1c1c;
  text-align: center;
}

.testimonials-container {
  max-width: 960px;
  margin: 0 auto;
}

#testimonials h2 {
  margin-bottom: 1.5rem;
}

.testimonials-grid {
  column-count: 3;
  column-gap: 1.5rem;
}

@media (max-width: 960px) {
  .testimonials-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .testimonials-grid {
    column-count: 1;
  }
}

.testimonial-card {
  background: #2a2a2a;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  border: 1px solid #444;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}


.testimonial-card::before {
  content: '“';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.05);
  font-weight: 900;
  z-index: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 1rem;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.testimonial-card cite {
  font-style: normal;
  font-weight: bold;
  color: #fff;
  margin-bottom: 0.25rem;
}

.author-level {
  font-size: 0.8rem;
  color: #9a01fe;
  font-weight: 500;
}

.testimonial-card p {
  margin: 0;
  color: #ddd;
  line-height: 1.6;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.testimonial-link {
  text-decoration: none;
  color: inherit;
  display: block;
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.testimonial-link:nth-child(n+4) {
  display: none;
}

.testimonial-link.visible {
  display: block;
}

.testimonial-link:hover .testimonial-card {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(154, 1, 254, 0.3);
}

.testimonials-more-button-container {
  text-align: center;
  margin-top: 2rem;
}

#load-more-testimonials {
  background: #9a01fe;
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

#load-more-testimonials:hover {
  background: #7a01ca;
  transform: scale(1.05);
}

.testimonial-card cite {
  font-style: normal;
  font-weight: bold;
  color: #9a01fe;
  align-self: flex-end;
  position: relative;
  z-index: 1;
}

.game-providers {
  background-color: #1c1c1c;
}

.game-providers h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #fff;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  align-items: center;
}

.provider-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.providers-grid img {
  max-width: 100%;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  padding: 0.5rem;
  box-sizing: border-box;
  width: 100%;
}

.provider-item span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

/* Content Page Styles */
.content-page {
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background: #0c0c0c;
  min-height: 60vh;
}

.content-page h1 {
  color: #ffffff;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #fff;
  font-weight: 900;
}

.content-page h2 {
  font-size: 1.8rem;
  margin: 1rem 0 1rem;
  color: #ffffff;
  font-weight: 700;
  border-left: 4px solid #9a01fe;
  padding-left: 1rem;
}

.content-page h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: #fff;
  font-weight: 600;
}

.content-page p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #ddd;
}

.content-page ul, .content-page ol {
  margin: 1rem 0 1.5rem 2rem;
  line-height: 1.8;
}

.content-page li {
  margin-bottom: 0.5rem;
  color: #ddd;
}

.content-page a {
  color: #9a01fe;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.content-page a:hover {
  color: #7a01ce;
  text-decoration: underline;
}

.content-page strong {
  color: #fff;
  font-weight: 700;
}

.content-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(154, 1, 254, 0.2);
}

.content-section:hover {
  border-color: rgba(154, 1, 254, 0.4);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .content-page {
    padding: 2rem 1rem;
  }
  
  .content-page h1 {
    font-size: 2rem;
  }
  
  .content-page h2 {
    font-size: 1.5rem;
  }
  
  .content-page h3 {
    font-size: 1.2rem;
  }
  
  .content-section {
    padding: 1.5rem;
  }
}