/* ─── Comparison Page ─────────────────────────── */

/* Rival Selector */
.rival-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rival-selector::-webkit-scrollbar { display: none; }

.rival-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 10px;
  color: var(--silver);
  font-family: var(--font-jakarta);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.rival-btn:hover {
  border-color: var(--fog);
  color: var(--chalk);
  transform: translateY(-1px);
}
.rival-btn:active {
  transform: scale(0.96);
}
.rival-btn.active {
  background: var(--acid);
  color: var(--void);
  border-color: var(--acid);
}
.rival-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Plan Badges */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-family: var(--font-geist);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}
.plan-badge.badge-free {
  background: rgba(72, 187, 120, 0.12);
  color: #48BB78;
  border: 1px solid rgba(72, 187, 120, 0.2);
}
.plan-badge.badge-premium {
  background: rgba(202, 255, 71, 0.1);
  color: var(--acid);
  border: 1px solid rgba(202, 255, 71, 0.2);
}
.plan-badge.badge-business {
  background: rgba(66, 153, 225, 0.1);
  color: #4299E1;
  border: 1px solid rgba(66, 153, 225, 0.2);
}

/* ─── Fade Transition ─── */
#comparar-content {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#comparar-content.is-fading {
  opacity: 0;
}

/* ─── Category Nav ─── */
.category-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: wrap;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 8px;
  color: var(--silver);
  font-family: var(--font-jakarta);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-nav a:hover {
  border-color: var(--acid);
  color: var(--acid);
  transform: translateY(-1px);
}

/* ─── Expand All Button ─── */
.expand-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 8px;
  color: var(--silver);
  font-family: var(--font-jakarta);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.expand-toggle-btn:hover {
  border-color: var(--acid);
  color: var(--acid);
  transform: translateY(-1px);
}
.expand-toggle-btn:active {
  transform: scale(0.96);
}

/* Copy Link Button */
.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 8px;
  color: var(--silver);
  font-family: var(--font-jakarta);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  margin-bottom: 16px;
}
.copy-link-btn:hover {
  border-color: var(--acid);
  color: var(--acid);
  transform: translateY(-1px);
}
.copy-link-btn:active {
  transform: scale(0.96);
}
.copy-link-btn.copied {
  border-color: #48BB78;
  color: #48BB78;
}

/* Score Banner */
.score-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 24px;
  margin-bottom: 24px;
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 12px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.score-banner:hover {
  border-color: rgba(202, 255, 71, 0.1);
}
.score-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.score-item .score-num {
  font-family: var(--font-geist);
  font-size: 1.3rem;
  line-height: 1;
}
.score-wins .score-num { color: #48BB78; }
.score-losses .score-num { color: #EF4444; }
.score-ties .score-num { color: #F59E0B; }
.score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fog);
  font-weight: 400;
}
.score-divider {
  width: 1px;
  height: 24px;
  background: var(--smoke);
}

/* Loss Highlight on Feature Items */
.feature-item.tafeito-loses {
  border-left: 3px solid rgba(239, 68, 68, 0.4);
}
.feature-item.tafeito-loses:hover {
  border-color: rgba(239, 68, 68, 0.6);
  border-left-color: rgba(239, 68, 68, 0.7);
}

/* Comparison Header Card */
.comparison-header {
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.comparison-header:hover {
  border-color: rgba(202, 255, 71, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(202, 255, 71, 0.05);
}
.comparison-header .col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comparison-header .app-name {
  font-family: var(--font-fraunces);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.comparison-header .price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--silver);
}
.comparison-header .price-tag {
  font-family: var(--font-geist);
  font-weight: 700;
  color: var(--chalk);
}
.price-tag.free { color: #48BB78; }
.price-tag.premium { color: var(--acid); }
.price-tag.business { color: #4299E1; }
.header-desc {
  font-size: 0.75rem;
  color: var(--fog);
  line-height: 1.5;
  margin-top: 8px;
}
.header-desc a {
  color: var(--acid);
  text-decoration: underline;
}

/* Loading State */
.comparar-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
  gap: 20px;
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--smoke);
  border-top-color: var(--acid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-family: var(--font-geist);
  font-size: 0.75rem;
  color: var(--fog);
}

/* Quick Comparison Table */
.quick-table-wrap {
  overflow-x: auto;
  margin-bottom: 48px;
}
.quick-table {
  width: 100%;
  min-width: 480px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--smoke);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.8rem;
}
.quick-table th {
  background: var(--void);
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-geist);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fog);
  font-weight: 700;
  border-bottom: 1px solid var(--smoke);
}
.quick-table th:first-child { min-width: 160px; }
.quick-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--smoke);
  color: var(--silver);
  line-height: 1.4;
}
.quick-table tr:last-child td { border-bottom: none; }
.quick-table td:first-child {
  font-weight: 600;
  color: var(--chalk);
}
.quick-check { color: #48BB78; font-weight: 700; }
.quick-cross { color: #EF4444; font-weight: 700; }
.quick-partial { color: #F59E0B; font-weight: 700; }
.quick-na { color: var(--fog); font-weight: 400; }

/* Honest Section */
.honest-section {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  transition: border-color 0.3s ease;
}
.honest-section:hover {
  border-color: rgba(239, 68, 68, 0.3);
}
.honest-section h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.honest-sub {
  font-size: 0.8rem;
  color: var(--silver);
  margin-bottom: 16px;
  line-height: 1.5;
}
.honest-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.honest-section li {
  font-size: 0.85rem;
  color: var(--silver);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}
.honest-section li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--acid);
}

/* Category Section */
.category-section {
  margin-bottom: 48px;
}
.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--smoke);
}

