/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --background: #0a0a0a;
  --card-bg: #111111;
  --text-main: #ffffff;
  --text-dim: #a1a1aa;
  
  /* Brand Colors */
  --primary: #8b5cf6; /* Purple */
  --primary-hover: #7c3aed;
  --accent: #22c55e; /* Green */
  --danger: #ef4444; /* Red */
  
  /* Shadows */
  --glow-primary: 0 0 20px rgba(139, 92, 246, 0.3);
  --glow-accent: 0 0 20px rgba(34, 197, 94, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

/* Card Container */
.dashboard-card {
  background-color: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.subtitle {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Status Panel */
.status-panel {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 2rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.val-green {
  color: var(--accent);
  text-shadow: var(--glow-accent);
}

/* Action Area */
.message-box {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  width: 100%;
  padding: 1.2rem;
  border: none;
  border-radius: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--glow-primary);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 30px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #3f3f46;
  box-shadow: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent), #15803d);
  box-shadow: var(--glow-accent);
}

/* Progress Bar */
.progress-container {
  margin-top: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--accent);
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: var(--glow-accent);
}

/* Chart Area */
.chart-container {
  margin-top: 2rem;
  height: 200px;
  width: 100%;
}

/* AI Suggestion Box */
.ai-suggestion {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  display: none; /* Hidden by default */
  animation: fadeIn 0.5s ease;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ai-badge {
    background: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.suggestion-text {
    font-size: 0.9rem;
    color: #e4e4e7;
    margin-bottom: 0.5rem;
}

.suggestion-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Popups (Modal) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #18181b;
  width: 90%;
  max-width: 400px;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--primary);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.4);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.modal-body {
  margin-bottom: 1.5rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.modal-btn {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.modal-btn:hover {
    opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.pulse-anim {
    animation: pulse 2s infinite;
}

/* Trade History */
.trade-list {
  margin-top: 1.5rem;
  max-height: 150px;
  overflow-y: auto;
  font-size: 0.85rem;
}

.trade-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.trade-profit {
  color: var(--accent);
  font-weight: bold;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}
