/* "Neon Glass" Future Fintech Theme */

/* Global Tokens */
:root {
  /* Core Colors */
  --bg-body: #0f172a;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  
  /* Glass Tokens */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  --glass-blur: blur(20px);
  
  /* Accents */
  --accent-primary: #ffffff; /* White for Dark Mode */
  --accent-secondary: #94a3b8; /* Slate */
  --accent-success: #10b981; /* Emerald */
  --accent-danger: #ef4444; /* Red */
  --accent-warning: #f59e0b; /* Amber */
  
  /* Text */
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --text-on-primary: #0f172a; /* Dark text on light gradient */
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-glow: radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 40%);
  
  /* Dimensions */
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --sidebar-width: 220px;
  --header-height: 70px;
}

/* Light Mode Overrides */
body.light-mode {
  --bg-body: #f1f5f9;
  --bg-gradient-start: #f1f5f9;
  --bg-gradient-end: #e2e8f0;
  
  /* Solid/Opaque Glass for Light Mode */
  --glass-bg: #ffffff;
  --glass-border: #e2e8f0;
  --glass-highlight: #ffffff;
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  
  --accent-primary: #0f172a; /* Black/Slate for Light Mode */
  --accent-secondary: #64748b;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-on-primary: #ffffff; /* Light text on dark gradient */
  
  --gradient-primary: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  outline: none;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Links */
a {
  color: #60a5fa; /* Blue-400 */
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #93c5fd; /* Blue-300 */
  text-decoration: underline;
}

body.light-mode a {
  color: #2563eb; /* Blue-600 */
}

body.light-mode a:hover {
  color: #1d4ed8; /* Blue-700 */
}

/* Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.logo-glow {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  box-shadow: none;
}

.logo-glow img {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

body.light-mode .logo-glow {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .logo-glow img {
  filter: none;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-item:hover, .nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  width: calc(100% - var(--sidebar-width));
}

/* Ticker Animation */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
  height: 40px;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ticker-content {
  display: flex;
  animation: ticker 50s linear infinite;
  white-space: nowrap;
  padding-left: 100%; /* Start off-screen */
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.ticker-item strong {
  color: var(--text-main);
  margin-right: 0.5rem;
}

.ticker-change {
  margin-left: 0.5rem;
  font-size: 0.85rem;
}

.ticker-change.up { color: var(--accent-success); }
.ticker-change.down { color: var(--accent-danger); }

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

body.light-mode .ticker-wrap {
  background: rgba(255, 255, 255, 0.5);
}

/* Hero Section */
.hero-section {
  margin-bottom: 2.5rem;
  position: relative;
}

.hero-glass {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  /* Tech Grid Pattern */
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

body.light-mode .hero-glass {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-color: var(--glass-border);
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

body.light-mode .search-bar {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--glass-border);
  color: var(--text-main);
}

body.light-mode .chat-input {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--glass-border);
  color: var(--text-main);
}

.hero-glass::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15), transparent 40%);
  animation: none;
  pointer-events: none;
}

.hero-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Search Bar Redesign */
.search-container {
  position: relative;
  max-width: 600px;
}

.search-bar {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border-radius: var(--radius-lg);
  color: var(--text-main);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar:focus {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.search-icon-lg {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
}

.search-actions {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.btn-search {
  background: var(--gradient-primary);
  border: none;
  color: var(--text-on-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 1.5rem;
}

.col-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.col-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: var(--glass-highlight);
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Chart Section */
.chart-container {
  height: 400px;
  position: relative;
  width: 100%;
}

/* Stock Info Cards */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stock-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.metric-trend {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.trend-up { color: var(--accent-success); }
.trend-down { color: var(--accent-danger); }

/* News Feed */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all 0.2s;
  cursor: pointer;
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  transform: translateX(4px);
}

.news-meta {
  font-size: 0.75rem;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.news-headline {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-main);
}

/* AI Chat Interface */
.ai-interface {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
  gap: 1rem;
}

.chat-window {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  padding: 1rem;
  overflow-y: auto;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 85%;
}

.ai-msg.user {
  align-self: flex-end;
  background: var(--accent-primary);
  color: var(--text-on-primary);
  border-bottom-right-radius: 2px;
}

.ai-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
}

.role-label {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.light-mode .chat-input-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  min-width: 0;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

body.light-mode .chat-input::placeholder {
  color: rgba(15, 23, 42, 0.5); /* Darker placeholder for light mode */
}

body.light-mode .chat-input {
  color: var(--text-main);
}

#ai-ask-btn {
  align-self: stretch;
  min-width: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

body.light-mode #ai-ask-btn {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
}

.btn-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--glass-highlight);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-on-primary);
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.btn-icon-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent-primary);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none; /* fallback */
}

