/* 
 * ═══════════════════════════════════════════════════════════════
 * MODERN ARENA TRADING STYLES - Next-Generation Arena Trading UI
 * ═══════════════════════════════════════════════════════════════
 * Features:
 * - Advanced theme integration for arena trading
 * - Modern hero section with glassmorphism
 * - Interactive trading panels
 * - OTE (Optimal Trade Entry) indicators
 * - Smooth animations for price updates
 * - Theme-aware trading tools
 * - Responsive layout for all screen sizes
 */

/* ═══════════════════════════════════════════════════════════════
   ARENA TRADING HERO SECTION
═══════════════════════════════════════════════════════════════ */

.arena-hero {
  position: relative;
  background: var(--theme-bg-primary);
  border-radius: var(--theme-radius-3xl);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--theme-border-1);
  box-shadow: var(--theme-shadow-xl);
}

.arena-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  animation: arenaHeroGradient 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes arenaHeroGradient {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(2%, 2%) rotate(1deg);
  }
  66% {
    transform: translate(-1%, 1%) rotate(-1deg);
  }
}

.arena-hero-content {
  position: relative;
  z-index: 1;
}

.arena-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--theme-radius-2xl);
  background: var(--theme-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--theme-shadow-lg);
  flex-shrink: 0;
}

.arena-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--theme-text-primary);
  margin-bottom: 0.25rem;
}

.arena-hero-subtitle {
  font-size: 0.875rem;
  color: var(--theme-text-secondary);
}

.arena-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--theme-radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--theme-success);
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ARENA STATS CARDS
═══════════════════════════════════════════════════════════════ */

.arena-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.arena-stat-card {
  background: var(--theme-glass-bg);
  backdrop-filter: blur(var(--theme-glass-blur));
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-xl);
  padding: 1rem;
  text-align: center;
  transition: all var(--theme-transition-base);
}

.arena-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-md);
  border-color: var(--theme-border-2);
}

.arena-stat-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-text-tertiary);
  margin-bottom: 0.25rem;
}

.arena-stat-value {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 900;
  color: var(--theme-text-primary);
  font-family: var(--theme-font-mono);
}

.arena-stat-unit {
  font-size: 0.625rem;
  color: var(--theme-text-muted);
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   ARENA TRADING GRID
═══════════════════════════════════════════════════════════════ */

.arena-trading-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  .arena-trading-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ARENA TRADING PANELS
═══════════════════════════════════════════════════════════════ */

.arena-panel {
  background: var(--theme-glass-bg);
  backdrop-filter: blur(var(--theme-glass-blur));
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-2xl);
  padding: 1.25rem;
  box-shadow: var(--theme-shadow-lg);
  transition: all var(--theme-transition-base);
}

.arena-panel:hover {
  border-color: var(--theme-border-2);
  box-shadow: var(--theme-shadow-xl);
}

.arena-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--theme-border-1);
}

.arena-panel-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   OTE (Optimal Trade Entry) BAND
═══════════════════════════════════════════════════════════════ */

.ote-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: var(--theme-radius-xl);
  border: 2px dashed var(--theme-border-2);
  background: var(--theme-surface-1);
  cursor: pointer;
  transition: all var(--theme-transition-base);
  min-width: 200px;
}

.ote-band:hover {
  border-color: var(--theme-primary);
  background: var(--theme-surface-2);
  transform: translateY(-2px);
}

.ote-band-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ote-band-label {
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-primary);
}

.ote-band-signal {
  padding: 0.25rem 0.5rem;
  border-radius: var(--theme-radius-full);
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--theme-success);
  color: white;
  animation: pulse 1.5s ease-in-out infinite;
}

.ote-level-bar {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: var(--theme-radius-full);
  background: var(--theme-surface-3);
  overflow: hidden;
  margin: 0.5rem 0;
}

.ote-level-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--theme-gradient-primary);
  border-radius: var(--theme-radius-full);
  transition: all var(--theme-transition-slow);
}

.ote-level-fvg {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(245, 158, 11, 0.5);
  transition: all var(--theme-transition-slow);
}

.ote-price-dot {
  position: absolute;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--theme-accent);
  box-shadow: 0 0 8px var(--theme-accent);
  transition: all var(--theme-transition-base);
}

.ote-band-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.625rem;
  font-weight: 700;
  font-family: var(--theme-font-mono);
}

.ote-band-labels .high {
  color: var(--theme-danger);
}

.ote-band-labels .low {
  color: var(--theme-success);
}

/* ═══════════════════════════════════════════════════════════════
   OTE DETAIL PANEL
═══════════════════════════════════════════════════════════════ */

.ote-detail-panel {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(217, 70, 239, 0.05) 50%, rgba(99, 102, 241, 0.04) 100%);
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-xl);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.ote-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ote-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--theme-radius-lg);
  background: var(--theme-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--theme-shadow-md);
}

