* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: radial-gradient(circle at top, #0f2027, #203a43, #2c5364);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 60px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 20px rgba(0, 255, 198, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  position: absolute;
  left: 40px;
}

.nav-logo h2 {
  font-weight: 600;
  color: white;
  font-size: 26px;
}

.nav-logo span {
  color: #00ffc6;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
}

.nav-links li a {
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
  transition: 0.3s;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 16px;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #00ffc6;
  background: rgba(0, 255, 198, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 198, 0.2);
}

.logout-btn {
  background: linear-gradient(90deg, #00ffc6, #00b3ff);
  border: none;
  color: #000;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: 0.3s;
  position: absolute;
  right: 40px;
}

.logout-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00ffc6;
}

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 40px 40px;
  animation: fadeInUp 0.9s ease;
}

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

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 30px;
}

.subtitle {
  font-size: 14px;
  color: #9fd7ff;
  margin-bottom: 4px;
}

.dashboard-header h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

.muted {
  font-size: 14px;
  color: #cfd9e4;
  max-width: 420px;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.header-pill {
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 198, 0.25);
  color: #dde6f2;
}

.primary-ghost {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 198, 0.6);
  background: transparent;
  color: #e6f7ff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: 0.25s;
}

.primary-ghost:hover {
  background: rgba(0, 255, 198, 0.12);
  box-shadow: 0 0 15px rgba(0, 255, 198, 0.35);
}

.card {
  background: rgba(255, 255, 255, 0.08);
  padding: 24px 28px;
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 0 25px rgba(0, 255, 198, 0.15);
  transition: 0.3s;
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(0, 255, 198, 0.3);
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin: 32px 0;
}

.stat-card .card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9fb6c7;
  margin-bottom: 8px;
}

.stat-card .card-value {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-card .card-caption {
  font-size: 12px;
  color: #9fb6c7;
}

.profit {
  color: #00ffc6;
}

.loss {
  color: #ff5757;
}

.dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 24px;
  margin-bottom: 40px;
}

.bottom-row {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.quick-card h3 {
  margin-bottom: 12px;
}

.chip-btn {
  border: none;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #e6f7ff;
  cursor: pointer;
  font-size: 13px;
  transition: 0.25s;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  margin: 4px 4px 4px 0;
}

.chip-btn:hover {
  border-color: rgba(0, 255, 198, 0.6);
  background: rgba(0, 255, 198, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 198, 0.35);
}

.card-caption {
  font-size: 12px;
  color: #9fb6c7;
  margin-top: 10px;
}

.goals-card h3 {
  margin-bottom: 10px;
}

.goals-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goals-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #dde6f2;
}

.about-card h3 {
  color: #00ffc6;
  font-size: 20px;
  margin-bottom: 10px;
}

.about-card p {
  color: #ddd;
  line-height: 1.6;
  font-weight: 300;
}

.about-card .tip {
  color: #00ffc6;
  font-size: 14px;
  margin-top: 10px;
  opacity: 0.8;
}

.about-card .note {
  margin-top: 10px;
  color: #aaa;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.news-header h3 span {
  color: #00ffc6;
}

.news-subtitle {
  font-size: 13px;
  color: #9fb6c7;
}

.news-subtitle .accent {
  color: #00ffc6;
}

.news-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

#newsCategory {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 198, 0.4);
  color: #e6f7ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  outline: none;
}

#newsRefreshBtn {
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 198, 0.6);
  background: transparent;
  color: #e6f7ff;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.25s;
}

#newsRefreshBtn:hover {
  background: rgba(0, 255, 198, 0.12);
  box-shadow: 0 0 12px rgba(0, 255, 198, 0.35);
}

.news-status {
  font-size: 13px;
  color: #9fb6c7;
  margin-bottom: 8px;
}

.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.news-item {
  padding: 10px 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.news-item h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.news-item p {
  font-size: 13px;
  color: #cbd8e5;
  margin-bottom: 6px;
}

.news-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #9fb6c7;
  margin-bottom: 4px;
}

.news-item a {
  color: #e6f7ff;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}

.news-item a:hover {
  text-decoration: underline;
  color: #00ffc6;
}

.footer {
  text-align: center;
  margin: 15px 0 10px;
  color: #bbb;
  font-size: 14px;
}

.footer span {
  color: #00ffc6;
}

.footer a {
  color: #00b3ff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .dashboard {
    padding: 24px 24px 32px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    align-items: flex-start;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .navbar {
    padding: 14px 18px;
  }

  .nav-logo {
    position: static;
  }

  .logout-btn {
    display: none; 
  }

  .nav-links {
    gap: 16px;
    font-size: 14px;
  }
}

.news-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#newsTopicSelect {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: radial-gradient(circle at top left, rgba(0, 255, 198, 0.18), rgba(0, 0, 0, 0.55));
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 198, 0.5);

  padding: 8px 36px 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #e6f7ff;
  outline: none;
  cursor: pointer;

  box-shadow: 0 0 12px rgba(0, 255, 198, 0.25);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.select-arrow {
  position: absolute;
  right: 12px;
  pointer-events: none;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #e6f7ff;
  opacity: 0.9;
}

