:root {
  --primary-color: #ff5a5f; /* Vibrant Red/Pink */
  --secondary-color: #00a699; /* Teal */
  --text-color: #333;
  --bg-color: #ffffff;
  --light-bg: #f7f7f7;
  --dark-bg: #222;
  --white: #ffffff;
  --font-main: "Noto Sans TC", "Inter", sans-serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary:hover {
  background: #e04e53;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 90, 95, 0.3);
}

.lang-btn {
  background: none;
  border: 1px solid var(--text-color);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.9rem;
}

.lang-btn:hover {
  background: var(--text-color);
  color: var(--white);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 120px 0 100px;
  background-color: #fffbfb;
  background-image: linear-gradient(
      rgba(229, 229, 247, 0.5) 2px,
      transparent 2px
    ),
    linear-gradient(90deg, rgba(229, 229, 247, 0.5) 2px, transparent 2px),
    linear-gradient(rgba(229, 229, 247, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 229, 247, 0.3) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--dark-bg);
}

.hero-text p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2.5rem;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  padding: 1rem;
  border-radius: 12px;
}

.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-store {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--dark-bg);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background: #000;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

/* Phone Mockup */
.phone-mockup {
  width: 300px;
  height: 600px;
  background: #fff;
  border-radius: 40px;
  border: 12px solid #333;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  /* Safari fix for overflow clipping */
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.screen {
  width: 100%;
  height: 100%;
  background: #f0f4f8;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  /* Safari fix for overflow clipping */
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f4f8;
    position: relative;
    overflow: hidden;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.5s ease;
    pointer-events: none;
    z-index: 5;
}

.map-placeholder.highlighting::before {
    background: rgba(0, 0, 0, 0.25);
}


.map-park {
  position: absolute;
  background-color: #d6e8d6;
  border-radius: 4px;
}

.map-water {
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 40px;
  background-color: #aadaff;
  transform: rotate(-15deg);
}

.map-road-h {
  position: absolute;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.map-road-v {
  position: absolute;
  top: 0;
  height: 100%;
  width: 10px;
  background-color: #ffffff;
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.05);
}

.user-location {
  position: absolute;
  top: 45%;
  left: 48%;
  width: 16px;
  height: 16px;
  background-color: #4285f4;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 20;
}

.user-location::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: 30px;
  height: 30px;
  background-color: rgba(66, 133, 244, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.pin {
  position: absolute;
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: bounce 2s infinite;
  font-size: 1.1rem;
  z-index: 10;
}

.pin > div {
  transform: rotate(45deg);
}

.pin-1 {
  top: 30%;
  left: 20%;
  background: #ff5a5f;
  animation-delay: 0s;
}
.pin-2 {
  top: 50%;
  left: 60%;
  background: #00a699;
  animation-delay: 0.5s;
}
.pin-3 {
  top: 20%;
  left: 70%;
  background: #fc642d;
  animation-delay: 1s;
}
.pin-4 {
  top: 70%;
  left: 30%;
  background: #484848;
  animation-delay: 1.5s;
}

@keyframes bounce {
  0%,
  100% {
    transform: rotate(-45deg) translateY(0);
  }
  50% {
    transform: rotate(-45deg) translateY(-10px);
  }
}

/* Floating Activity Card Styles (Redesigned Bottom Sheet) */
.bottom-sheet {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 16px;
  z-index: 100;
  pointer-events: none;
}

.bottom-sheet.active {
  pointer-events: all;
}

.bottom-sheet-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 20px;
  transform: translateY(120%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy spring effect */
  box-shadow: 0 10px 40px rgba(255, 90, 95, 0.35); /* Colorful glow effect */
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.bottom-sheet.active .bottom-sheet-content {
  transform: translateY(0);
}

.bottom-sheet-handle {
  display: none; /* Hide handle for floating card style */
}

.bottom-sheet-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.activity-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
  border-radius: 12px;
  flex-shrink: 0;
  color: var(--dark-bg);
}

.activity-header-text {
  flex: 1;
  padding-top: 2px;
}

.activity-header-text h3 {
  font-size: 1.1rem;
  margin: 0 0 4px 0;
  color: var(--dark-bg);
  line-height: 1.3;
}

.activity-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: #666;
}

.activity-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.bottom-sheet-footer {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.btn-join {
  width: auto;
  min-width: 140px;
  background: linear-gradient(135deg, var(--primary-color), #ff385c);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 50px; /* Pill shape */
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-main);
  box-shadow: 0 4px 15px rgba(255, 90, 95, 0.4);
}

.btn-join:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 90, 95, 0.6);
}

.btn-join:active {
  transform: translateY(0) scale(0.98);
}

/* Make pins clickable */
.pin {
  cursor: pointer;
  transition: all 0.4s ease;
}

.pin:hover {
  transform: rotate(-45deg) translateY(-5px) scale(1.1);
  filter: brightness(1.1);
}

/* Active pin state during rotation */
.pin.active {
  transform: rotate(-45deg) translateY(-8px) scale(1.2);
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  z-index: 15;
}

/* Bouncing pin animation when sheet hides */
.pin.bouncing {
  animation: pinBounce 0.6s ease;
}

@keyframes pinBounce {
  0%, 100% {
    transform: rotate(-45deg) translateY(-8px) scale(1.2);
  }
  25% {
    transform: rotate(-45deg) translateY(-16px) scale(1.3);
  }
  50% {
    transform: rotate(-45deg) translateY(-8px) scale(1.2);
  }
  75% {
    transform: rotate(-45deg) translateY(-12px) scale(1.25);
  }
}




/* Features Section */
.features {
  padding: 100px 0;
  background: var(--white);
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 20px;
  transition: var(--transition);
}

.feature-card:hover {
  background: var(--light-bg);
  transform: translateY(-5px);
}

.feature-card .icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark-bg);
}

.feature-card p {
  color: #666;
}

/* Scenarios Section */
.scenarios {
  padding: 100px 0;
  background-color: #f8f9fa;
}

.scenarios h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  color: var(--dark-bg);
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.scenario-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  background: var(--white);
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.scenario-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

.scenario-item.reverse {
  flex-direction: row-reverse;
}

.scenario-text {
  flex: 1;
}

.scenario-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.scenario-text p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.8;
}

.scenario-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
  padding: 1rem;
  border-radius: 20px;
  overflow: hidden;
}

.scenario-visual img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.scenario-item:hover .scenario-visual img {
  transform: scale(1.02);
}

/* About Section */
.about {
  padding: 100px 0;
  background: var(--light-bg);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.about p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 3rem;
}

.company-info {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.company-info h3 {
  margin-bottom: 1rem;
  color: var(--dark-bg);
}

.company-info p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #aaa;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.copyright {
  color: #666;
  font-size: 0.8rem;
  margin-top: 2rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px; /* Visual adjustment for text arrow */
  line-height: 1;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #e04e53;
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Active Nav Link */
.nav-links a.active {
  color: var(--primary-color);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    position: relative;
    z-index: 1001;
  }

  .mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-bg);
    margin: 5px 0;
    transition: var(--transition);
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .navbar .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    background: var(--white);
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    align-items: flex-start;
    padding-left: 2rem;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding-top: 2rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text p {
    margin: 0 auto 2rem;
  }

  .cta-group {
    justify-content: center;
  }

  .phone-mockup {
    width: 260px;
    height: 520px;
  }

  .scenario-item,
  .scenario-item.reverse {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 2rem;
  }

  .scenario-text h3 {
    font-size: 1.5rem;
  }
}