.ote-swing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .ote-swing-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.ote-swing-card {
  background: var(--theme-surface-1);
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-lg);
  padding: 0.75rem;
  text-align: center;
  transition: all var(--theme-transition-fast);
}

.ote-swing-card:hover {
  border-color: var(--theme-border-2);
  background: var(--theme-surface-2);
}

.ote-swing-label {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.ote-swing-value {
  font-size: 0.75rem;
  font-weight: 900;
  font-family: var(--theme-font-mono);
  color: var(--theme-text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   ARENA CHART CONTAINER
═══════════════════════════════════════════════════════════════ */

.arena-chart-container {
  background: var(--theme-glass-bg);
  backdrop-filter: blur(var(--theme-glass-blur));
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-2xl);
  padding: 1rem;
  box-shadow: var(--theme-shadow-lg);
  position: relative;
  overflow: hidden;
}

.arena-chart-wrapper {
  height: 400px;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   ARENA TRADING FORM
═══════════════════════════════════════════════════════════════ */

.arena-trading-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arena-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.arena-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--theme-text-secondary);
}

.arena-form-input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--theme-border-2);
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-1);
  color: var(--theme-text-primary);
  font-size: 0.875rem;
  font-family: var(--theme-font-mono);
  transition: all var(--theme-transition-base);
}

.arena-form-input:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.arena-form-button {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--theme-radius-lg);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--theme-transition-base);
}

.arena-form-button.buy {
  background: linear-gradient(135deg, var(--theme-success-500), var(--theme-success-600));
  color: white;
}

.arena-form-button.buy:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-lg);
}

.arena-form-button.sell {
  background: linear-gradient(135deg, var(--theme-danger-500), var(--theme-danger-600));
  color: white;
}

.arena-form-button.sell:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════
   ARENA PORTFOLIO
═══════════════════════════════════════════════════════════════ */

.arena-portfolio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--theme-surface-1);
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-lg);
  margin-bottom: 0.5rem;
  transition: all var(--theme-transition-fast);
}

.arena-portfolio-item:hover {
  border-color: var(--theme-border-2);
  background: var(--theme-surface-2);
}

.arena-portfolio-coin {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.arena-portfolio-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.arena-portfolio-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theme-text-primary);
}

.arena-portfolio-amount {
  font-size: 0.75rem;
  color: var(--theme-text-secondary);
  font-family: var(--theme-font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   ARENA TRADE HISTORY
═══════════════════════════════════════════════════════════════ */

.arena-trade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--theme-surface-1);
  border: 1px solid var(--theme-border-1);
  border-radius: var(--theme-radius-lg);
  margin-bottom: 0.5rem;
  transition: all var(--theme-transition-fast);
}

.arena-trade-item.buy {
  border-left: 3px solid var(--theme-success);
}

.arena-trade-item.sell {
  border-left: 3px solid var(--theme-danger);
}

.arena-trade-item:hover {
  border-color: var(--theme-border-2);
  background: var(--theme-surface-2);
}

.arena-trade-type {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: var(--theme-radius-full);
}

.arena-trade-type.buy {
  background: rgba(16, 185, 129, 0.1);
  color: var(--theme-success);
}

.arena-trade-type.sell {
  background: rgba(239, 68, 68, 0.1);
  color: var(--theme-danger);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .arena-hero {
    padding: 1rem;
  }
  
  .arena-hero-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .arena-stats-grid {
    gap: 0.5rem;
  }
  
  .arena-stat-card {
    padding: 0.75rem;
  }
  
  .arena-stat-value {
    font-size: 1rem;
  }
  
  .ote-band {
    min-width: 150px;
    padding: 0.5rem 0.75rem;
  }
  
  .arena-chart-wrapper {
    height: 300px;
  }
  
  .ote-swing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .arena-hero-title {
    font-size: 1.25rem;
  }
  
  .arena-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .arena-chart-wrapper {
    height: 250px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   THEME TRANSITIONS
═══════════════════════════════════════════════════════════════ */

.arena-hero,
.arena-panel,
.arena-stat-card,
.ote-band,
.ote-detail-panel,
.arena-chart-container,
.arena-portfolio-item,
.arena-trade-item {
  transition: background-color var(--theme-transition-base),
              border-color var(--theme-transition-base),
              color var(--theme-transition-base),
              box-shadow var(--theme-transition-base);
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .arena-hero::before {
    animation: none;
  }
  
  .arena-live-badge {
    animation: none;
  }
  
  .ote-band-signal {
    animation: none;
  }
}

/* Focus states for keyboard navigation */
.arena-form-input:focus,
.arena-form-button:focus,
.ote-band:focus {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATES
═══════════════════════════════════════════════════════════════ */

.arena-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.arena-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--theme-border-2);
  border-top-color: var(--theme-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.arena-loading-text {
  font-size: 0.875rem;
  color: var(--theme-text-secondary);
}
