body {
  background: #fafafa;
  color: #333333;
  margin-top: 5rem;
}

h1, h2, h3, h4, h5, h6 {
  color: #444444;
}

.bg-steel {
  background-color: #5f788a;
}

.site-header .navbar-nav .nav-link {
  color: #cbd5db;
}

.site-header .navbar-nav .nav-link:hover {
  color: #ffffff;
}

.site-header .navbar-nav .nav-link.active {
  font-weight: 500;
}

.content-section {
  background: #ffffff;
  padding: 10px 20px;
  border: 1px solid #dddddd;
  border-radius: 3px;
  margin-bottom: 20px;
}

.article-title {
  color: #444444;
}

a.article-title:hover {
  color: #428bca;
  text-decoration: none;
}

.article-content {
  white-space: pre-line;
}

.article-img {
  height: 65px;
  width: 65px;
  margin-right: 16px;
}

.article-metadata {
  padding-bottom: 1px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e3e3e3
}

.article-metadata a:hover {
  color: #333;
  text-decoration: none;
}

.article-svg {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}

.account-img {
  height: 125px;
  width: 125px;
  margin-right: 20px;
  margin-bottom: 16px;
}

.account-heading {
  font-size: 2.5rem;
}

/* Profile Section Styles */
.profile-avatar-container {
  position: relative;
  display: inline-block;
}

.profile-edit-btn {
  position: absolute;
  top: 0;
  right: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #007bff;
  transition: all 0.3s ease;
}

.profile-edit-btn:hover {
  background: #007bff;
  color: #fff;
  transform: scale(1.1);
}

.email-display-container {
  margin-top: 20px;
}

.email-display {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.email-text {
  font-size: 1.2rem;
  color: #333;
  font-weight: 500;
}

.email-edit-form {
  animation: slideDown 0.3s ease;
}



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

.profile-card {
  background: transparent;
  border: none;
  box-shadow: none;
}

.profile-card .card-header {
  background: transparent;
  color: #333;
  border: none;
  padding-bottom: 20px;
}

.profile-card .card-body {
  padding: 0;
}



#stock_input {
  align-items: flex-start;
}

input.error {
  border-color: red;
}

label.error {
  display:block;
  width:100%;
  color: red
}

