/* ===========================================
   PREMIUM.CSS - Estilos premium e modais
   =========================================== */

/* Banner de demonstração */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.demo-icon {
  font-size: 1rem;
}

body.has-demo-banner {
  padding-top: 40px;
}

/* Badge Premium */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--gradient-gold);
  color: #1a1a2e;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.premium-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.4);
}

.badge-icon {
  font-size: 0.9rem;
  animation: badge-shine 2s infinite;
}

@keyframes badge-shine {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Contador de análises */
.analysis-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.counter-icon {
  color: var(--accent-purple);
}

/* Modal de análise */
.analysis-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.analysis-modal {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--accent-purple);
  box-shadow: var(--shadow-purple);
  animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--gradient-purple);
  color: white;
}

.analysis-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
}

.ai-icon {
  font-size: 1.3rem;
}

.btn-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1rem;
  border-radius: 50%;
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Match info */
.analysis-match {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.match-teams .vs {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.match-competition {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Prediction */
.analysis-prediction {
  padding: 20px;
  text-align: center;
  background: var(--bg-elevated);
}

.prediction-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prediction-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.prediction-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-green);
}

.prediction-prob {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.confidence-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.confidence-high {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.confidence-medium {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.confidence-low {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

/* Sections */
.analysis-section {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Probability bars */
.prob-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prob-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prob-label {
  width: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prob-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.prob-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.prob-fill.home { background: var(--accent-blue); }
.prob-fill.draw { background: var(--text-muted); }
.prob-fill.away { background: var(--accent-red); }

.prob-value {
  width: 40px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}

/* Markets grid */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.market-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
}

.market-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.market-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.market-value.positive { color: var(--accent-green); }
.market-value.negative { color: var(--accent-red); }

/* Form display */
.form-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-team-name {
  width: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-badges {
  display: flex;
  gap: 4px;
}

.form-badge {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
}

.form-win { background: var(--accent-green); color: white; }
.form-draw { background: var(--text-muted); color: white; }
.form-loss { background: var(--accent-red); color: white; }

/* Reasoning */
.reasoning-list {
  list-style: none;
}

.reasoning-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.reasoning-list li:last-child {
  border-bottom: none;
}

.reasoning-list li::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: var(--accent-purple);
}

/* Footer */
.analysis-footer {
  padding: 16px 20px;
  background: var(--bg-elevated);
  text-align: center;
}

.remaining-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Premium Modal */
.premium-modal {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 2px solid var(--accent-gold);
  box-shadow: var(--shadow-gold);
  text-align: center;
  position: relative;
  animation: modal-slide-up 0.3s ease;
}

.premium-modal .btn-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.premium-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: badge-shine 2s infinite;
}

.premium-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.premium-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.premium-features {
  text-align: left;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.premium-features h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.premium-features ul {
  list-style: none;
}

.premium-features li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-premium-cta {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-gold);
  color: #1a1a2e;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-gold);
}

.btn-premium-cta:not(:disabled):hover {
  transform: translateY(-2px);
}

.premium-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.premium-free-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.premium-divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  margin: 20px 0 12px;
}

/* Premium Offer Section */
.premium-offer {
  padding: 20px;
  margin: 20px 0;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(139, 92, 246, 0.15));
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
}

.offer-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gradient-gold);
  color: #1a1a2e;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.offer-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.offer-price .price-currency {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.offer-price .price-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.offer-price .price-period {
  font-size: 1rem;
  color: var(--text-muted);
}

.offer-duration {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Premium Price Section (página Premium) */
.premium-price-section {
  padding: 0 20px;
  margin: 24px 0;
}

.price-card {
  padding: 24px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(139, 92, 246, 0.1));
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-xl);
  text-align: center;
}

