* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "微軟正黑體", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 45px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  z-index: 1001;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
}

.mobile-menu-toggle:focus {
  outline: none;
}

/* Hamburger Animation */
.hamburger {
  width: 25px;
  height: 3px;
  background-color: white;
  display: block;
  position: relative;
  transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: "";
  width: 25px;
  height: 3px;
  background-color: white;
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.mobile-menu-toggle.active .hamburger {
  background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  margin-top: 80px;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-content {
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  padding: 3rem;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  transition: transform 0.3s, box-shadow 0.3s;
  font-weight: bold;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Hero reduced height for other pages */
.hero.reduced {
  height: 50vh;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section {
  margin-bottom: 4rem;
}

.section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
}

.section h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #444;
}

.section p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #666;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card i {
  font-size: 4rem;
  color: #667eea;
  margin-bottom: 1.5rem;
  display: block;
  transition: all 0.3s ease;
}

.service-card:hover i {
  color: #764ba2;
  transform: scale(1.1);
}

.service-card h3 {
  color: #333;
  margin-bottom: 1rem;
}

.service-card p {
  color: #666;
}

/* Features Section */
.features {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 4rem 2rem;
  margin: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-item {
  text-align: center;
  padding: 2rem;
}

.feature-item i {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.feature-item h3 {
  margin-bottom: 1rem;
  color: #333;
}

.feature-item p {
  color: #666;
}

/* About Content */
.about-content {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

/* Contact Content */
.contact-content {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info {
  margin-bottom: 2rem;
}

.contact-info h3 {
  color: #333;
  margin-bottom: 1rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: #667eea;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Privacy Policy Content */
.privacy-content {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.privacy-content h2 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #667eea;
}

.privacy-content h3 {
  color: #444;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 4px solid #667eea;
}

.privacy-content h4 {
  color: #555;
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.privacy-content ul {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.privacy-content li {
  margin-bottom: 0.5rem;
  color: #666;
}

.privacy-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #666;
}

.privacy-content strong {
  color: #333;
}

.contact-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border-left: 5px solid #667eea;
}

.contact-box h4 {
  color: #333;
  margin-bottom: 1rem;
}

.contact-box p {
  margin-bottom: 0.5rem;
  color: #555;
}

.contact-box a {
  color: #667eea;
  text-decoration: none;
  font-weight: bold;
}

.contact-box a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.footer p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer a {
  color: #667eea;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Mobile Styles and Animations */
@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    top: 0;
    padding: 0.8rem 0;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .nav-menu.active {
    left: 0;
    animation: fadeIn 0.3s ease;
  }

  .nav-menu li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }

  .nav-menu.active li {
    animation: slideInUp 0.3s ease forwards;
  }

  .nav-menu.active li:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-menu.active li:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-menu.active li:nth-child(3) {
    animation-delay: 0.3s;
  }
  .nav-menu.active li:nth-child(4) {
    animation-delay: 0.4s;
  }
  .nav-menu.active li:nth-child(5) {
    animation-delay: 0.5s;
  }

  .nav-menu a {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    display: block;
    text-align: center;
    border-radius: 10px;
    min-width: 200px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
  }

  .nav-menu a:hover,
  .nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .services-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 2rem 1rem;
  }

  .privacy-content {
    padding: 2rem;
  }

  .privacy-content h2 {
    font-size: 1.8rem;
  }

  .privacy-content h3 {
    font-size: 1.3rem;
  }
}

/* Medium screens */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-menu {
    gap: 1.5rem;
  }

  .nav-menu a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}