#newsTopicSelect:hover {
  border-color: rgba(0, 255, 198, 0.8);
  box-shadow: 0 0 16px rgba(0, 255, 198, 0.4);
}

#newsTopicSelect:focus {
  border-color: #00ffc6;
  box-shadow: 0 0 18px rgba(0, 255, 198, 0.55);
}

#newsTopicSelect option {
  background-color: #10252f;
  color: #e6f7ff;
}

.news-refresh-btn {
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 198, 0.6);
  background: radial-gradient(circle at top left, rgba(0, 255, 198, 0.14), rgba(0, 0, 0, 0.6));
  color: #e6f7ff;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s;
  box-shadow: 0 0 10px rgba(0, 255, 198, 0.25);
}

.news-refresh-btn:hover {
  background: radial-gradient(circle at top left, rgba(0, 255, 198, 0.2), rgba(0, 0, 0, 0.5));
  box-shadow: 0 0 16px rgba(0, 255, 198, 0.5);
  transform: translateY(-1px);
}

.news-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 198, 0.6) rgba(7, 26, 40, 0.7);
}

.news-list::-webkit-scrollbar {
  width: 6px;
}

.news-list::-webkit-scrollbar-track {
  background: rgba(7, 26, 40, 0.7);
  border-radius: 999px;
}

.news-list::-webkit-scrollbar-thumb {
  background: linear-gradient(#00ffc6, #00b3ff);
  border-radius: 999px;
}

.news-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#00fff0, #1ec5ff);
}

.platform-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.platform-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 198, 0.2);
    border-radius: 10px;
    text-decoration: none;
    color: #e6f7ff;
    transition: all 0.3s ease;
}

.platform-link:hover {
    background: rgba(0, 255, 198, 0.1);
    border-color: rgba(0, 255, 198, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 198, 0.2);
}

.platform-name {
    font-weight: 600;
    font-size: 14px;
}

.platform-desc {
    font-size: 12px;
    color: #9fb6c7;
    opacity: 0.8;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 400px; 
  height: auto;
}

.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px; 
  overflow-y: auto;
  padding-right: 8px;
}

.news-item {
  padding: 16px; 
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3); 
  border: 1px solid rgba(0, 255, 198, 0.1);
  transition: all 0.3s ease;
}

.news-item:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 255, 198, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 198, 0.1);
}

.news-item h4 {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
  color: #e6f7ff;
}

.news-item p {
  font-size: 14px; 
  color: #cbd8e5;
  margin-bottom: 10px;
  line-height: 1.5;
}

.news-meta {
  display: flex;
  gap: 15px;
  font-size: 12px; 
  color: #9fb6c7;
  margin-bottom: 8px;
}

.news-item a {
  color: #00ffc6;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.news-item a:hover {
  text-decoration: underline;
  color: #00e6b3;
}

.news-item a::after {
  content: "↗";
  font-size: 12px;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 255, 198, 0.1);
}

.news-header h3 {
  font-size: 22px;
  margin-bottom: 5px;
}

.news-sub {
  font-size: 14px;
  color: #9fb6c7;
  line-height: 1.4;
}

.news-sub span {
  color: #00ffc6;
  font-weight: 500;
}

.news-status {
  font-size: 14px;
  color: #00ffc6;
  margin-bottom: 15px;
  padding: 8px 12px;
  background: rgba(0, 255, 198, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 198, 0.2);
}

.news-list::-webkit-scrollbar {
  width: 8px;
}

.news-list::-webkit-scrollbar-track {
  background: rgba(7, 26, 40, 0.8);
  border-radius: 10px;
}

.news-list::-webkit-scrollbar-thumb {
  background: linear-gradient(#00ffc6, #00b3ff);
  border-radius: 10px;
}

.news-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#00fff0, #1ec5ff);
}

@media (max-width: 900px) {
  .news-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .news-controls {
    align-self: flex-start;
  }
  
  .news-card {
    min-height: 350px;
  }
  
  .news-list {
    max-height: 280px;
  }
}

.news-list:empty::before {
  content: "No articles available. Try refreshing or selecting a different category.";
  display: block;
  text-align: center;
  color: #9fb6c7;
  font-style: italic;
  padding: 40px 20px;
}