/* Replicating exact design from TSX version with vibrant colors, animations, and modern styling */

/* CSS Variables - Matching globals.css from TSX version */
:root {
  /* Cores principais - tema vibrante e moderno */
  --background: oklch(0.99 0.005 264);
  --foreground: oklch(0.15 0.02 264);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.15 0.02 264);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.15 0.02 264);

  /* Roxo vibrante como cor primária */
  --primary: oklch(0.55 0.25 290);
  --primary-foreground: oklch(0.99 0.005 264);

  /* Verde esmeralda como acento */
  --secondary: oklch(0.45 0.15 165);
  --secondary-foreground: oklch(0.99 0.005 264);

  --muted: oklch(0.96 0.01 264);
  --muted-foreground: oklch(0.5 0.02 264);

  /* Acento rosa/magenta */
  --accent: oklch(0.65 0.22 330);
  --accent-foreground: oklch(0.99 0.005 264);

  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.99 0.005 264);

  --border: oklch(0.9 0.01 264);
  --input: oklch(0.95 0.01 264);
  --ring: oklch(0.55 0.25 290);

  --radius: 0.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Dark mode */
.dark {
  --background: oklch(0.12 0.02 264);
  --foreground: oklch(0.98 0.005 264);

  --card: oklch(0.15 0.02 264);
  --card-foreground: oklch(0.98 0.005 264);

  --popover: oklch(0.15 0.02 264);
  --popover-foreground: oklch(0.98 0.005 264);

  --primary: oklch(0.65 0.25 290);
  --primary-foreground: oklch(0.12 0.02 264);

  --secondary: oklch(0.5 0.15 165);
  --secondary-foreground: oklch(0.98 0.005 264);

  --muted: oklch(0.2 0.02 264);
  --muted-foreground: oklch(0.65 0.02 264);

  --accent: oklch(0.7 0.22 330);
  --accent-foreground: oklch(0.12 0.02 264);

  --destructive: oklch(0.6 0.245 27.325);
  --destructive-foreground: oklch(0.98 0.005 264);

  --border: oklch(0.25 0.02 264);
  --input: oklch(0.2 0.02 264);
  --ring: oklch(0.65 0.25 290);
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header - Fixed with backdrop blur */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-foreground);
}

.logo-text {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  height: 3.5rem;
}

/* Main */
.main {
  padding-top: 4rem;
  min-height: 100vh;
}

/* Hero Section */
.hero {
  padding: 8rem 1rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}

.hero-blob-1 {
  top: 5rem;
  left: 2.5rem;
  width: 18rem;
  height: 18rem;
  background: var(--primary);
  opacity: 0.2;
  animation: float 3s ease-in-out infinite;
}

.hero-blob-2 {
  bottom: 5rem;
  right: 2.5rem;
  width: 24rem;
  height: 24rem;
  background: var(--accent);
  opacity: 0.2;
  animation: float 3s ease-in-out infinite;
  animation-delay: 1s;
}

.hero-blob-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 37.5rem;
  height: 37.5rem;
  background: var(--secondary);
  opacity: 0.1;
}

.hero-content {
  text-align: center;
  max-width: 72rem;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.hero-gradient-text {
  background: linear-gradient(to right, var(--primary), var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--muted-foreground);
  max-width: 48rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
}

.stat-card {
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Services Section */
.services-section {
  padding: 5rem 1rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--card-foreground);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon-wrapper {
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* How It Works */
.how-it-works {
  padding: 5rem 1rem;
  background: color-mix(in oklch, var(--muted) 30%, transparent);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.step-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.step-card:hover {
  border-color: var(--primary);
}

.step-number {
  position: absolute;
  top: -1rem;
  right: -1rem;
  font-size: 5rem;
  font-weight: 700;
  color: color-mix(in oklch, var(--primary) 5%, transparent);
  transition: all 0.3s;
}

.step-card:hover .step-number {
  color: color-mix(in oklch, var(--primary) 10%, transparent);
}

.step-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.step-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.balance-card {
  text-align: center;
  padding: 2rem;
}

.balance-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.balance-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
}

/* Auth Pages */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 4rem);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 28rem;
}

.auth-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--card-foreground);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  font-size: 1rem;
  background: var(--background);
  color: var(--foreground);
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 20%, transparent);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Messages */
.message {
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  margin: 1rem 0;
  font-size: 0.875rem;
}

.error-message {
  background: color-mix(in oklch, var(--destructive) 10%, transparent);
  color: var(--destructive);
  border: 1px solid color-mix(in oklch, var(--destructive) 20%, transparent);
}

.success-message {
  background: color-mix(in oklch, var(--secondary) 10%, transparent);
  color: var(--secondary);
  border: 1px solid color-mix(in oklch, var(--secondary) 20%, transparent);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--muted);
}

/* Status Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-pending {
  background: color-mix(in oklch, var(--accent) 20%, transparent);
  color: var(--accent);
}

.badge-completed {
  background: color-mix(in oklch, var(--secondary) 20%, transparent);
  color: var(--secondary);
}

.badge-failed {
  background: color-mix(in oklch, var(--destructive) 20%, transparent);
  color: var(--destructive);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: fadeIn 0.3s ease-out;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--muted);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

/* Footer */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 3rem 1rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Loading States */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted-foreground);
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary);
}
.text-secondary {
  color: var(--secondary);
}
.text-accent {
  color: var(--accent);
}
.text-muted {
  color: var(--muted-foreground);
}

.bg-primary {
  background: var(--primary);
}
.bg-secondary {
  background: var(--secondary);
}
.bg-accent {
  background: var(--accent);
}
.bg-muted {
  background: var(--muted);
}

.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}

.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}

.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}

.rounded {
  border-radius: var(--radius);
}
.rounded-full {
  border-radius: 9999px;
}

.shadow {
  box-shadow: var(--shadow);
}
.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.transition {
  transition: all 0.2s;
}
