:root {

  --font-family: 'Inter', 'Poppins', 'Roboto', sans-serif;

  --nav-bg: linear-gradient(90deg, #2c3e50, #3498db);
  --net-worth-bg: #1e88e5;
  --total-profit-bg: #2ecc71;
  --invested-bg: #8b4513;
  --background-color: #f5f5f5;
  --card-background: #ffffff;
  --white: #ffffff;
  --text-color: #333;
  --border-color: #ddd;
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --error-color: #e74c3c;
  --motivation-color: #00b894;
  --border-radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --background-gradient: linear-gradient(180deg, #f0f4f8 0%, #ffffff 100%);
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);

  background: var(--background-gradient);

  color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: 500;
}

/* Top Navigation Bar */
.top-nav {
  background: var(--nav-bg);
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  gap: 2rem;
}

.nav-icon {
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  padding: 0.5rem;
  border-radius: 12px;
}

.nav-icon:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-icon.active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-icon.active span {
  font-weight: bold;
}

.nav-img {
  width: 40px;
  height: 40px;
}

.nav-icon span {
  font-weight: 500;
  font-size: 1rem;
}

.credits-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 50px;
}

.credits-icon {
  width: 40px;
  height: 40px;
}

.add-credits-btn {
  background-color: var(--white);
  color: var(--text-color);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Content */
main {
  margin-top: 100px;
  padding: 2rem;
}

section {
  animation: fadeIn 0.4s ease;
}

/* Welcome Section */
.welcome-section {
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-section h1 {
  font-size: 4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-color);
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  padding: 2rem;
  border-radius: 25px;
  color: var(--white);
}

.stat-card.net-worth {
  background-color: var(--net-worth-bg);
}

.stat-card.total-profit {
  background-color: var(--total-profit-bg);
}

.stat-card.invested {
  background-color: var(--invested-bg);
}

.stat-card h2 {
  font-size: 2rem;
  margin: 0 0 1rem 0;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.stat-description {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0;
}

/* Motivation Message */
.motivation-message {
  text-align: center;
  margin-top: 3rem;
}

.motivation-message h2 {
  font-size: 3.5rem;
  color: var(--motivation-color);
  margin: 0;
  font-weight: bold;
}

/* Login and User Profile */
.login-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-left: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.login-btn:hover {
  background-color: var(--secondary-color);
}

#userProfile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1rem;
}

#profilePicture {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Market Section */
.market-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  gap: 2rem;
}

.market-overview {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.market-stats {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.nepse-index {
  text-align: center;
}

.nepse-index h2 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
}

.index-value {
  font-size: 2.5rem;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.market-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.metric {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 180, 216, 0.1);
  border-radius: var(--border-radius);
}

.metric h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text-color);
}

.metric span {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Search Styles */
.market-search {
  position: relative;
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
}

#stockSearch {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
}

#stockSearch:focus {
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.sector-categories {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sector-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.selected-sector {
  font-weight: 600;
  color: var(--text-muted);
}

.sector-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 180, 216, 0.08);
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.sector-chip .chip-count {
  background: rgba(0, 180, 216, 0.15);
  color: var(--primary-color);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.sector-chip:hover {
  background: rgba(0, 180, 216, 0.15);
  transform: translateY(-1px);
}

.sector-chip.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.sector-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.sector-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Market Movers */
.movers-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.gainers-table, .losers-table {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.gainers-table h3, .losers-table h3 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
}

#gainersTable, #losersTable {
  width: 100%;
  border-collapse: collapse;
}

#gainersTable th, #losersTable th,
#gainersTable td, #losersTable td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.gain { color: var(--success-color); }
.loss { color: var(--error-color); }

/* All Stocks Table */
.all-stocks {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.all-stocks h3 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
}

#allStocksTable {
  width: 100%;
  border-collapse: collapse;
}

#allStocksTable th,
#allStocksTable td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#allStocksTable th {
  background: rgba(0, 180, 216, 0.1);
  font-weight: 600;
}

@keyframes highlightRow {
  0% { background-color: rgba(0, 180, 216, 0.3); }
  100% { background-color: transparent; }
}