/* User Avatar Dropdown Styles */
.user-avatar-small {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.user-avatar-small:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.user-avatar-medium {
  width: 48px;
  height: 48px;
  border: 2px solid #dee2e6;
  font-size: 1.2rem;
}

/* Avatar initials styling */
.user-avatar-small.d-flex,
.user-avatar-medium.d-flex {
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.user-avatar-small.d-flex:hover,
.user-avatar-medium.d-flex:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

/* Account page avatar */
.account-img.d-flex {
  width: 125px;
  height: 125px;
  border: 3px solid #dee2e6;
  transition: all 0.3s ease;
}

/* Article/post avatar */
.article-img.d-flex {
  width: 65px;
  height: 65px;
  margin-right: 16px;
  border: 2px solid #dee2e6;
}

/* Premium user avatar with gold border */
.user-info-header.premium .user-avatar-medium {
  border: 2px solid #d4af37;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.user-avatar-link {
  padding: 0.375rem 0.75rem !important;
  display: flex;
  align-items: center;
}

.user-avatar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

.user-dropdown {
  min-width: 280px;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  border-radius: 0.5rem;
  overflow: hidden;
}

.user-info-header {
  padding: 1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none !important;
}

/* Default member background (gray gradient) */
.user-info-header.member {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Premium member background (black-gold gradient for luxury feel) */
.user-info-header.premium {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 30%, #d4af37 70%, #ffd700 100%);
}

.user-info-text {
  flex: 1;
}

.user-email {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.user-level {
  font-size: 0.8rem;
}

.user-level .badge {
  margin-bottom: 0;
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
}

/* Premium badge styling for black-gold theme */
.user-info-header.premium .badge-primary {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #f4e99b 100%);
  color: #1a1a1a;
  font-weight: 600;
  border: 1px solid #b8860b;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
  animation: shimmer 2s ease-in-out infinite alternate;
  position: relative;
  overflow: hidden;
}

.user-info-header.premium .badge-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
  }
  100% {
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
  100% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
}

/* Account page premium badge styling to match dropdown */
.badge-premium {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #f4e99b 100%) !important;
  color: #1a1a1a !important;
  font-weight: 600 !important;
  border: 1px solid #b8860b !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4) !important;
  animation: shimmer 2s ease-in-out infinite alternate !important;
  position: relative !important;
  overflow: hidden !important;
}

.badge-premium::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s ease-in-out infinite;
}

.user-dropdown .dropdown-item {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.user-dropdown .dropdown-item:hover {
  background-color: #f8f9fa;
  padding-left: 1.25rem;
}

.user-dropdown .dropdown-item i {
  width: 20px;
  color: #6c757d;
}

.user-dropdown .dropdown-item:hover i {
  color: #007bff;
}

.user-dropdown .dropdown-divider {
  margin: 0;
  border-color: #e9ecef;
}

/* Special styling for upgrade button - enhanced with champagne gold theme */
.user-dropdown .dropdown-item.upgrade-btn {
  position: relative;
  overflow: hidden;
}

.user-dropdown .dropdown-item.upgrade-btn:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff3cd 50%, #ffeaa7 100%);
  color: #1a1a1a;
  padding-left: 1.25rem;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.user-dropdown .dropdown-item.upgrade-btn:hover i {
  color: #d4af37;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Account page upgrade button styling to match dropdown theme */
.upgrade-sidebar-btn {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff3cd 50%, #ffeaa7 100%) !important;
  border-color: #d4af37 !important;
  color: #1a1a1a !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.upgrade-sidebar-btn:hover {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #f4e99b 100%) !important;
  border-color: #b8860b !important;
  color: #1a1a1a !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Premium feature overlay styles */
.content-overlay {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(2px);
}

.premium-prompt {
  background: white !important;
  border: 2px solid #d4af37 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 20px rgba(212, 175, 55, 0.2) !important;
  border-radius: 12px !important;
  max-width: 400px;
  margin: 20px;
}

.premium-prompt h5 {
  color: #1a1a1a !important;
  font-weight: 600 !important;
  margin-bottom: 1rem !important;
}

.premium-prompt p {
  color: #495057 !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}

/* Override btn-dark styles specifically in premium prompt */
.premium-prompt .btn-dark.upgrade-sidebar-btn {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #f4e99b 100%) !important;
  border-color: #b8860b !important;
  color: #1a1a1a !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.premium-prompt .btn-dark.upgrade-sidebar-btn:hover {
  background: linear-gradient(135deg, #b8860b 0%, #d4af37 50%, #ffd700 100%) !important;
  border-color: #996f0a !important;
  color: #1a1a1a !important;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5) !important;
  transform: translateY(-2px) !important;
}

.premium-prompt .btn-dark.upgrade-sidebar-btn .text-white {
  color: #1a1a1a !important;
}

.premium-prompt .btn-dark.upgrade-sidebar-btn .text-warning {
  color: #1a1a1a !important;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}

/* Stock compare page premium prompt styles */
.prediction-upgrade-prompt .premium-prompt {
  background: white !important;
  border: 2px solid #d4af37 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 15px rgba(212, 175, 55, 0.2) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1.5rem !important;
  margin: 0.5rem 0 !important;
  min-width: fit-content !important;
  overflow: visible !important;
}

.prediction-upgrade-prompt {
  padding: 0.5rem 0 !important;
  margin-top: -0.5rem !important;
}

.prediction-upgrade-prompt .btn-dark.upgrade-sidebar-btn,
.prediction-upgrade-prompt .btn-dark.sidebar-login-btn {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #f4e99b 100%) !important;
  border-color: #b8860b !important;
  color: #1a1a1a !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  padding: 0.375rem 1rem !important;
}

.prediction-upgrade-prompt .btn-dark.upgrade-sidebar-btn:hover,
.prediction-upgrade-prompt .btn-dark.sidebar-login-btn:hover {
  background: linear-gradient(135deg, #b8860b 0%, #d4af37 50%, #ffd700 100%) !important;
  border-color: #996f0a !important;
  color: #1a1a1a !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-1px) !important;
}

.prediction-upgrade-prompt .btn-dark .text-white {
  color: #1a1a1a !important;
}

.prediction-upgrade-prompt .btn-dark .text-warning {
  color: #1a1a1a !important;
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

/* Ensure prediction upgrade prompt text stays on one line */
.prediction-upgrade-prompt .d-flex {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

.prediction-upgrade-prompt .d-flex span {
  white-space: nowrap !important;
  font-size: 0.9rem !important;
  color: #495057 !important;
  flex-shrink: 0 !important;
}

/* Responsive handling for smaller screens */
@media (max-width: 768px) {
  .prediction-upgrade-prompt .d-flex span {
    font-size: 0.8rem !important;
  }
  
  .prediction-upgrade-prompt .btn-sm {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.75rem !important;
  }
}

/* Account page mobile optimizations */
@media (max-width: 768px) {
  /* Account page title size reductions */
  .account-title {
    font-size: 1.5rem !important;
  }
  
  .card-title {
    font-size: 1.2rem !important;
  }
  
  /* Account page form input improvements */
  .email-change-form .form-control,
  .password-change-form .form-control {
    width: 100% !important;
    padding-left: 0.75rem !important;
    margin-bottom: 0.5rem;
  }
  
  /* Account page email and password display improvements */
  .email-display .mb-2,
  .password-display .mb-2 {
    line-height: 1.6;
  }
  
  .email-display .btn,
  .password-display .btn {
    margin-top: 0.25rem;
  }
  
  /* Account page button overflow fixes */
  .card-header .btn-sm {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    white-space: nowrap;
  }
  
  /* Subscription card header responsive layout */
  .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  /* Improve card header spacing on mobile */
  .card-header {
    padding: 1rem !important;
  }
  
  /* Account page form labels */
  .email-change-form .form-label,
  .password-change-form .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  /* Account page form help text */
  .email-change-form .form-text,
  .password-change-form .form-text {
    font-size: 0.8rem;
  }
  
  /* Account page button spacing */
  .email-change-form .form-group,
  .password-change-form .form-group {
    margin-bottom: 1rem;
  }
  
  /* Profile avatar container mobile adjustments */
  .profile-avatar-container {
    margin-bottom: 1rem;
  }
  
  .account-img {
    width: 120px !important;
    height: 120px !important;
  }
  
  /* Flagship Model page Top Holdings mobile optimizations */
  #portfolioComponentsHeader .btn-sm {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
  }
  
  #portfolioComponentsHeader .dropdown-toggle {
    min-width: auto !important;
  }
  
  /* Ensure Top Holdings header buttons don't overflow */
  #portfolioComponentsHeader .d-flex {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  /* Copy button text adjustment on mobile */
  #copyPortfolioBtn .me-1 {
    margin-right: 0.25rem !important;
  }
  
  /* Year dropdown button adjustment */
  #yearDropdown {
    padding: 0.2rem 0.5rem !important;
  }
}
