/*
 * DeFi Components - Componentes Específicos para Investimentos
 * Mantém 100% da funcionalidade existente
 * Autor: Sistema de Modernização Inteligente
 * Versão: 1.0
 */

/* ===== CARDS DE INVESTIMENTO DeFi ===== */
.defi-theme .investment-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.defi-theme .investment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.defi-theme .investment-card:hover::before {
  opacity: 1;
}

.defi-theme .investment-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.4);
}

.defi-theme .investment-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.defi-theme .investment-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.defi-theme .investment-value {
  font-size: 28px;
  font-weight: 800;
  color: #10b981;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.defi-theme .investment-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

/* ===== PROGRESS BARS DeFi ===== */
.defi-theme .staking-progress {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  position: relative;
  margin: 16px 0;
}

.defi-theme .staking-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.defi-theme .staking-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.defi-theme .progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.defi-theme .progress-percentage {
  font-weight: 700;
  color: #10b981;
}

/* ===== CARDS DE STAKING DeFi ===== */
.defi-theme .staking-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.1) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== STAKING PAGE FIXES (inputs, selects, dropdowns) ===== */
.defi-theme .staking-form,
.defi-theme form[action*="Staking"],
.defi-theme .content-body .container-fluid form {
  color: #e5e7eb;
}

.defi-theme .staking-form .form-control,
.defi-theme .staking-form .form-select,
.defi-theme .content-body .form-control,
.defi-theme .content-body .form-select,
.defi-theme input[type="text"],
.defi-theme input[type="number"],
.defi-theme select {
  background: rgba(2, 6, 23, 0.65) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #e5e7eb !important;
  box-shadow: none !important;
}

.defi-theme .staking-form .form-control::placeholder,
.defi-theme .content-body .form-control::placeholder {
  color: rgba(229, 231, 235, 0.5) !important;
}

.defi-theme .dropdown-menu,
.defi-theme .bootstrap-select .dropdown-menu {
  background: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #e5e7eb !important;
}

.defi-theme .dropdown-item { color: #e5e7eb !important; }
.defi-theme .dropdown-item:hover,
.defi-theme .dropdown-item:focus { background: rgba(99,102,241,0.12) !important; color: #fff !important; }

.defi-theme .card,
.defi-theme .panel,
.defi-theme .box,
.defi-theme .content-body .card {
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

/* Staking view containers and titles */
.defi-theme .staking-container,
.defi-theme .staking-header,
.defi-theme .staking-form-container,
.defi-theme .stakes-container {
  color: #e5e7eb !important;
}

.defi-theme .staking-header h1,
.defi-theme .form-title,
.defi-theme .stakes-title {
  color: #f8fafc !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.defi-theme .stat-card {
  background: rgba(15,23,42,.8) !important;
  border: 1px solid rgba(148,163,184,.22) !important;
}

.defi-theme .stakes-table {
  background: rgba(15,23,42,.85) !important;
  color: #e5e7eb !important;
}
.defi-theme .stakes-table thead th { color: #e2e8f0 !important; }
.defi-theme .stakes-table tbody td { color: #cbd5e1 !important; }

/* Forçar contraste dos contêineres principais da página de Staking */
.defi-theme .staking-form-container,
.defi-theme .stakes-container {
  background: rgba(15, 23, 42, 0.90) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #e5e7eb !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.25) !important;
}

.defi-theme .staking-form-container .form-label,
.defi-theme .staking-form-container label,
.defi-theme .stakes-container .stakes-title,
.defi-theme .staking-form-container .minimum-info {
  color: #e2e8f0 !important;
}

.defi-theme .staking-form-container .form-title,
.defi-theme .stakes-container .stakes-title {
  color: #f8fafc !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.defi-theme .staking-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.4);
}

.defi-theme .staking-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.defi-theme .staking-plan {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.defi-theme .staking-value {
  font-size: 24px;
  font-weight: 800;
  color: #06b6d4;
  margin-bottom: 8px;
}

.defi-theme .staking-apy {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}

.defi-theme .staking-earnings {
  font-size: 16px;
  font-weight: 600;
  color: #10b981;
  margin-bottom: 8px;
}

.defi-theme .staking-maturity {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== PERFORMANCE CHART DeFi ===== */
.defi-theme .performance-chart {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.defi-theme .performance-chart::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.defi-theme .chart-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.defi-theme .chart-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

/* ===== VOUCHER CARDS DeFi ===== */
.defi-theme .voucher-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.defi-theme .voucher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.4);
}

.defi-theme .voucher-status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.defi-theme .voucher-status.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.defi-theme .voucher-status.pending {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.defi-theme .voucher-status.expired {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.defi-theme .voucher-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.defi-theme .voucher-value {
  font-size: 20px;
  font-weight: 800;
  color: #f59e0b;
  margin-bottom: 8px;
}

.defi-theme .voucher-expiry {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== DAILY MISSION DeFi ===== */
.defi-theme .daily-mission {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.defi-theme .mission-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.defi-theme .mission-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.defi-theme .mission-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}

.defi-theme .mission-button {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.defi-theme .mission-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.defi-theme .mission-button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== RESPONSIVIDADE DeFi ===== */
@media (max-width: 768px) {
  .defi-theme .investment-card,
  .defi-theme .staking-card,
  .defi-theme .voucher-card,
  .defi-theme .daily-mission {
    padding: 16px;
    border-radius: 12px;
  }
  
  .defi-theme .investment-title,
  .defi-theme .staking-plan,
  .defi-theme .voucher-title {
    font-size: 14px;
  }
  
  .defi-theme .investment-value,
  .defi-theme .staking-value,
  .defi-theme .voucher-value {
    font-size: 20px;
  }
  
  .defi-theme .investment-icon,
  .defi-theme .mission-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* ===== ANIMAÇÕES ESPECÍFICAS DeFi ===== */
.defi-theme .investment-card,
.defi-theme .staking-card,
.defi-theme .voucher-card {
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.defi-theme .investment-card:hover,
.defi-theme .staking-card:hover,
.defi-theme .voucher-card:hover {
  animation: none;
}

/* ===== LOADING STATES DeFi ===== */
.defi-theme .loading-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== TOOLTIPS DeFi ===== */
.defi-theme .tooltip-defi {
  position: relative;
  cursor: help;
}

.defi-theme .tooltip-defi::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.defi-theme .tooltip-defi:hover::after {
  opacity: 1;
  visibility: visible;
}
