/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f5f5fa;
  color: #1a1a2e;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

body.dark {
  background: #0f0f1a;
  color: #e0e0e8;
}

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

ul {
  list-style: none;
}

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 69, 96, 0.2);
  transition: background 0.3s, box-shadow 0.3s;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.logo svg {
  height: 40px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  color: #ccc;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #e94560;
  transition: width 0.3s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a:hover,
.nav a.active {
  color: #e94560;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dark-toggle {
  background: none;
  border: none;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}

.dark-toggle:hover {
  background: rgba(233, 69, 96, 0.2);
  color: #e94560;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ccc;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s;
}

.menu-toggle:hover {
  color: #e94560;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid rgba(233, 69, 96, 0.2);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a {
  color: #ccc;
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.3s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #e94560;
}

/* Hero Section */
.hero {
  margin-top: 64px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, #e94560 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 20px;
  color: #b0b0c0;
  max-width: 700px;
  margin: 0 auto 30px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero .btn-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero .btn {
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.hero .btn-primary {
  background: #e94560;
  color: #fff;
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

.hero .btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(233, 69, 96, 0.6);
}

.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

/* Section Common */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #e94560;
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-sub {
  text-align: center;
  color: #888;
  max-width: 600px;
  margin: 0 auto 50px;
  font-size: 16px;
}

body.dark .section-sub {
  color: #aaa;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s, box-shadow 0.4s, background 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

body.dark .card {
  background: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.1);
}

body.dark .card:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
}

.card-icon svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  display: block;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.card p {
  color: #666;
  font-size: 15px;
}

body.dark .card p {
  color: #aaa;
}

/* Team Member */
.team-member {
  text-align: center;
}

.team-member .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e94560, #0f3460);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  font-weight: bold;
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-member:hover .avatar {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.3);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e94560;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: #e94560;
  border-radius: 50%;
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-item:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 16px rgba(233, 69, 96, 0.5);
}

.timeline-item h4 {
  font-size: 20px;
  margin-bottom: 4px;
}

.timeline-item span {
  color: #888;
  font-size: 14px;
}

body.dark .timeline-item span {
  color: #aaa;
}

/* Carousel */
.carousel {
  overflow: hidden;
  position: relative;
  border-radius: 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel-slide {
  min-width: 100%;
  padding: 20px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(233, 69, 96, 0.8);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #e94560;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px 0;
}

body.dark .faq-item {
  border-color: rgba(255, 255, 255, 0.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  padding: 8px 0;
  transition: color 0.3s;
}

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

.faq-question span {
  font-size: 22px;
  transition: transform 0.3s;
  line-height: 1;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 20px;
  color: #666;
}

body.dark .faq-answer {
  color: #aaa;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 12px 20px;
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
}

/* Footer */
.footer {
  background: #0f0f1a;
  color: #aaa;
  padding: 60px 0 30px;
}

.footer .grid-4 {
  gap: 30px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 18px;
}

.footer a {
  color: #aaa;
  display: block;
  margin-bottom: 8px;
  transition: color 0.3s, padding-left 0.3s;
}

.footer a:hover {
  color: #e94560;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.count-up {
  font-size: 48px;
  font-weight: 800;
  color: #e94560;
  display: inline-block;
}

/* Search Box */
.search-box {
  display: flex;
  max-width: 400px;
  margin: 0 auto 40px;
}

.search-box input {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 50px 0 0 50px;
  outline: none;
  font-size: 16px;
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
}

body.dark .search-box input {
  background: #1a1a2e;
  border-color: #333;
  color: #e0e0e8;
}

.search-box input:focus {
  border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.search-box button {
  padding: 12px 24px;
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.search-box button:hover {
  background: #d63851;
}

/* Back to Top */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(233, 69, 96, 0.6);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d63851;
}

/* HowTo Section */
#howto .card h3 {
  margin-top: 20px;
}

#howto .card ol {
  padding-left: 20px;
  color: #666;
}

body.dark #howto .card ol {
  color: #aaa;
}

#howto .card ol li {
  margin-bottom: 8px;
}

/* Contact Section */
#contact .card p {
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 992px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero .btn {
    padding: 12px 30px;
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-sub {
    font-size: 14px;
    margin-bottom: 30px;
  }

  section {
    padding: 60px 0;
  }

  .card {
    padding: 20px;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline-item::before {
    left: -22px;
    width: 10px;
    height: 10px;
  }

  .footer .grid-4 {
    gap: 20px;
  }

  .back-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .hero .btn {
    width: 100%;
    max-width: 280px;
  }

  .section-title {
    font-size: 24px;
  }

  .section-title::after {
    width: 40px;
  }

  .card h3 {
    font-size: 20px;
  }

  .card p {
    font-size: 14px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    gap: 20px;
  }

  .faq-question {
    font-size: 15px;
  }

  .count-up {
    font-size: 36px;
  }
}

/* Dark mode specific adjustments */
body.dark .hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #12122e 50%, #0a1a3a 100%);
}

body.dark .hero::before {
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.2) 0%, transparent 60%);
}

body.dark .search-box input:focus {
  border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

/* Smooth scroll for the whole page */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  .header,
  .back-top,
  .carousel-btn,
  .dark-toggle,
  .menu-toggle,
  .mobile-nav {
    display: none !important;
  }

  .hero {
    margin-top: 0;
    padding: 40px 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body.dark .card {
    border-color: #555;
  }
}