#allStocksTable tr.highlight {
  animation: highlightRow 2s ease-out;
}

/* Trade Form */
.trade-form {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.trade-form h3 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
}

.trade-inputs {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 1rem;
  align-items: start;
}

.trade-form input {
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.trade-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.trade-form button:hover {
  background: var(--secondary-color);
}

#tradeResult {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
}

/* Responsive Design for Market Section */
@media (max-width: 1024px) {
  .market-stats {
    grid-template-columns: 1fr;
  }
  
  .market-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sector-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-sector {
    align-self: flex-start;
  }

  .movers-container {
    grid-template-columns: 1fr;
  }
  
  .market-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trade-inputs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .market-metrics {
    grid-template-columns: 1fr;
  }
  
  .market-content {
    padding: 1rem;
  }
}

/* Team Section */
.team-section {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.team-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.team-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.team-header p {
  margin: 0;
  color: #555;
  font-size: 1.05rem;
}

.team-category {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.category-header {
  display: flex;
  align-items: center;
}

.category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.category-label.management {
  background-color: #ffe9d6;
  color: #d35400;
  border: 2px solid #ffb26b;
}

.category-label.research {
  background-color: #dff0ff;
  color: #0f62a9;
  border: 2px solid #5dade2;
}

.category-label.finance {
  background-color: #fff5d6;
  color: #b78600;
  border: 2px solid #f6c343;
}

.category-label.marketing {
  background-color: #e0f6e9;
  color: #1f7a45;
  border: 2px solid #4cd964;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.team-grid.single {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.team-card {
  background: var(--card-background);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 12px 24px rgba(15, 24, 44, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  border-top: 4px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(15, 24, 44, 0.12);
}

.team-card.leader {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.team-card.management-card {
  border-top-color: #ff9f43;
}

.team-card.research-card {
  border-top-color: #3498db;
}

.team-card.finance-card {
  border-top-color: #f1c40f;
}

.team-card.marketing-card {
  border-top-color: #27ae60;
}

.member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c3e50;
  position: relative;
  overflow: hidden;
}

.member-avatar img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.member-initials {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.member-role {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5f6a7d;
  margin: 0;
}

.member-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f2937;
}

.team-card.leader .member-name {
  font-size: 1.4rem;
}

[data-theme="dark"] .team-header p {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .team-card {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .team-card:hover {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .member-avatar {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  color: #f8fafc;
}

[data-theme="dark"] .member-initials {
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
}

[data-theme="dark"] .member-role {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .member-name {
  color: #f9fafb;
}

[data-theme="dark"] .category-label.management {
  background-color: rgba(255, 159, 67, 0.15);
  color: #ffb981;
  border-color: rgba(255, 159, 67, 0.45);
}

[data-theme="dark"] .category-label.research {
  background-color: rgba(100, 181, 246, 0.15);
  color: #8ecbff;
  border-color: rgba(100, 181, 246, 0.45);
}

[data-theme="dark"] .category-label.finance {
  background-color: rgba(241, 196, 15, 0.15);
  color: #f7d86d;
  border-color: rgba(241, 196, 15, 0.45);
}

[data-theme="dark"] .category-label.marketing {
  background-color: rgba(76, 217, 100, 0.15);
  color: #8ef2a2;
  border-color: rgba(76, 217, 100, 0.45);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .market-movers {
    grid-template-columns: 1fr;
  }
  
  .credits-actions {
    grid-template-columns: 1fr;
  }
  
  #investmentHistory {
    font-size: 0.9rem;
  }
  
  #investmentHistory th,
  #investmentHistory td {
    padding: 0.75rem 0.5rem;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .welcome-section h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-left {
    gap: 1rem;
  }

  .nav-icon span {
    font-size: 0.8rem;
  }

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

  .welcome-section h1 {
    font-size: 2.5rem;
  }

  .stat-card h2 {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .motivation-message h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem;
  }

  .welcome-section h1 {
    font-size: 2rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}

.trade-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trade-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.trade-btn::before {
  content: "💰";
  font-size: 1.1em;
}

/* Trade Modal */
.trade-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.trade-modal-content {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.trade-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.trade-modal-header h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.stock-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stock-detail-item {
  background: rgba(0, 180, 216, 0.1);
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
}

.stock-detail-item label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.stock-detail-item .value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.trade-input-group {
  margin-bottom: 1.5rem;
}

.trade-input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.trade-input-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.trade-input-group input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

.quantity-preview {
  background: rgba(0, 180, 216, 0.1);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin: 1rem 0;
  text-align: center;
}

.quantity-preview p {
  margin: 0;
  font-size: 1.1rem;
}

.quantity-preview .quantity {
  font-weight: bold;
  color: var(--primary-color);
}

.modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.modal-btn {
  padding: 0.75rem;
  border-radius: var(--border-radius);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn.back {
  background-color: #8B0000;
  color: white;
}

.modal-btn.back:hover {
  background-color: #6B0000;
}

.modal-btn.confirm {
  background: var(--primary-color);
  color: white;
}

.modal-btn.confirm:hover {
  background: var(--secondary-color);
}

/* Search Result Styles */
.search-result {
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result:hover {
  background-color: rgba(0, 180, 216, 0.1);
}

.stock-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stock-info strong {
  color: var(--text-color);
}

.stock-info span {
  font-size: 0.9rem;
  color: #666;
}

.stock-price {
  text-align: right;
  font-weight: 500;
}

.no-results {
  padding: 1rem;
  text-align: center;
  color: #666;
}

.stock-info small {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

.search-result:hover .stock-info small {
  color: var(--primary-color);
}

/* Portfolio Section */
.portfolio-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

.table-container {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.portfolio-note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  font-style: italic;
}

#investmentHistory {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#investmentHistory th {
  background: rgba(0, 180, 216, 0.1);
  padding: 1rem;
  font-weight: 600;
  text-align: left;
  position: relative;
  cursor: help;
  transition: background-color 0.3s ease;
}

#investmentHistory th:hover {
  background: rgba(0, 180, 216, 0.2);
}

#investmentHistory th[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 1;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

#investmentHistory td {
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

#investmentHistory tr:hover td {
  background: rgba(0, 180, 216, 0.05);
}

#investmentHistory .gain {
  color: #00ff00;
  font-weight: 600;
}

#investmentHistory .loss {
  color: #ff0000;
  font-weight: 600;
}

.sell-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sell-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sell-btn::before {
  content: "💸";
  font-size: 1.1em;
}

/* No investments message */
.no-investments {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.no-investments .message h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.no-investments .message p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

.start-investing-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-investing-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for portfolio */
@media (max-width: 1200px) {
  .portfolio-content {
    padding: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  #investmentHistory th[data-tooltip]:hover::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.8rem;
  }

  #investmentHistory th,
  #investmentHistory td {
    padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
  }
}

.portfolio-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.buy-more-btn {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.2);
}

.buy-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 180, 216, 0.3);
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

.buy-more-btn:active {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .buy-more-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
  }
}

/* Leaderboard Styles */
.leaderboard-content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.leaderboard-content h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.podium-wrapper {
  margin-bottom: 4rem;
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2rem;
  height: 400px;
}

.podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 1rem;
  width: 200px;
  transition: transform 0.3s ease;
}

.podium-spot:hover {
  transform: translateY(-10px);
}

.podium-spot.gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  height: 300px;
}

.podium-spot.silver {
  background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
  height: 250px;
}

.podium-spot.bronze {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  height: 200px;
}

.crown {
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: crownDance 2s ease-in-out infinite;
}

.gold .crown {
  animation-delay: 0s;
}

.silver .crown {
  animation-delay: 0.3s;
}

.bronze .crown {
  animation-delay: 0.6s;
}

@keyframes crownDance {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(-10deg);
  }
  75% {
    transform: translateY(-5px) rotate(10deg);
  }
}

