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

:root {
  --bg-gradient-start: #0a0e27;
  --bg-gradient-mid: #0f1a3d;
  --bg-gradient-end: #071428;
  --card-bg: rgba(15, 26, 61, 0.6);
  --card-border: rgba(100, 180, 255, 0.15);
  --accent-blue: #3b82f6;
  --accent-cyan: #22d3ee;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --accent-cyan-glow: rgba(34, 211, 238, 0.4);
  --text-primary: #f0f6ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.4);
  --warning: #f59e0b;
  --danger: #ef4444;
  --input-bg: rgba(30, 41, 82, 0.8);
  --input-border: rgba(100, 180, 255, 0.25);
  --input-focus-border: var(--accent-cyan);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated background particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(34, 211, 238, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0 50px;
  animation: fadeInUp 0.8s ease-out;
}

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

.hero-title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-title .domain {
  color: var(--text-primary);
}

.hero-title .ar {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.7;
}

.hero-subtitle strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Main Input Section */
.income-section {
  padding: 20px 0 32px;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
  position: relative;
}

.income-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 24px;
  font-size: 2rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
}

/* USD Input styling */
.income-input-wrapper.usd-input .currency-symbol {
  color: #22c55e;
}

.income-input-wrapper.usd-input #income-input {
  border-color: rgba(34, 197, 94, 0.4);
}

.income-input-wrapper.usd-input #income-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2), 0 8px 32px rgba(34, 197, 94, 0.15);
}

/* ARS Input styling */
.ars-input .currency-symbol {
  color: var(--accent-blue);
}

.ars-input .deduction-input {
  border-color: rgba(59, 130, 246, 0.4);
}

.ars-input .deduction-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 8px 32px rgba(59, 130, 246, 0.15);
}

/* Currency tag (flag + currency code) */
.currency-tag {
  position: absolute;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  pointer-events: none;
  z-index: 2;
}

.currency-tag .flag {
  font-size: 1.3rem;
}

.currency-tag.usd {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.currency-tag.ars {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

#income-input {
  width: 100%;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: 16px;
  padding: 24px 130px 24px 60px;
  font-size: clamp(2rem, 6vw, 3rem);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.3s ease;
  text-align: left;
}

#income-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

#income-input:focus {
  outline: none;
}

/* Exchange rate reference */
.exchange-rate-reference {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.exchange-rate-reference strong {
  color: var(--text-secondary);
}

.exchange-rate-reference .rate-source {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Regime Comparison */
.regimes-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.regime-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.regime-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.regime-card.recommended {
  border-color: var(--success);
  transform: scale(1.02);
  box-shadow: 0 0 40px var(--success-glow), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.regime-card.recommended::before {
  background: var(--success);
  opacity: 1;
}

.regime-card.not-recommended {
  opacity: 0.6;
  transform: scale(0.98);
}

.regime-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.regime-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.regime-badge {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--success);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.regime-card.recommended .regime-badge {
  display: flex;
}

.regime-badge svg {
  width: 14px;
  height: 14px;
}

.regime-percentage-wrapper {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.regime-percentage {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.regime-percentage-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.regime-card.recommended .regime-percentage {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  -webkit-background-clip: text;
  background-clip: text;
}

.regime-card.not-recommended .regime-percentage {
  background: linear-gradient(135deg, var(--text-muted), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
}

.regime-tax-amount {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.regime-tax-amount strong {
  color: var(--text-primary);
}

.regime-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.regime-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.regime-detail-row:last-child {
  margin-bottom: 0;
}

.regime-detail-row span:last-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.regime-not-eligible {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Deductions Section */
.deductions-section {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 32px;
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
  position: relative;
  transition: border-color 0.3s ease;
}

.deductions-section::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0.5;
}

.deductions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.deductions-title-area {
  flex: 1;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent-cyan);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section-subtitle strong {
  color: var(--accent-blue);
}

.deductions-link-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
  transition: all 0.3s ease;
}

.deductions-link-badge svg {
  width: 14px;
  height: 14px;
}

.deductions-link-badge.active {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.deductions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deduction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(30, 41, 82, 0.4);
  border-radius: 16px;
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.deduction-row:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(30, 41, 82, 0.6);
}

.deduction-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.deduction-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
}

.deduction-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.deduction-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.deduction-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.deduction-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 280px;
  display: flex;
  align-items: center;
}

.deduction-input {
  width: 100%;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: 12px;
  padding: 14px 100px 14px 40px;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.deduction-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.deduction-input:focus {
  outline: none;
}

/* Deduction input currency tag */
.deduction-input-wrapper .currency-tag {
  right: 10px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.deduction-input-wrapper .currency-tag .flag {
  font-size: 1.1rem;
}

/* Results Table */
.results-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 32px;
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.results-table th,
.results-table td {
  padding: 16px 20px;
  text-align: left;
}

.results-table thead th {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results-table thead th:first-child {
  border-radius: 12px 0 0 12px;
}

.results-table thead th:last-child {
  border-radius: 0 12px 12px 0;
  text-align: right;
}

.results-table tbody tr {
  border-bottom: 1px solid var(--card-border);
}

.results-table tbody td {
  color: var(--text-primary);
  font-size: 1rem;
}

.results-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
  font-family: 'Outfit', monospace;
}

.results-table tbody tr.highlight {
  background: rgba(16, 185, 129, 0.1);
}

.results-table tbody tr.highlight td {
  color: var(--success);
  font-weight: 600;
}

.results-table tbody tr.taxes {
  background: rgba(239, 68, 68, 0.08);
}

.results-table tbody tr.taxes td {
  color: var(--danger);
}

.results-table tbody tr.total {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.1));
}

.results-table tbody tr.total td {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.percentage-tag {
  display: inline-block;
  background: rgba(100, 180, 255, 0.15);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-left: 10px;
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.cta-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  padding: 16px 32px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px var(--accent-glow);
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px var(--accent-glow), 0 0 60px var(--accent-cyan-glow);
}

.cta-button svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-blue);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 24px 16px 48px;
  }

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

  .income-section {
    padding: 16px 0 24px;
  }

  .regimes-section {
    grid-template-columns: 1fr;
  }

  .regime-card.recommended,
  .regime-card.not-recommended {
    transform: none;
  }

  .deductions-header {
    flex-direction: column;
    gap: 12px;
  }

  .deductions-link-badge {
    align-self: flex-start;
  }

  .deduction-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .deduction-info-left {
    justify-content: flex-start;
  }

  .deduction-input-wrapper {
    max-width: none;
  }

  .results-table th,
  .results-table td {
    padding: 12px 14px;
  }

  .exchange-rate-reference {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
}

/* Animations */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--success-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--success-glow), 0 0 60px var(--success-glow);
  }
}

.regime-card.recommended {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Number formatting animation */
.value-transition {
  transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-gradient-start);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

