body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
    "Helvetica Neue", Arial, sans-serif;
  background: #0a0e1a;
  color: #e1e8f0;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: 14px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: transparent;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  right: -10%;
  bottom: -10%;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.18) 0%, transparent 50%),
              radial-gradient(circle at 40% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
  animation: gradientShift 12s ease infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

/* Floating particles effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(3px 3px at 20% 30%, rgba(59, 130, 246, 0.5), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(96, 165, 250, 0.4), transparent),
    radial-gradient(2px 2px at 50% 50%, rgba(147, 197, 253, 0.35), transparent),
    radial-gradient(2px 2px at 80% 10%, rgba(59, 130, 246, 0.4), transparent),
    radial-gradient(3px 3px at 90% 60%, rgba(96, 165, 250, 0.35), transparent),
    radial-gradient(2px 2px at 33% 90%, rgba(147, 197, 253, 0.4), transparent),
    radial-gradient(2px 2px at 45% 15%, rgba(59, 130, 246, 0.35), transparent),
    radial-gradient(3px 3px at 70% 45%, rgba(96, 165, 250, 0.4), transparent),
    radial-gradient(2px 2px at 15% 75%, rgba(147, 197, 253, 0.35), transparent),
    radial-gradient(2px 2px at 85% 35%, rgba(59, 130, 246, 0.3), transparent),
    radial-gradient(3px 3px at 25% 55%, rgba(96, 165, 250, 0.35), transparent),
    radial-gradient(2px 2px at 95% 85%, rgba(147, 197, 253, 0.4), transparent);
  background-size: 200% 200%;
  animation: floatParticles 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatParticles {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

.account-info-summary {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin: 20px 0;
}

.account-info-summary h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background: rgba(30, 41, 59, 0.5);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(59, 130, 246, 0.05);
  transition: all 0.3s ease;
}

.info-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2), inset 0 0 30px rgba(59, 130, 246, 0.1);
  transform: translateY(-5px) scale(1.03);
}

.info-label {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-value {
  font-size: 20px;
  font-weight: 600;
  color: #f1f5f9;
  text-shadow: 0 0 8px rgba(241, 245, 249, 0.3);
}

.container {
  max-width: 1400px;
  margin: 24px auto;
  padding: 24px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 60px rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  margin: 0 0 12px 0;
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
  font-weight: 600;
  letter-spacing: -0.025em;
  animation: titleGlow 3s ease-in-out infinite;
}

h1 img {
  transition: transform 0.3s ease;
}

h1:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* Market Status Indicators */
.market-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
  cursor: help;
}

.market-indicator:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.market-flag {
  font-size: 20px;
  line-height: 1;
}

.market-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.market-dot.open {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.market-dot.closed {
  background: #6b7280;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.3);
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
  }
  50% {
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.9), 0 0 40px rgba(96, 165, 250, 0.5);
  }
}

h3 {
  margin: 16px 0 8px 0;
  color: #60a5fa;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.controls input[type="text"],
.controls input[type="password"],
.controls select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(30, 41, 59, 0.6);
  color: #e1e8f0;
  transition: all 0.3s ease;
}

.controls input[type="text"]:focus,
.controls input[type="password"]:focus,
.controls select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4), 0 0 30px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.controls button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #3b82f6;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

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

.controls button:hover::before {
  left: 100%;
}

.controls button:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
  transform: translateY(-2px) scale(1.02);
}

#status {
  margin: 8px 0;
  color: #cbd5e1;
}

table.accounts,
table.holdings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

table.accounts th,
table.accounts td,
table.holdings-table th,
table.holdings-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  font-size: 14px;
  vertical-align: middle;
  white-space: nowrap;
  color: #e1e8f0;
}

table.accounts th,
table.holdings-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #60a5fa;
  font-weight: bold;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.4);
}

table.holdings-table th[style*="cursor: pointer"]:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

table.accounts tbody tr:nth-child(even),
table.holdings-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.4);
}

table.accounts tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

