/* =========================================================================
   File: src/poly_frontend_canister/dist/assets/polyflow-styles.css
   
   PolyFlow AI-Powered Staking Platform Styles
   Modern, professional UI for multi-token staking interface
   
   ========================================================================= */

/* PolyFlow Container */
.polyflow-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header Section */
.polyflow-header {
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.polyflow-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.polyflow-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.polyflow-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Stats Dashboard */
.polyflow-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem 0;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Staking Interface */
.polyflow-interface {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.staking-panel {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.panel-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.stake-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.unstake-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.panel-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tier Selection */
.tier-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.tier-option {
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.tier-option:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.tier-option.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.tier-conservative { border-color: #10b981; }
.tier-balanced { border-color: #3b82f6; }
.tier-aggressive { border-color: #ef4444; }

.tier-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.tier-rate {
  font-size: 0.8rem;
  color: #64748b;
}

/* Buttons */
.polyflow-btn {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-stake {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-stake:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-unstake {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-unstake:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Yield Projection */
.yield-projection {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.yield-projection h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.yield-range {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.yield-rate {
  opacity: 0.9;
  margin: 0;
}

/* Positions Display */
.polyflow-positions {
  margin-top: 3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2rem;
  text-align: center;
}

.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.position-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.position-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.position-header h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.tier-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-conservative {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.tier-balanced {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.tier-aggressive {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.position-details p {
  margin: 0.5rem 0;
  color: #64748b;
}

.position-details strong {
  color: #374151;
}

.unstake-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.unstake-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Rewards Section */
.polyflow-rewards {
  margin-top: 2rem;
}

.rewards-summary {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

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

.reward-item .token {
  font-weight: 600;
  color: #0f172a;
}

.reward-item .amount {
  font-weight: 700;
  color: #0ea5e9;
}

.total-rewards {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(14, 165, 233, 0.2);
  text-align: center;
  font-size: 1.1rem;
  color: #0c4a6e;
}

/* Messages */
.polyflow-messages {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  max-width: 400px;
}

.message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
}

.message.success {
  background: #10b981;
  color: white;
}

.message.error {
  background: #ef4444;
  color: white;
}

.message.info {
  background: #3b82f6;
  color: white;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .polyflow-interface {
    grid-template-columns: 1fr;
  }
  
  .polyflow-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tier-options {
    grid-template-columns: 1fr;
  }
  
  .positions-grid {
    grid-template-columns: 1fr;
  }
  
  .polyflow-header h1 {
    font-size: 2rem;
  }
  
  .polyflow-messages {
    position: relative;
    top: auto;
    right: auto;
    margin: 1rem 0;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #667eea;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* No Positions State */
.no-positions {
  text-align: center;
  color: #64748b;
  font-style: italic;
  padding: 3rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
}