.price-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.price-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.price-amount .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.price-amount .value {
  font-size: 4rem;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.price-amount .period {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.price-duration {
  display: block;
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--accent-green);
  font-weight: 500;
}

/* Premium Badge Active */
.premium-badge.active {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.premium-badge.active .badge-icon {
  animation: none;
}

/* Remaining badge premium */
.remaining-badge.premium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(139, 92, 246, 0.2));
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

/* Loader AI */
.ai-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.ai-brain {
  font-size: 3rem;
  animation: brain-pulse 1s infinite;
}

@keyframes brain-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.ai-dots {
  display: flex;
  gap: 8px;
}

.ai-dots span {
  width: 10px;
  height: 10px;
  background: var(--accent-purple);
  border-radius: 50%;
  animation: dot-bounce 1.4s infinite ease-in-out;
}

.ai-dots span:nth-child(1) { animation-delay: 0s; }
.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
}

.ai-loader p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Feature Comparison Table */
.feature-comparison {
  padding: 20px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.comparison-table td:first-child {
  text-align: left;
  color: var(--text-secondary);
}

.comparison-table .premium-col {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-gold);
  font-weight: 600;
}

/* Loader container */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
}

.loader-spinner {
  position: relative;
  width: 50px;
  height: 50px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: var(--accent-blue);
  animation-duration: 0.8s;
  animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top-color: var(--accent-green);
  animation-duration: 0.6s;
}

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

.loader-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.loader-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg-secondary);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===========================================
   PAYMENT MODAL
   =========================================== */
.payment-modal {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 2px solid var(--accent-purple);
  box-shadow: var(--shadow-purple);
  text-align: center;
  position: relative;
  animation: modal-slide-up 0.3s ease;
}

.payment-modal .btn-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.payment-header {
  margin-bottom: 24px;
}

.payment-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.payment-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item.total {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--accent-purple);
  font-weight: 700;
  color: var(--text-primary);
}

.summary-item .price {
  font-size: 1.3rem;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.payment-info {
  text-align: left;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.payment-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.btn-confirm-payment {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  margin-bottom: 12px;
  transition: all var(--transition-normal);
}

.btn-confirm-payment:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.btn-cancel {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.btn-cancel:hover {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* ===========================================
   CONFIRMATION MODAL
   =========================================== */
.confirmation-modal {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 2px solid var(--accent-green);
  box-shadow: 0 4px 32px rgba(16, 185, 129, 0.3);
  text-align: center;
  position: relative;
  animation: modal-slide-up 0.3s ease;
}

.confirmation-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: celebration 0.5s ease;
}

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

.confirmation-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.confirmation-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.confirmation-details {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-item:last-child {
  border-bottom: none;
}

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

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.confirmation-benefits {
  text-align: left;
  padding: 16px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.confirmation-benefits p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 12px;
}

.confirmation-benefits ul {
  list-style: none;
}

.confirmation-benefits li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}

.confirmation-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

.btn-start {
  width: 100%;
  padding: 16px 24px;
  background: var(--gradient-purple);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-purple);
  transition: all var(--transition-normal);
}

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

/* Premium user styles */
body.is-premium-user .btn-analyze {
  background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
}

body.is-premium-user .btn-analyze .btn-text::after {
  content: ' 💎';
}

/* Expired Premium Banner */
.expired-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 999;
}

.expired-banner-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.expired-banner-btn {
  padding: 8px 16px;
  background: white;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* Premium Insights Section */
.premium-insights-section {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05));
  border-left: 3px solid var(--accent-purple);
}

.premium-insights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-item {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-purple);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.insight-item strong {
  color: var(--text-primary);
}

/* Premium Locked Section */
.premium-locked-section {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
  border-left: 3px solid var(--accent-gold);
}

.premium-locked {
  text-align: center;
  padding: 24px 16px;
}

.locked-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.7;
}

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

.locked-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
}

.locked-features li {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn-unlock-premium {
  padding: 12px 24px;
  background: var(--gradient-gold);
  color: #1a1a2e;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-unlock-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
}
