:root {
  --background: #000000;
  --foreground: #ffffff;
  --primary: #58a6ff;
  --secondary: #238636;
  --accent: #8957e5;
  --success: #3fb950;
  --danger: #f85149;
  --muted: #8e8e93;
  --glass-bg: rgba(22, 27, 34, 0.75);
  --glass-border: rgba(48, 54, 61, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

body {
  color: var(--foreground);
  background: var(--background);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(88, 166, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(137, 87, 229, 0.1) 0%, transparent 40%);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  margin-top: 1rem;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  padding: 1.25rem;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}

.glass-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Trending Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.section-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.8rem;
  width: 100%;
}

.pill-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* PC Grid Layout (Default) */
.stock-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stock-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  text-decoration: none;
  min-height: 140px;
}

.stock-left, .stock-info {
  display: flex;
  flex-direction: column;
}

.stock-left {
  gap: 0.5rem;
}

.stock-symbol {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stock-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.stock-center {
  display: none; /* Hide activity icon on PC card to match original */
}

.stock-right {
  text-align: left;
  margin-top: 1rem;
}

.stock-price {
  font-size: 2rem;
  font-weight: 700;
}

.stock-change {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
}

/* Loading Skeleton */
.skeleton-card {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.animate-fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Mobile List Layout */
@media (max-width: 768px) {
  body {
    overscroll-behavior-y: none;
  }
  
  .header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
  }
  
  .header h1 {
    font-size: 2.5rem !important;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  .stock-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  .stock-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem;
    margin-bottom: 0.85rem;
    min-height: auto;
  }
  
  .stock-left {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  
  .stock-info {
    flex-direction: column;
  }
  
  .stock-symbol {
    font-size: 1.2rem;
  }
  
  .stock-center {
    display: flex;
    opacity: 0.8;
  }
  
  .stock-right {
    text-align: right;
    margin-top: 0;
  }
  
  .stock-price {
    font-size: 1.3rem;
  }
  
  .stock-change {
    justify-content: flex-end;
    font-size: 0.95rem;
  }
  
  .skeleton-card {
    height: 85px;
    margin-bottom: 0.85rem;
  }
}
