:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #3f37c9;
  --accent: #4895ef;
  --danger: #f72585;
  --success: #4cc9f0;
  --warning: #f8961e;
  --dark: #212529;
  --light: #f8f9fa;
  --gray: #6c757d;
  --white: #ffffff;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: #f5f7fa;
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 1.8rem;
  color: var(--white);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a:hover {
  opacity: 0.8;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Watchlist Page Styles */
.watchlist-header {
  padding: 3rem 0 2rem;
  background: var(--white);
}

.watchlist-header h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.watchlist-header p {
  color: var(--gray);
  max-width: 700px;
}

.watchlist-empty {
  text-align: center;
  padding: 5rem 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  margin: 2rem 0;
}

.watchlist-empty i {
  font-size: 3rem;
  color: var(--warning);
  margin-bottom: 1.5rem;
}

.watchlist-empty h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.watchlist-empty p {
  color: var(--gray);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.watchlist-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.watchlist-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.stock-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
}

.stock-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.stock-details p {
  font-size: 0.8rem;
  color: var(--gray);
}

.remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.1rem;
}

.stock-price {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stock-change {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.positive {
  color: var(--success);
}

.negative {
  color: var(--danger);
}

.chart-container {
  height: 150px;
  margin-top: 1rem;
}

/* Performance Section */
.performance-section {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}

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

.performance-header h3 {
  font-size: 1.3rem;
}

.time-filters {
  display: flex;
  gap: 0.5rem;
}

.time-filter {
  padding: 0.5rem 1rem;
  background: var(--light);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
}

.time-filter.active {
  background: var(--primary);
  color: var(--white);
}

.performance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--light);
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray);
}

.performance-chart {
  height: 300px;
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-col h4:after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  background: var(--primary);
  bottom: -8px;
  left: 0;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #adb5bd;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #adb5bd;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .header-container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: var(--primary);
    padding: 1rem 0;
    transition: var(--transition);
    z-index: 999;
  }

  nav.active {
    left: 0;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .performance-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .watchlist-header h2 {
    font-size: 1.8rem;
  }

  .performance-stats {
    grid-template-columns: 1fr;
  }

  .time-filters {
    flex-wrap: wrap;
  }
}
