/* RapidTradeAI Custom Styles */

/* AI Gradient Text Effect */
.ai-gradient-text {
  background: linear-gradient(45deg, #00d4ff, #ff00ff, #00ff88, #ffaa00);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
  font-weight: bold;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Typing Animation */
.typing-animation {
  overflow: hidden;
  border-right: 3px solid #00d4ff;
  white-space: nowrap;
  animation: typing 4s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #00d4ff; }
}

/* AI Bot Section */
.ai-bot-section {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  color: white;
}

.ai-particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #00d4ff, transparent),
    radial-gradient(2px 2px at 40px 70px, #ff00ff, transparent),
    radial-gradient(1px 1px at 90px 40px, #00ff88, transparent),
    radial-gradient(1px 1px at 130px 80px, #ffaa00, transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: particleFloat 20s linear infinite;
  opacity: 0.3;
}

@keyframes particleFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-200px); }
}

.section-subtitle {
  color: #00d4ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 30px;
  line-height: 1.2;
}

/* AI Features */
.ai-features {
  margin: 40px 0;
}

.ai-feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all 0.3s ease;
}

.ai-feature-item:hover {
  transform: translateX(10px);
  background: rgba(0, 212, 255, 0.1);
  border-color: #00d4ff;
}

.ai-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #00d4ff, #ff00ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 24px;
  color: white;
  animation: iconPulse 2s ease-in-out infinite;
}

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

.ai-feature-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

.ai-feature-content p {
  color: #b0b0b0;
  margin: 0;
}

