/* ====== Base Styles ====== */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

/* Navigation */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0.8rem 0.5rem;
  gap: 0.5rem;
}

nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s;
}

nav a.active {
  color: var(--accent);
}

nav a i {
  font-size: 1.25rem;
}


h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text);
}

.table-container {
  width: 100%;
  max-width: 1600px;
  margin: 20px auto 0 auto;
  overflow-x: auto;
  background: var(--glass);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  position: relative;
  margin-bottom: 3.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: transparent;
}

thead {
  background-color: var(--bg);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 2;
  transition: box-shadow 0.2s;
}

th, td {
  padding: 12px 10px;
  border: 1px solid #eee;
  text-align: center;
  font-size: 0.95rem;
  background: transparent;
  color: var(--text);
}

/* ====== Column Widths (Adjust Here) ====== */

/* # Column */
th:first-child,
td:first-child {
  min-width: 50px;
  width: 50px;
  max-width: 50px;
}

/* Name Column */
th.coin-name,
td.coin-name {
  min-width: 70px;
  width: 70px;
  max-width: 120px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Symbol Column */
th.coin-symbol,
td.coin-symbol {
  min-width: 170px;
  max-width: 190px;
  width: 80px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====== Other Columns (Adjust as needed) ====== */
/* You can add custom widths for other columns here if needed */

/* ====== Table Row Hover ====== */
tbody tr:hover {
  background-color: var(--glass);
}

/* ====== Signal & Mood Colors ====== */
.up { color: #16c784; }
.down { color: #ea3943; }
.signal-buy { background-color: rgba(22, 199, 132, 0.08); }
.signal-sell { background-color: rgba(234, 57, 67, 0.08); }
.signal-hold { background-color: rgba(255, 251, 224, 0.05); }
.mood-bull { color: #16c784; }
.mood-bear { color: #ea3943; }
.mood-neutral { color: var(--muted); }

/* ====== Theme Toggle Button ====== */
#themeToggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  background: var(--glass);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.3s;
}
#themeToggle i {
  font-size: 1.3rem;
  color: var(--accent);
  transition: color 0.3s;
}

/* ====== Responsive Styles ====== */

/* Tablet */
@media (max-width: 1024px) {
  table { min-width: 800px; }
  th:first-child, td:first-child { width: 50px; min-width: 50px; max-width: 50px; }
  th.coin-name, td.coin-name { width: 70px; min-width: 70px; max-width: 120px; }
}

/* Small Tablet */
@media (max-width: 768px) {
  h1 { font-size: 1.4rem; margin-bottom: 10px; }
  th, td { font-size: 0.8rem; padding: 8px 6px; }
  table { min-width: 700px; }
  th:first-child, td:first-child { width: 50px; min-width: 50px; max-width: 50px; }
  th.coin-name, td.coin-name { width: 70px; min-width: 70px; max-width: 120px; }
}

/* Mobile */
@media (max-width: 600px) {
  .table-container {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
  table { min-width: 1000px; }
  th, td {
    font-size: 0.75rem;
    padding: 6px 4px;
    min-width: 100px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  /* # Column */
  th:first-child, td:first-child {
    min-width: 50px;
    width: 50px;
    max-width: 50px;
  }
  /* Name Column */
  th.coin-name, td.coin-name {
    min-width: 70px;
    width: 70px;
    max-width: 120px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  /* Symbol Column */
  th.coin-symbol, td.coin-symbol {
    min-width: 100px;
    width: 100px;
    max-width: 200px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  h1 { font-size: 1.1rem; }

 .table-container { padding: 0; }
  table { min-width: 1000px; }
  th, td {
    font-size: 0.7rem;
    padding: 4px 2px;
    min-width: 100px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  /* # Column */
  th:first-child, td:first-child {
    min-width: 50px;
    width: 50px;
    max-width: 50px;
  }
  /* Name Column */
  th.coin-name, td.coin-name,th:nth-child(8){ 
    min-width: 100px;
    width: 150px;
    max-width: 200px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  /* Symbol Column */
  th.coin-symbol, td.coin-symbol {
    min-width: 100px;
    width: 100px;
    max-width: 200px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  th, td {
    padding: 2px 0 8px;
    font-size: 0.75rem;
  }
}

/* ...existing code... */

/* ====== Recommendation Column (Adjust Here) ====== */
td:nth-child(8) {
  min-width: 120px;
  width: 120px;
  max-width: 200px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

/* ====== End of Styles ====== */