.modal-content {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-body); /* Ensure opacity */
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.modal-body {
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .sidebar-header {
    margin-bottom: 0;
    width: 100%;
    justify-content: space-between;
  }
  
  .nav-links {
    display: none; /* Hide nav on mobile for now or make it a hamburger */
  }
  
  .mobile-only {
    display: block;
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 100;
  }

  .mobile-menu.hidden {
    display: none;
  }

  .mobile-menu.open {
    display: block !important;
  }

  .mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
    width: 100%;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
}

@media (min-width: 1025px) {
  .mobile-only {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
}

/* Utilities */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.trending-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.trending-pills .badge {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.trending-pills .badge:hover {
  opacity: 0.9;
}

.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 6px);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

body.light-mode .has-tooltip::after {
  background: rgba(15, 23, 42, 0.85);
}

.has-tooltip[data-tooltip-position="right"]::after {
  left: 100%;
  bottom: auto;
  top: 50%;
  transform: translate(8px, -50%);
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.has-tooltip[data-tooltip-position="right"]:hover::after,
.has-tooltip[data-tooltip-position="right"]:focus-visible::after {
  transform: translate(12px, -50%);
}

.badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge.badge-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge.badge-down {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Helper classes for JS */
.hidden { display: none !important; }

/* JS Generated Content Utilities */
.stock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.stock-ticker {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.stock-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.stock-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.5rem;
}

.stock-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.stock-price.positive { color: var(--accent-success); }
.stock-price.negative { color: var(--accent-danger); }

.percentage-change {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.percentage-change.positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.percentage-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Watchlist & Pins specific overrides for new layout */
.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.watch-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.5rem;
  transition: transform 0.2s;
}

.watch-card:hover {
  border-color: var(--glass-highlight);
  transform: translateY(-2px);
}

.watch-card:hover .watch-remove {
  opacity: 1 !important;
}

.watchlist-menu {
  background: var(--bg-body);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.pin-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.pin-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.pin-title { font-weight: 600; font-size: 0.9rem; }
.pin-meta { font-size: 0.8rem; color: var(--text-muted); }

.pin-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
}

.pin-remove:hover { color: var(--accent-danger); }

/* Fundamentals */
.fundamentals {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.fundamentals-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.fundamentals-item strong {
  color: var(--text-main);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

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

/* Stock Summary Card (Detailed View) */
.stock-summary-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stock-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stock-summary-ticker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.stock-summary-ticker .dot {
  width: 8px;
  height: 8px;
  background-color: #3b82f6; /* Blue-500 */
  border-radius: 50%;
}

.stock-summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stock-summary-main .stock-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.stock-summary-main .stock-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.stock-summary-main .current-price {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.stock-summary-main .cents-price {
  font-size: 1rem;
  color: var(--text-muted);
}

.stock-summary-main .stock-badge {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.9rem;
}

.stock-summary-footer {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.stock-summary-footer .stat-item {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  font-size: 1rem;
  color: var(--text-main);
}

.stock-summary-footer .stat-item .stat-label {
    color: var(--text-muted);
}

.stock-summary-footer .stat-item strong {
    font-weight: 700;
}

/* Light mode specific overrides */
body.light-mode .stock-summary-card {
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.light-mode .stock-summary-main .cents-price {
    color: #64748b;
}