table.accounts tbody tr:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

table.holdings-table .highlight {
  font-weight: bold;
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

table.holdings-table .gain-positive {
  color: #10b981;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

table.holdings-table .gain-negative {
  color: #ef4444;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Price flash animation */
table.holdings-table .price-flash-up {
  animation: flashGreen 1s ease-out;
}

table.holdings-table .price-flash-down {
  animation: flashRed 1s ease-out;
}

@keyframes flashGreen {
  0% {
    background-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
  }
  100% {
    background-color: transparent;
    color: inherit;
    box-shadow: none;
  }
}

@keyframes flashRed {
  0% {
    background-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
  }
  100% {
    background-color: transparent;
    color: inherit;
    box-shadow: none;
  }
}

/* Price text color flash (for detail page) */
.price-text-flash-up {
  animation: priceTextFlashGreen 1s ease-out;
}

.price-text-flash-down {
  animation: priceTextFlashRed 1s ease-out;
}

@keyframes priceTextFlashGreen {
  0% {
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
  }
  100% {
    color: inherit;
    text-shadow: inherit;
  }
}

@keyframes priceTextFlashRed {
  0% {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
  }
  100% {
    color: inherit;
    text-shadow: inherit;
  }
}

#positions {
  margin-top: 24px;
}

/* Stock detail page styles */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
  transition: all 0.3s ease;
}

.back-link:hover {
  color: #93c5fd;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.6);
}

#stock-header {
  margin-bottom: 24px;
}

#stock-header h1 {
  margin: 0 0 4px 0;
  font-size: 32px;
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
}

#stock-symbol {
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

#quote-section,
#combined-section {
  margin: 24px 0;
  padding: 20px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#quote-section h2,
#combined-section h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
  color: #60a5fa;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.position-stat {
  padding: 14px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease;
}

.position-stat:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.position-stat.gain-positive {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

.position-stat.gain-negative {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}

.stat-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
  color: #f1f5f9;
}

