@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #651FFF;
  --secondary-color: #7C4DFF;
  --background-light: #F8F7FC;
  --text-color: #333;
  --text-light: #666;
  --white: #FFFFFF;
  --border-color: #e0e0e0;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(97,31,255,0.2);
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-color: #A78BFA;
  --secondary-color: #8B5CF6;
  --background-light: #1a1a2e;
  --text-color: #E5E7EB;
  --text-light: #9CA3AF;
  --white: #16213E;
  --border-color: #374151;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(139,92,246,0.3);
}

[data-theme="dark"] body {
  background-color: #0f0f1e;
}

[datatheme="dark"] .tech-card-enhanced,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .feature-card {
  background: #0f3460;
}

[data-theme="dark"] .hero-animated {
  background: linear-gradient(-45deg, #1a1a2e, #16213E, #0f3460, #1a1a2e);
}

/* Melhor contraste no Hero Dark */
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero-animated h1 {
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero p,
[data-theme="dark"] .hero-animated p {
  color: #E5E7EB;
  opacity: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Cursor piscante no Dark */
[data-theme="dark"] .typing-cursor {
  color: #FFFFFF;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--white);
  color: var(--text-color);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(101, 31, 255, 0.6);
  outline-offset: 3px;
  border-radius: 10px;
}

header {
  background: var(--white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

header.scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }

nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.logo {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo { height: 2.3rem; width: auto; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  transition: color 0.3s ease;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.menu-toggle:hover { transform: scale(1.1); }

.menu-toggle.active i::before { content: "\f00d"; /* fa-times */ }

/* Botão Toggle de Tema */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--primary-color);
  transform: scale(1.1) rotate(15deg);
}

.theme-toggle i {
  position: absolute;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-toggle .fa-moon {
  color: var(--primary-color);
  opacity: 1;
  transform: rotate(0deg);
}

.theme-toggle .fa-sun {
  color: var(--white);
  opacity: 0;
  transform: rotate(180deg);
}

.theme-toggle:hover .fa-moon {
  color: var(--white);
}

[data-theme="dark"] .theme-toggle .fa-moon {
  opacity: 0;
  transform: rotate(-180deg);
}

[data-theme="dark"] .theme-toggle .fa-sun {
  opacity: 1;
  transform: rotate(0deg);
  color: #FDB813;
}

[data-theme="dark"] .theme-toggle:hover .fa-sun {
  color: #FDB813;
}

/* Transição suave entre temas */
body,
.hero,
.tech-card-enhanced,
.stat-card,
.feature-card,
header {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Progress Bar de Scroll */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(101, 31, 255, 0.5);
}

/* Hero com Gradiente Animado */
.hero-animated {
  background: linear-gradient(
    -45deg,
    #651FFF,
    #7C4DFF,
    #5E35B1,
    #512DA8
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Typing Effect */
.typing-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--white);
  font-weight: 400;
  margin-left: 4px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

#typingText {
  display: inline-block;
  min-width: 2px;
}

.hero {
  background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero h1 { font-size: 3rem; margin-bottom: 1rem; font-weight: 700; }

.hero p {
  font-size: 1.2rem;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.95;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

/* Shine Effect em Botões */
.btn-primary,
.btn-cta {
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover::before,
.btn-cta:hover::before {
  left: 100%;
}

.btn-primary { background: #fff; color: var(--primary-color); }
.btn-primary:hover { filter: brightness(0.96); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

section { padding: 5rem 0; }
section:nth-of-type(odd) { background-color: var(--background-light); }

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2.2rem;
  color: var(--primary-color);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 760px;
  margin: 0 auto 1.5rem auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.feature-card, .tech-card, .video-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover, .tech-card:hover, .video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 28px rgba(97, 31, 255, 0.15);
}

/* Tilt Effect nos Cards */
.feature-card,
.stat-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover,
.stat-card:hover {
  transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateY(-8px);
}

.feature-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }

/* Animação nos Ícones */
.feature-card i,
.stat-icon i {
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover i,
.stat-card:hover .stat-icon i {
  transform: scale(1.2) rotate(5deg);
  animation: iconPulse 0.6s ease;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1.2) rotate(5deg); }
  50% { transform: scale(1.3) rotate(-5deg); }
}

.tech-stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }

/* Cards de Tecnologias Aprimorados */
.tech-card-enhanced {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-width: 200px;
  max-width: 250px;
  flex: 1;
}

.tech-card-enhanced:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.tech-icon-wrapper {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.tech-card-enhanced:hover .tech-icon-wrapper {
  transform: scale(1.15) rotate(5deg);
}

.tech-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0.5rem 0;
  text-align: center;
}

.tech-description {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

/* Seção de Estatísticas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0.5rem 0;
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Seção CTA */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  opacity: 0.95;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-cta {
  background: var(--white);
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.btn-cta:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-ghost-cta {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.btn-ghost-cta:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Botão Voltar ao Topo */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(101, 31, 255, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

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

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(101, 31, 255, 0.5);
  background: var(--secondary-color);
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.screenshot-gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  background: #fff;
}

.screenshot-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(97, 31, 255, 0.2);
}

/* Carrossel Swiper de Screenshots */
.screenshot-swiper {
  padding: 2rem 0 4rem 0;
  position: relative;
}

.swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide picture,
.swiper-slide img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.swiper-slide picture:hover,
.swiper-slide img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(97, 31, 255, 0.2);
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--primary-color);
  background: var(--white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--primary-color);
  color: var(--white);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 20px;
  font-weight: bold;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--border-color);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--primary-color);
  width: 30px;
  border-radius: 6px;
}

[data-theme="dark"] .swiper-button-prev,
[data-theme="dark"] .swiper-button-next {
  background: var(--white);
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-actions { margin-top: 1.2rem; display: flex; justify-content: center; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 2000;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  border-radius: 12px;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

footer {
  background-color: var(--text-color);
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Animações de Entrada Avançadas */
[data-animation="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animation="fade-up"].animated {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax Suave */
.parallax {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Efeito de Brilho em Tech Cards */
.tech-card {
  position: relative;
  overflow: hidden;
}

.tech-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(101, 31, 255, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.tech-card:hover::after {
  opacity: 1;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .fade-in-section,
  .btn,
  .feature-card,
  .stat-card,
  .back-to-top {
    transition: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 65px;
    right: 0;
    background: var(--white);
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    padding: 1.5rem;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    gap: 0.5rem;
    border-left: 3px solid var(--primary-color);
  }

  .nav-links.active { transform: translateX(0); }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
  }

  .nav-links a:hover { background: var(--background-light); }

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

  .cta-actions { flex-direction: column; align-items: center; }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 720px) {
  .container { padding: 0 1.2rem; }
  .hero { padding: 4.5rem 0; }
  .hero h1 { font-size: 2.3rem; }
  .section-title { font-size: 2rem; }
  .cta-section h2 { font-size: 2rem; }
  .stat-number { font-size: 2.5rem; }
}

/* Animações de Loading */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pulse Animation para CTAs */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(101, 31, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(101, 31, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(101, 31, 255, 0); }
}

.btn-cta {
  animation: pulse 2s infinite;
}