.avatar {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.podium-spot .name {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
  text-align: center;
}

.podium-spot .net-worth {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 1rem;
}

.platform {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
}

.rankings-list {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: 500px;
  overflow-y: auto;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(10px);
  background-color: rgba(0, 180, 216, 0.05);
}

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

.rank {
  font-size: 1.2rem;
  font-weight: bold;
  width: 50px;
  color: var(--primary-color);
}

.investor-info {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.investor-avatar {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 180, 216, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.investor-name {
  font-weight: 500;
  color: var(--text-color);
}

.investor-worth {
  font-weight: bold;
  color: #2E7D32;
  padding: 0.5rem 1rem;
  background: rgba(46, 125, 50, 0.1);
  border-radius: 50px;
}

@media (max-width: 768px) {
  .podium {
    flex-direction: column;
    align-items: center;
    height: auto;
    gap: 1rem;
  }

  .podium-spot {
    width: 80%;
    height: auto !important;
    margin-bottom: 1rem;
  }

  .rankings-list {
    padding: 1rem;
  }
}

/* Settings Page Styles */
.settings-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

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

.settings-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.settings-card h3 {
  margin: 0 0 1.5rem 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  gap: 1rem;
}

.theme-btn {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.theme-btn .icon {
  font-size: 1.5rem;
}

.theme-btn.active {
  background: var(--primary-color);
  color: white;
}

/* Text Size Controls */
.text-size-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.size-btn {
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.size-btn .preview {
  font-weight: bold;
}

.size-btn:nth-child(1) .preview { font-size: 0.8rem; }
.size-btn:nth-child(2) .preview { font-size: 1rem; }
.size-btn:nth-child(3) .preview { font-size: 1.2rem; }
.size-btn:nth-child(4) .preview { font-size: 1.4rem; }

.size-btn.active {
  background: var(--primary-color);
  color: white;
}

/* Language Toggle */
.language-toggle {
  display: flex;
  gap: 1rem;
}

.lang-btn {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn .icon {
  font-size: 1.5rem;
}

.lang-btn.active {
  background: var(--primary-color);
  color: white;
}

/* Settings Info */
.settings-info {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(0, 180, 216, 0.1);
  border-radius: var(--border-radius);
}

/* Dark Mode Styles */
[data-theme="dark"] {
  --nav-bg: linear-gradient(90deg, #0d1b2a, #1b263b);
  --text-color: #f5f5f5;
  --card-background: #1e1e1e;
  --background-color: #121212;
  --background-gradient: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
  --primary-color: #64b5f6;
  --secondary-color: #43a047;
  --border-color: #444;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] body {
  background: var(--background-gradient);
}

[data-theme="dark"] .top-nav {
  background: var(--nav-bg);
}

[data-theme="dark"] .nav-icon {
  color: var(--text-color);
}

[data-theme="dark"] .credits-display {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

[data-theme="dark"] .add-credits-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
}

[data-theme="dark"] .settings-card,
[data-theme="dark"] .rankings-list,
[data-theme="dark"] .table-container,
[data-theme="dark"] .market-content table,
[data-theme="dark"] .search-results {
  background-color: var(--card-background);
  color: var(--text-color);
}

[data-theme="dark"] .theme-btn,
[data-theme="dark"] .size-btn,
[data-theme="dark"] .lang-btn {
  border-color: var(--primary-color);
  color: var(--text-color);
}

[data-theme="dark"] .theme-btn.active,
[data-theme="dark"] .size-btn.active,
[data-theme="dark"] .lang-btn.active {
  background-color: var(--primary-color);
  color: var(--background-color);
}

/* Text Size Classes */
[data-text-size="small"] {
  --base-size: 0.85;
}

[data-text-size="medium"] {
  --base-size: 1;
}

[data-text-size="large"] {
  --base-size: 1.25;
}

[data-text-size="extra-large"] {
  --base-size: 1.5;
}

/* Apply text sizes to specific elements */
[data-text-size] {
  font-size: calc(var(--base-size) * 1rem);
}

[data-text-size] h1 {
  font-size: calc(var(--base-size) * 2.5rem);
}

[data-text-size] h2 {
  font-size: calc(var(--base-size) * 2rem);
}

[data-text-size] h3 {
  font-size: calc(var(--base-size) * 1.75rem);
}

[data-text-size] p {
  font-size: calc(var(--base-size) * 1rem);
}

[data-text-size] .nav-icon span {
  font-size: calc(var(--base-size) * 0.9rem);
}

[data-text-size] table {
  font-size: calc(var(--base-size) * 0.95rem);
}

[data-text-size] button {
  font-size: calc(var(--base-size) * 0.95rem);
}

/* Hover Effects */
.theme-btn:hover,
.size-btn:hover,
.lang-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 180, 216, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .text-size-controls {
    grid-template-columns: 1fr;
  }
}

/* About Section Styles */
.about-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  gap: 2rem;
}

.about-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  opacity: 0.1;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.about-card h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.about-card h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* NSS Explanation Styles */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
  background: rgba(0, 180, 216, 0.05);
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.feature h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Founder Info Styles */
.founder-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: center;
}

.founder-image {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.founder-image:hover {
  transform: scale(1.05);
}

.founder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder-details h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.founder-role {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Social Links Styles */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  background: rgba(0, 180, 216, 0.05);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-icon {
  font-size: 1.5rem;
}

.social-text {
  font-weight: 500;
}

/* Social Platform Specific Colors */
.facebook:hover { background: #1877f2; color: white; }
.twitter:hover { background: #1da1f2; color: white; }
.instagram:hover { background: #e1306c; color: white; }
.linkedin:hover { background: #0077b5; color: white; }
.github:hover { background: #333; color: white; }
.youtube:hover { background: #ff0000; color: white; }

/* Dark Mode Adjustments */
[data-theme="dark"] .about-card {
  background: var(--card-background);
}

[data-theme="dark"] .feature {
  background: rgba(100, 181, 246, 0.1);
}

[data-theme="dark"] .social-link {
  background: rgba(100, 181, 246, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .founder-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .founder-image {
    margin: 0 auto;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

/* Bonus Modal Styles */
.bonus-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.bonus-modal-content {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.bonus-section {
    background: rgba(0, 180, 216, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.bonus-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.bonus-btn, .spin-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.bonus-btn:hover, .spin-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.bonus-btn:disabled, .spin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.timer {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}

.wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #FF0000;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Spin result overlay */
.spin-wheel {
    position: relative;
}

.spin-wheel.blur .wheel-container,
.spin-wheel.blur .spin-btn {
    filter: blur(4px);
}

.spin-result {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius);
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-color);
    z-index: 3;
}

.spin-result.hidden {
    display: none;
}

/* Confetti animation */
.confetti {
    position: fixed;
    top: -10px;
    width: 8px;
    height: 8px;
    opacity: 0.9;
    pointer-events: none;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    background-color: #fff;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: scale(1.1);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .bonus-modal-content {
    background: var(--card-background);
}

[data-theme="dark"] .bonus-section {
    background: rgba(100, 181, 246, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .bonus-modal-content {
        grid-template-columns: 1fr;
        max-width: 90%;
        gap: 1rem;
    }

    .wheel-container {
        width: 250px;
        height: 250px;
    }

    .bonus-section {
        padding: 1rem;
    }

    .bonus-section h2 {
        font-size: 1.5rem;
    }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 0.5s ease 3.5s forwards;
}

.loading-content {
  text-align: center;
  animation: scaleIn 0.5s ease;
}

.loading-logo {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.loading-title {
  color: white;
  font-size: 2.5rem;
  margin: 0;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.5s forwards;
}

/* Tutorial Overlay */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

.tutorial-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tutorial-step {
  display: none;
  animation: slideIn 0.3s ease;
}

.tutorial-step.active {
  display: block;
}

.tutorial-step h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.tutorial-step p {
  color: #34495e;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tutorial-step ul {
  list-style-type: none;
  padding: 0;
}

.tutorial-step li {
  color: #34495e;
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.tutorial-step li:before {
  content: "•";
  color: #3498db;
  position: absolute;
  left: 0;
}

.name-input {
  margin-top: 1.5rem;
}

.name-input label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.name-input input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #3498db;
  border-radius: 5px;
  font-size: 1rem;
}

.tutorial-navigation {
  margin-top: 2rem;
  text-align: right;
}

.tutorial-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.tutorial-btn:hover {
  background: #2980b9;
}

/* Animations */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

[data-theme="dark"] .tutorial-content {
  background: #2c3e50;
}

[data-theme="dark"] .tutorial-step h2 {
  color: #ecf0f1;
}

[data-theme="dark"] .tutorial-step p,
[data-theme="dark"] .tutorial-step li {
  color: #bdc3c7;
}

[data-theme="dark"] #wheelCanvas {
    background-color: #2a2a2a;
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .market-content {
    padding: 1rem;
  }
  
  .podium-wrapper {
    transform: scale(0.9);
  }
}

@media (max-width: 992px) {
  .nav-content {
    padding: 0.5rem;
  }
  
  .nav-icon span {
    display: none;
  }
  
  .market-movers {
    flex-direction: column;
  }
  
  .gainers-table, .losers-table {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0.5rem;
  }
  
  .nav-left {
    gap: 0.5rem;
  }
  
  .nav-icon {
    padding: 0.5rem;
  }
  
  .credits-display {
    font-size: 0.9rem;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .market-content {
    padding: 0.5rem;
  }
  
  .all-stocks table {
    font-size: 0.9rem;
  }
  
  .trade-modal-content {
    width: 90%;
    padding: 1rem;
  }
  
  .founder-content {
    flex-direction: column;
    text-align: center;
  }
  
  .founder-image {
    margin: 0 auto 1rem;
  }
  
  .social-grid {
    grid-template-columns: 1fr;
  }
  
  .bonus-modal-content {
    width: 90%;
    padding: 1rem;
  }
  
  .wheel-container {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 576px) {
  .nav-icon {
    padding: 0.3rem;
  }
  
  .nav-img {
    width: 20px;
    height: 20px;
  }
  
  .credits-display {
    font-size: 0.8rem;
  }
  
  .add-credits-btn {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }
  
  .welcome-section h1 {
    font-size: 1.5rem;
  }
  
  .stat-card h2 {
    font-size: 1.1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .market-search input {
    font-size: 0.9rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .trade-form {
    padding: 0.5rem;
  }
  
  .trade-form input {
    font-size: 0.9rem;
  }
  
  .modal-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-btn {
    width: 100%;
  }
  
  .podium {
    flex-direction: column;
    align-items: center;
  }
  
  .podium-spot {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Landscape mode for mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
  .top-nav {
    padding: 0.3rem;
  }
  
  .nav-icon {
    padding: 0.3rem;
  }
  
  .stats-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .market-content {
    padding: 0.5rem;
  }
  
  .trade-modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .nav-img {
    image-rendering: -webkit-optimize-contrast;
  }
  
  .founder-img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Dark mode adjustments for different screen sizes */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-icon {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  [data-theme="dark"] .credits-display {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Print styles */
@media print {
  .top-nav,
  .add-credits-btn,
  .trade-btn,
  .sell-btn {
    display: none;
  }
  
  .stats-cards,
  .market-content,
  .portfolio-content {
    break-inside: avoid;
  }
  
  .stat-card,
  .about-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Login Modal Styles */
.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.login-modal-content {
  position: relative;
  background-color: var(--card-bg);
  margin: 15% auto;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: modalSlideIn 0.3s ease-out;
}

.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.login-modal-header h2 {
  margin: 0;
  color: var(--text-color);
}

.close-login {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  color: var(--text-color);
  font-weight: 500;
}

.form-group input {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: var(--input-bg);
  color: var(--text-color);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.login-btn, .register-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-btn {
  background-color: var(--primary-color);
  color: white;
}

.register-btn {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.login-btn:hover, .register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark mode adjustments */
[data-theme="dark"] .login-modal-content {
  background-color: var(--card-bg);
}

[data-theme="dark"] .form-group input {
  background-color: var(--input-bg);
  color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .login-modal-content {
    margin: 20% auto;
    width: 95%;
  }

  .form-actions {
    flex-direction: column;
  }

  .login-btn, .register-btn {
    width: 100%;
  }

  .team-section {
    padding: 0 0.5rem;
    gap: 2rem;
  }

  .team-header h2 {
    font-size: 2rem;
  }

  .team-card.leader {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
  }

  .team-grid {
    gap: 1rem;
  }
}

/* Toast notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.5s ease, bottom 0.5s ease;
  z-index: 1000;
}

.toast.visible {
  opacity: 1;
  bottom: 40px;
}