.stat-percent {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.position-stat.gain-positive .stat-value,
.position-stat.gain-positive .stat-percent {
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.position-stat.gain-negative .stat-value,
.position-stat.gain-negative .stat-percent {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.position-stat .stat-value.highlight {
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
}

.quote-main {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-price-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-price-large {
  font-size: 48px;
  font-weight: bold;
  color: #f1f5f9;
  text-shadow: 0 0 15px rgba(241, 245, 249, 0.3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.quote-change {
  font-size: 24px;
  font-weight: bold;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.streaming-indicator {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  animation: pulse 2s infinite;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

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

.quote-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.info-grid,
.quote-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.info-row,
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-value {
  font-size: 20px;
  font-weight: 500;
  color: #f1f5f9;
  text-shadow: 0 0 8px rgba(241, 245, 249, 0.3);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.timestamp {
  margin-top: 12px;
  font-size: 14px;
  color: #94a3b8;
  font-style: italic;
}

.note {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid #fbbf24;
  font-size: 13px;
  color: #cbd5e1;
  border-radius: 4px;
}

.error-message {
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  color: #ef4444;
  margin-top: 16px;
}

.error-text {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

table.holdings-table tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
  animation: rowFadeIn 0.4s ease-out backwards;
}

table.holdings-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
table.holdings-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
table.holdings-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
table.holdings-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
table.holdings-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
table.holdings-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
table.holdings-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
table.holdings-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
table.holdings-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
table.holdings-table tbody tr:nth-child(10) { animation-delay: 0.5s; }

@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

table.holdings-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* News Section Styles */
#news-section {
  margin-top: 30px;
}

#news-section h2 {
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  margin-bottom: 20px;
}

#news-data {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-item {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
  animation: newsSlideIn 0.5s ease-out backwards;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.15s; }
.news-item:nth-child(3) { animation-delay: 0.2s; }
.news-item:nth-child(4) { animation-delay: 0.25s; }
.news-item:nth-child(5) { animation-delay: 0.3s; }

@keyframes newsSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
  transform: translateY(-4px) scale(1.01);
}

.news-header {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.news-header > div {
  flex: 1;
}

.news-title {
  color: #e1e8f0;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
  transition: color 0.2s;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.news-title:hover {
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.news-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.news-source {
  font-weight: 600;
  color: #cbd5e1;
}

.news-time {
  color: #94a3b8;
}

.news-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.news-summary {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 0 0;
}

.news-ticker-sentiment {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 12px;
  color: #94a3b8;
}

.show-more-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  backdrop-filter: blur(10px);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.show-more-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.show-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* AI Summary Styles */
#ai-summary-section {
  animation: fadeInUp 0.6s ease-out;
}

.ai-summary-box {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  overflow: hidden;
  min-height: 120px;
  transition: border-color 0.3s ease;
}

.ai-summary-box:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.ai-loading-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.1) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.ai-summary-box.loaded .ai-loading-shimmer {
  display: none;
}

.ai-icon {
  opacity: 0.9;
}

.ai-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #3b82f6;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

#ai-summary-content p {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 15px;
  margin: 0;
  position: relative;
  z-index: 2;
}

#ai-summary-content.loading p {
  opacity: 0.4;
}

#ai-summary-content.loaded p {
  animation: textReveal 0.8s ease-out forwards;
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#ai-summary-content .ai-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 12px;
  font-style: italic;
}

#ai-summary-content .ai-warning {
  color: #f59e0b;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 8px;
}

#ai-summary-content .ai-warning a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

#ai-summary-content .ai-warning a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

#ai-summary-content.error p {
  color: #ef4444;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Earnings Chart Styles */
#earnings-section {
  margin: 24px 0;
  padding: 24px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#earnings-section h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #60a5fa;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.5);
}

.earnings-legend {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #cbd5e1;
}

.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-dot.actual {
  background: #10b981;
}

.legend-dot.estimate {
  background: #60a5fa;
}

.earnings-chart-container {
  display: flex;
  gap: 16px;
  justify-content: space-around;
  align-items: flex-end;
  min-height: 250px;
  padding: 20px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  position: relative;
}

.earnings-quarter {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 120px;
}

.bars-container {
  width: 100%;
  height: 200px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.bar {
  flex: 1;
  min-height: 30px;
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.bar.estimate {
  background: linear-gradient(to top, #3b82f6, #60a5fa);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.bar.actual {
  background: linear-gradient(to top, #059669, #10b981);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.bar.actual.miss {
  background: linear-gradient(to top, #dc2626, #ef4444);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.bar:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.6);
}

.bar-value {
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.quarter-label {
  text-align: center;
  font-size: 12px;
}

.quarter-date {
  color: #cbd5e1;
  font-weight: 500;
  margin-bottom: 4px;
}

.quarter-info {
  color: #94a3b8;
  font-size: 11px;
  margin-bottom: 4px;
}

.surprise {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
}

.surprise.beat {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.surprise.miss {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Earnings Estimates Styles */
.estimates-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.next-earnings-date {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  color: #93c5fd;
  margin-bottom: 8px;
}

.next-earnings-date strong {
  color: #60a5fa;
  font-weight: 600;
}

.estimates-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.estimates-title {
  margin: 0;
  font-size: 18px;
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.estimates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.estimate-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
}

.estimate-card:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.estimate-period {
  font-size: 14px;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.estimate-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.estimate-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.estimate-metric .metric-label {
  font-size: 12px;
  color: #94a3b8;
}

.estimate-metric .metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
}

/* ============================================
   PRICE CHART STYLES
   ============================================ */

#chart-container {
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.chart-percent-indicator {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 16px;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}

#chart-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px 16px 0 16px;
  flex-wrap: wrap;
}

#price-chart {
  display: block;
  margin: 0 auto;
}

.chart-btn {
  padding: 6px 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.chart-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(59, 130, 246, 0.5);
  color: #cbd5e1;
}

.chart-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

#price-chart {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  cursor: crosshair;
}

#chart-loading {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.chart-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  color: #e2e8f0;
  font-size: 13px;
  pointer-events: none;
  z-index: 1000;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Responsive chart layout */
@media (max-width: 1024px) {
  #quote-section > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  #chart-container {
    margin-top: 20px;
  }
}

/* ============================================
   ANALYST RECOMMENDATIONS
   ============================================ */

.recommendations-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.rec-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.rec-period {
  min-width: 80px;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.rec-bar {
  flex: 1;
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rec-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  transition: all 0.2s ease;
  cursor: default;
}

.rec-segment span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.rec-segment:hover {
  filter: brightness(1.2);
}

.rec-strong-buy {
  background: linear-gradient(to right, #065f46, #047857);
}

.rec-buy {
  background: linear-gradient(to right, #059669, #10b981);
}

.rec-hold {
  background: linear-gradient(to right, #d97706, #f59e0b);
}

.rec-sell {
  background: linear-gradient(to right, #dc2626, #ef4444);
}

.rec-strong-sell {
  background: linear-gradient(to right, #991b1b, #dc2626);
}

.rec-total {
  min-width: 40px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.rec-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.rec-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.rec-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#recommendations-section {
  margin-bottom: 24px;
}

#recommendations-section h2 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #e1e8f0;
}

/* ============================================
   STOCK SEARCH
   ============================================ */

.search-container {
  position: relative;
  width: 320px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.search-container:focus-within .search-icon {
  color: #3b82f6;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  color: #e1e8f0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-input::placeholder {
  color: #64748b;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15),
              0 8px 24px rgba(0, 0, 0, 0.3);
  background: rgba(15, 23, 42, 0.8);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-results.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
}

.search-result-item {
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: slideInResult 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInResult {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.search-result-item:hover,
.search-result-item.active {
  background: rgba(59, 130, 246, 0.15);
  border-left: 3px solid #3b82f6;
  padding-left: 13px;
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.search-result-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.search-result-symbol {
  font-size: 15px;
  font-weight: 600;
  color: #e1e8f0;
  letter-spacing: 0.02em;
}

.search-result-name {
  font-size: 13px;
  color: #94a3b8;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-result-type {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.type-equity {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.type-etf {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.type-index {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.type-fund {
  background: rgba(168, 85, 247, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.type-other {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.search-result-exchange {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.search-loading,
.search-no-results,
.search-error {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.search-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.search-error {
  color: #ef4444;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }
  
  .container {
    padding: 12px;
    max-width: 100%;
  }
  
  /* Header adjustments */
  h1 {
    font-size: 18px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  
  h1 > div:first-child img {
    width: 48px !important;
    height: 48px !important;
  }
  
  /* Search bar */
  .search-container {
    width: 100% !important;
    max-width: 100%;
  }
  
  .search-input {
    font-size: 13px;
    padding: 10px 14px 10px 38px;
  }
  
  .search-results {
    max-height: 300px;
  }
  
  /* Market status */
  #market-status {
    flex-direction: column;
    gap: 8px !important;
    width: 100%;
  }
  
  .market-indicator {
    font-size: 11px !important;
    padding: 6px 12px !important;
  }
  
  /* Controls section */
  .controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .controls label {
    width: 100%;
  }
  
  .controls input {
    width: 100%;
  }
  
  .controls button {
    width: 100%;
    padding: 12px;
  }
  
  /* Cards */
  .card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .card h2 {
    font-size: 16px;
  }
  
  /* Stock detail page header */
  #stock-header h1 {
    font-size: 20px !important;
  }
  
  #stock-header p {
    font-size: 13px;
  }
  
  /* Quote section - stack vertically */
  #quote-section > div[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .quote-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  
  .quote-item {
    font-size: 12px;
  }
  
  /* Chart controls */
  #chart-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  .chart-btn {
    font-size: 11px;
    padding: 8px 6px;
  }
  
  #price-chart {
    height: 250px !important;
  }
  
  /* Combined section - stack vertically */
  #combined-section > div[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Financials grid */
  .financials-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  .financial-item {
    font-size: 12px;
  }
  
  /* News section */
  .news-item {
    padding: 12px;
  }
  
  .news-title {
    font-size: 13px;
  }
  
  .news-summary {
    font-size: 12px;
  }
  
  .news-meta {
    font-size: 11px;
  }
  
  /* Earnings chart */
  .earnings-chart-container {
    min-height: 200px;
    padding: 15px 5px;
    gap: 8px;
  }
  
  .earnings-quarter {
    max-width: 80px;
  }
  
  .bars-container {
    height: 150px;
    gap: 4px;
  }
  
  .bar-value {
    font-size: 10px;
  }
  
  .quarter-label {
    font-size: 10px;
  }
  
  .surprise {
    font-size: 9px;
  }
  
  /* Estimates grid */
  .estimates-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .estimate-card {
    padding: 12px;
  }
  
  .estimate-period {
    font-size: 13px;
  }
  
  .metric-label,
  .metric-value {
    font-size: 11px;
  }
  
  /* Recommendations */
  .rec-bar-wrapper {
    gap: 8px;
  }
  
  .rec-period {
    min-width: 60px;
    font-size: 11px;
  }
  
  .rec-bar {
    height: 28px;
  }
  
  .rec-segment {
    font-size: 10px;
  }
  
  .rec-total {
    min-width: 30px;
    font-size: 11px;
  }
  
  .rec-legend {
    gap: 12px;
    font-size: 10px;
  }
  
  .rec-legend-color {
    width: 12px;
    height: 12px;
  }
  
  /* Account summary */
  .account-info-summary {
    padding: 15px;
  }
  
  .summary-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Position table */
  .position-row {
    font-size: 11px;
    padding: 10px 8px;
  }
  
  /* Back link */
  .back-link {
    font-size: 13px;
    margin-bottom: 12px;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }
  
  h1 {
    font-size: 16px !important;
  }
  
  h1 > div:first-child {
    gap: 8px !important;
  }
  
  h1 > div:first-child img {
    width: 40px !important;
    height: 40px !important;
  }
  
  .card {
    padding: 12px;
  }
  
  .card h2 {
    font-size: 14px;
  }
  
  /* AI Summary adjustments */
  #ai-summary-section h2 {
    font-size: 14px;
  }
  
  #ai-summary-content p {
    font-size: 13px;
    line-height: 1.6;
  }
  
  /* Chart controls - 4 columns */
  #chart-controls {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  
  .chart-btn {
    font-size: 10px;
    padding: 6px 4px;
  }
  
  #price-chart {
    height: 200px !important;
  }
  
  /* Quote grid - single column on very small screens */
  .quote-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Earnings chart - show fewer quarters */
  .earnings-quarter:nth-child(n+7) {
    display: none;
  }
  
  .earnings-quarter {
    max-width: 70px;
  }
  
  /* Search results */
  .search-result-item {
    padding: 10px 12px;
  }
  
  .search-result-symbol {
    font-size: 13px;
  }
  
  .search-result-name {
    font-size: 11px;
  }
  
  /* News items */
  .news-item {
    padding: 10px;
  }
  
  .news-title {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .news-summary {
    font-size: 11px;
    line-height: 1.4;
  }
  
  /* Recommendations legend - wrap */
  .rec-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
  #price-chart {
    height: 200px !important;
  }
  
  .earnings-chart-container {
    min-height: 180px;
  }
  
  .bars-container {
    height: 130px;
  }
}

/* Firi Crypto Balances Styles */
.firi-container {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

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

.firi-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #e1e8f0;
}

.firi-summary-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.firi-summary-card {
  background: rgba(30, 41, 59, 0.5);
  padding: 16px 24px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(59, 130, 246, 0.05);
  transition: all 0.3s ease;
  min-width: 180px;
}

.firi-summary-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2), inset 0 0 30px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.firi-card-label {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.firi-card-value {
  font-size: 24px;
  font-weight: 700;
  color: #60a5fa;
  font-variant-numeric: tabular-nums;
}

.firi-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.firi-total-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.firi-total-value {
  font-size: 24px;
  font-weight: 700;
  color: #60a5fa;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

.firi-table-container {
  overflow-x: hidden;
}

.firi-table {
  width: 100%;
  border-collapse: collapse;
}

.firi-table thead {
  background: rgba(30, 41, 59, 0.5);
}

.firi-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.firi-table tbody tr {
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  transition: background-color 0.15s;
}

.firi-table tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.3);
}

.firi-table td {
  padding: 16px;
  font-size: 14px;
  color: #e1e8f0;
  font-variant-numeric: tabular-nums;
}

.crypto-currency {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.crypto-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
}

.crypto-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.crypto-symbol {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.8);
  color: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.crypto-balance {
  font-weight: 500;
  color: #cbd5e1;
}

.crypto-price-positive {
  color: #e1e8f0;
  font-weight: 500;
}

.crypto-market-value {
  color: #60a5fa;
  font-weight: 600;
  font-size: 15px;
}

.crypto-price {
  transition: all 0.3s ease;
}

.crypto-market-value {
  transition: all 0.3s ease;
}

/* Crypto price flash animations */
.crypto-price.price-flash-up {
  animation: flashGreen 1s ease-out;
}

.crypto-price.price-flash-down {
  animation: flashRed 1s ease-out;
}

.firi-empty {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 14px;
}

/* Firi Login Styles */
.firi-login-container {
  margin-top: 24px;
}

.firi-login-prompt {
  text-align: center;
  padding: 60px 40px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.firi-login-prompt p {
  color: #94a3b8;
  font-size: 16px;
  margin-bottom: 24px;
}

.firi-credentials-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 16px;
}

.firi-api-key-input {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 16px;
  align-items: stretch;
}

.api-key-field {
  flex: 1;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  color: #e1e8f0;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
}

.api-key-field:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.api-key-field::placeholder {
  color: #64748b;
}

.firi-login-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  white-space: nowrap;
}

.firi-login-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.firi-login-btn:active {
  transform: translateY(0);
}

.firi-help-text {
  font-size: 13px;
  color: #64748b;
  margin-top: 16px;
}

.firi-help-text a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.firi-help-text a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Tab Navigation Styles */
.tab-container {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  position: relative;
  z-index: 1;
}

.tab-button {
  flex: 1;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
  opacity: 0;
  transition: opacity 0.3s;
}

.tab-button:hover:not(.active) {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
  transform: translateY(-2px);
}

.tab-button:hover:not(.active)::before {
  opacity: 1;
}

.tab-button.active {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.3),
              inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
  position: relative;
  z-index: 1;
}

.tab-content.active {
  display: block;
}

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

/* Mobile responsive for tabs */
@media (max-width: 768px) {
  .tab-button {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* Mobile responsive for Firi */
@media (max-width: 768px) {
  .firi-container {
    padding: 16px;
    margin: 16px 0;
  }
  
  .firi-header h2 {
    font-size: 18px;
  }
  
  .firi-summary-cards {
    width: 100%;
  }
  
  .firi-summary-card {
    flex: 1 1 auto;
    min-width: 140px;
  }
  
  .firi-card-value {
    font-size: 20px;
  }
  
  .firi-total-value {
    font-size: 20px;
  }
  
  .firi-table th,
  .firi-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  .crypto-symbol {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .crypto-market-value {
    font-size: 13px;
  }
}

/* Crypto detail page styles */
.crypto-row {
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.crypto-row:hover {
  background-color: rgba(59, 130, 246, 0.08) !important;
  transform: scale(1.01);
}

.description-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 20px;
  color: #cbd5e1;
  line-height: 1.8;
  white-space: pre-wrap;
}

.external-link {
  display: inline-block;
  padding: 10px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
}

.external-link:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}