/* Feature Accordion */
.feature-item {
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-item:hover {
  border-color: rgba(202, 255, 71, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.feature-item:active {
  transform: scale(0.998);
}
.feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
  transition: background 0.2s ease;
}
.feature-header:hover {
  background: rgba(255, 255, 255, 0.02);
}
.feature-header .feature-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--chalk);
}
.feature-arrow {
  color: var(--fog);
  font-size: 0.9rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  line-height: 1;
}
.feature-item.open .feature-arrow {
  transform: rotate(180deg);
}

.feature-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 20px;
}
.feature-item.open .feature-body {
  max-height: 2500px;
  padding-bottom: 24px;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--silver);
  line-height: 1.6;
  margin-bottom: 16px;
}
.feature-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.feature-meta .meta-label {
  font-family: var(--font-geist);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fog);
  font-weight: 700;
}
.feature-meta .meta-text {
  font-size: 0.8rem;
  color: var(--silver);
  line-height: 1.5;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.comparison-col {
  background: var(--void);
  border: 1px solid var(--smoke);
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}
.comparison-col:hover {
  border-color: rgba(202, 255, 71, 0.1);
}
.comparison-col .col-title {
  font-family: var(--font-geist);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fog);
  font-weight: 700;
  margin-bottom: 6px;
}
.comparison-col .col-detail {
  font-size: 0.75rem;
  color: var(--silver);
  line-height: 1.5;
}
.col-detail.win { color: #48BB78; }
.col-detail.lose { color: #EF4444; }
.col-detail.tie { color: #F59E0B; }

.veredito-box {
  background: linear-gradient(135deg, rgba(202, 255, 71, 0.06), rgba(202, 255, 71, 0.02));
  border: 1px solid rgba(202, 255, 71, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--chalk);
  line-height: 1.5;
}

/* Verdict Final */
.verdict-final {
  background: linear-gradient(135deg, var(--obsidian), rgba(202, 255, 71, 0.03));
  border: 1px solid var(--acid);
  border-radius: 16px;
  padding: 32px;
  margin-top: 32px;
  box-shadow: 0 0 40px rgba(202, 255, 71, 0.04);
}
.verdict-final h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--acid);
}
.verdict-summary {
  font-size: 0.85rem;
  color: var(--silver);
  line-height: 1.6;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--smoke);
}
.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.verdict-card {
  background: var(--void);
  border: 1px solid var(--smoke);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.25s ease;
}
.verdict-card:hover {
  border-color: rgba(202, 255, 71, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.verdict-card h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.verdict-card p {
  font-size: 0.75rem;
  color: var(--silver);
  line-height: 1.5;
}

/* ─── Price Table (all rivals) ─── */
.price-table-section {
  margin-bottom: 32px;
}
.price-table-wrap {
  overflow-x: auto;
}
.price-table {
  width: 100%;
  min-width: 400px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--smoke);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.8rem;
}
.price-table th {
  background: var(--void);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-geist);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fog);
  font-weight: 700;
  border-bottom: 1px solid var(--smoke);
}
.price-table th:first-child { min-width: 140px; }
.price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--smoke);
  color: var(--silver);
}
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:not(.price-row-tafeito):hover td {
  background: rgba(255,255,255,0.02);
}
.price-row-tafeito td {
  background: rgba(202, 255, 71, 0.04);
  border-bottom: 2px solid var(--acid);
}
.price-cell-free { color: #48BB78; font-weight: 600; }
.price-cell-premium { color: var(--acid); font-weight: 600; }
.price-cell-business { color: #4299E1; font-weight: 600; }

/* ─── FAQ Section ─── */
.faq-section {
  padding: 48px 0;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(202, 255, 71, 0.15);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--chalk);
  font-family: var(--font-jakarta);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}
.faq-question::after {
  content: '▾';
  color: var(--fog);
  font-size: 0.85rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-question::after {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.25s ease;
  padding: 0 20px;
  font-size: 0.8rem;
  color: var(--silver);
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  max-height: 800px;
  padding: 0 20px 20px;
}

/* ─── PWA Prompt ─── */
.pwa-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--obsidian);
  border: 1px solid var(--acid);
  border-radius: 12px;
  color: var(--chalk);
  font-family: var(--font-jakarta);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 1000;
  max-width: 90vw;
  width: max-content;
  animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pwaSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.pwa-prompt-close {
  background: none;
  border: 1px solid var(--smoke);
  color: var(--fog);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.2s ease;
}
.pwa-prompt-close:hover {
  border-color: var(--acid);
  color: var(--acid);
}

/* ─── Radar Section ─── */
.radar-section {
  margin-bottom: 48px;
  background: var(--obsidian);
  border: 1px solid var(--smoke);
  border-radius: 16px;
  padding: 32px;
}
.radar-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.radar-legends {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 8px;
}
.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jakarta);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--chalk);
}
.radar-legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  opacity: 0.8;
}
.radar-chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.radar-chart-container svg {
  max-width: 100%;
  height: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .comparison-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .verdict-grid {
    grid-template-columns: 1fr;
  }
  .category-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .rival-btn {
    padding: 8px 14px;
    font-size: 0.7rem;
  }
  .feature-header {
    padding: 12px 14px;
  }
  .feature-header .feature-name {
    font-size: 0.85rem;
  }
  .comparison-header {
    padding: 20px;
  }
}