/* AI Stats */
.ai-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #b0b0b0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* AI Bot Visual */
.ai-bot-visual {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-hologram {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hologram-circle {
  position: absolute;
  border: 2px solid #00d4ff;
  border-radius: 50%;
  animation: hologramRotate 10s linear infinite;
}

.hologram-circle:nth-child(1) {
  width: 200px;
  height: 200px;
  opacity: 0.3;
}

.hologram-circle:nth-child(2) {
  width: 250px;
  height: 250px;
  opacity: 0.2;
  animation-direction: reverse;
  animation-duration: 15s;
}

.hologram-circle:nth-child(3) {
  width: 300px;
  height: 300px;
  opacity: 0.1;
  animation-duration: 20s;
}

@keyframes hologramRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-bot-avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(45deg, #00d4ff, #ff00ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  animation: avatarFloat 3s ease-in-out infinite;
  z-index: 10;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Trading Cards */
.trading-cards {
  position: absolute;
  width: 100%;
  height: 100%;
}

.trading-card {
  position: absolute;
  width: 180px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  animation: cardFloat 4s ease-in-out infinite;
}

.card-1 {
  top: 50px;
  right: 50px;
  animation-delay: 0s;
}

.card-2 {
  bottom: 100px;
  left: 20px;
  animation-delay: 1s;
}

.card-3 {
  top: 200px;
  left: 80px;
  animation-delay: 2s;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 600;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-indicator.green {
  background: #00ff88;
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.profit {
  font-size: 20px;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 5px;
}

.percentage {
  font-size: 14px;
  color: #00d4ff;
}

/* Matrix Rain Effect */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.1;
}

.matrix-column {
  position: absolute;
  top: -100%;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #00ff88;
  animation: matrixFall linear infinite;
}

@keyframes matrixFall {
  to { top: 100%; }
}

/* Neural Network Background */
.neural-network {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.neural-node {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00d4ff;
  border-radius: 50%;
  animation: nodeGlow 3s ease-in-out infinite;
}

@keyframes nodeGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

.neural-connection {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  animation: connectionPulse 2s ease-in-out infinite;
}

@keyframes connectionPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

/* Advanced Button Animations */
.ai-button {
  position: relative;
  background: linear-gradient(45deg, #00d4ff, #ff00ff);
  border: none;
  padding: 15px 30px;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ai-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.ai-button:hover::before {
  left: 100%;
}

.ai-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

/* Glitch Effect */
.glitch {
  position: relative;
  animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: #ff00ff;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: #00d4ff;
  z-index: -2;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-2px, -2px); }
  20% { transform: translate(2px, 2px); }
  30% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(2px, 2px); }
  20% { transform: translate(-2px, -2px); }
  30% { transform: translate(2px, -2px); }
  40% { transform: translate(-2px, 2px); }
}

/* Cyber Grid */
.cyber-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Holographic Effect */
.holographic {
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  background-size: 200% 200%;
  animation: holographicShine 3s ease-in-out infinite;
}

@keyframes holographicShine {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-bot-section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 32px;
  }

  .ai-stats {
    flex-direction: column;
    gap: 20px;
  }

  .ai-bot-visual {
    height: 400px;
    margin-top: 40px;
  }

  .ai-hologram {
    width: 200px;
    height: 200px;
  }

  .trading-card {
    width: 140px;
    padding: 15px;
  }

  .typing-animation {
    font-size: 18px;
  }

  .ai-feature-item {
    flex-direction: column;
    text-align: center;
  }

  .ai-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
}

/* AI Dashboard Section */
.ai-dashboard-section {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  padding: 100px 0;
  position: relative;
  color: white;
  overflow: hidden;
}

.dashboard-main {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(10px);
  margin-bottom: 30px;
}

.trading-chart-container {
  margin-bottom: 40px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-header h4 {
  color: white;
  margin: 0;
  font-size: 20px;
}

.chart-controls {
  display: flex;
  gap: 10px;
}

.chart-btn {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chart-btn.active,
.chart-btn:hover {
  background: #00d4ff;
  color: white;
}

.trading-chart {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 20px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 255, 136, 0.1);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #00ff88;
}

.profit-amount {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #00ff88;
}

.profit-percentage {
  font-size: 14px;
  color: #00d4ff;
}

.active-trades h4 {
  color: white;
  margin-bottom: 20px;
}

.trades-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.trade-item {
  display: grid;
  grid-template-columns: 1fr 80px 100px 100px 100px;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
}

.trade-item:hover {
  border-color: #00d4ff;
  transform: translateX(5px);
}

.trade-pair {
  font-weight: 600;
  color: white;
}

.trade-type {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.trade-type.buy {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
}

.trade-type.sell {
  background: rgba(255, 0, 136, 0.2);
  color: #ff0088;
}

.trade-amount {
  color: #b0b0b0;
}

.trade-profit.positive {
  color: #00ff88;
  font-weight: 600;
}

.trade-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #b0b0b0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  animation: statusBlink 2s ease-in-out infinite;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.ai-metrics,
.market-sentiment,
.top-performers {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(10px);
}

.ai-metrics h4,
.market-sentiment h4,
.top-performers h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 18px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.metric-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #00d4ff, #ff00ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.metric-content {
  flex: 1;
}

.metric-value {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.metric-label {
  font-size: 12px;
  color: #b0b0b0;
  text-transform: uppercase;
}

.metric-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.metric-trend.up {
  color: #00ff88;
}

.progress-ring {
  position: relative;
}

.progress-circle {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: progressFill 2s ease-in-out;
}

@keyframes progressFill {
  from { stroke-dashoffset: 157; }
  to { stroke-dashoffset: 4.2; }
}

.sentiment-gauge {
  margin: 20px 0;
}

.gauge-container {
  position: relative;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0088, #ffaa00, #00ff88);
  border-radius: 10px;
  transition: width 2s ease;
}

.gauge-pointer {
  position: absolute;
  top: -5px;
  right: 22%;
  width: 4px;
  height: 30px;
  background: white;
  border-radius: 2px;
}

.sentiment-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: #b0b0b0;
}

.sentiment-value {
  text-align: center;
  margin-top: 10px;
  font-weight: 600;
  color: #00ff88;
}

.performer-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.performer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.1);
}

.performer-name {
  color: white;
  font-weight: 600;
}

.performer-profit {
  color: #00ff88;
  font-weight: 600;
}

.performer-percentage {
  color: #00d4ff;
  font-size: 12px;
}

/* Additional Responsive Design for Dashboard */
@media (max-width: 992px) {
  .ai-dashboard-section {
    padding: 60px 0;
  }

  .dashboard-main {
    margin-bottom: 40px;
  }

  .trade-item {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .chart-header {
    flex-direction: column;
    gap: 15px;
  }

  .trading-chart {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 28px;
  }

  .ai-dashboard-section {
    padding: 40px 0;
  }

  .dashboard-main,
  .ai-metrics,
  .market-sentiment,
  .top-performers {
    padding: 20px;
  }

  .metric-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .chart-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .trading-chart {
    height: 200px;
  }
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  border-top-color: #00d4ff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Hover Effects for Interactive Elements */
.trade-item:hover .trade-profit {
  animation: profitGlow 0.5s ease-in-out;
}

@keyframes profitGlow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 10px #00ff88; }
}

.performer-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

/* AI Theme Enhancements */
.ai-glow {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  animation: aiGlow 3s ease-in-out infinite;
}

@keyframes aiGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }
  50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.6); }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00d4ff, #ff00ff);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #ff00ff, #00d4ff);
}
