body {
  margin: 0;
  background-color: #181818;
  color: #ddd;
  font-family: Arial, sans-serif;
}

.accent {
  color: #eb0029;
}

a,
button {
  font-family: inherit;
  text-decoration: none;
  color: inherit;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.5em;
  background: #202020;
  border-bottom: 1px solid #282828;
}

header h1 {
  flex: 1 1 auto;
  font-size: 1.5em;
  color: #fff;
  margin: 0.5em;
}

header h1 a {
  text-decoration: none;
  color: #fff;
  margin-right: 0.3em;
}

#header-wallet-info {
  margin: 0.5em;
  color: #fff;
}

#header-wallet-info p {
  margin: 0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.controls input[type="text"] {
  background: #333;
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 0.4em 0.6em;
}

.controls button {
  background: #eb0029;
  border: none;
  border-radius: 4px;
  padding: 0.4em 0.8em;
  color: #fff;
  cursor: pointer;
}

.controls button:hover {
  background: #ff1a3c;
}

.free-badge,
.pro-badge {
  background: #333;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: #fff;
  font-weight: bold;
}

.pro-badge {
  background: #008f4c;
}

main {
  max-width: 1200px;
  margin: 1em auto;
  padding: 0 1em;
}

section {
  background: #1f1f1f;
  margin-bottom: 1.5em;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

section h2 {
  margin-top: 0;
  font-size: 1.2em;
  margin-bottom: 0.75em;
  color: #fff;
}

.placeholder-note {
  font-size: 0.85em;
  color: #aaa;
}

.overview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.info-card {
  background: #2a2a2a;
  flex: 1;
  min-width: 220px;
  padding: 1em;
  border-radius: 6px;
}

.info-card p {
  margin: 0.4em 0;
}

.info-card p strong {
  display: inline-block;
  width: 110px;
  color: #aaa;
}

.resource-bar {
  background: #333;
  border-radius: 4px;
  height: 8px;
  margin-top: 0.25em;
  position: relative;
}

.resource-fill {
  background: #eb0029;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  min-width: 600px;
}

table thead {
  background: #2c2c2c;
  position: sticky;
  top: 0;
}

th,
td {
  padding: 0.6em;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
  background: rgba(235, 0, 41, 0.1);
}

.action-btn {
  background: #333;
  border: none;
  padding: 0.3em 0.6em;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}

.action-btn:hover {
  background: #444;
}

.analytics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  align-items: flex-start;
}

.chart-card {
  background: #2a2a2a;
  flex: 1 1 0;
  min-width: 300px;
  max-width: 600px;
  padding: 1em;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.chart-wrap {
  position: relative;
  width: 57%;
  height: 300px;
  margin-top: 0.5em;
}

canvas {
  width: 100%;
  height: 100%;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 0.75em;
}

.filters select,
.filters input[type="date"] {
  background: #333;
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 0.4em 0.6em;
}

.filters button {
  background: #eb0029;
  border: none;
  border-radius: 4px;
  padding: 0.4em 0.8em;
  color: #fff;
  cursor: pointer;
}

.filters button:hover {
  background: #ff1a3c;
}

.advanced-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
}

.advanced-card {
  background: #2a2a2a;
  border-radius: 6px;
  padding: 1em;
  flex: 1 1 300px;
  position: relative;
}

.advanced-card h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #fff;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  border-radius: 6px;
}

.locked-overlay span {
  margin-bottom: 0.5em;
  font-weight: bold;
}

.locked-overlay button {
  background: #eb0029;
  border: none;
  border-radius: 4px;
  padding: 0.5em 1em;
  color: #fff;
  cursor: pointer;
}

.locked-overlay button:hover {
  background: #ff1a3c;
}

#chat-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #eb0029;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(235, 0, 41, 0.5);
  z-index: 999;
  transition: transform 0.2s;
}

#chat-btn:hover {
  transform: scale(1.05);
}

#chat-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 300px;
  max-height: 400px;
  background: #202020;
  border: 1px solid #333;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  z-index: 1000;
}

#chat-header {
  background: #282828;
  padding: 0.75rem;
  border-bottom: 1px solid #333;
}

#chat-header h4 {
  margin: 0;
  font-size: 1rem;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.message {
  margin-bottom: 0.75rem;
}

.message.user {
  text-align: right;
}

.message span {
  display: inline-block;
  background: #333;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  max-width: 80%;
  word-wrap: break-word;
}

.message.user span {
  background: #c00025;
}

#chat-input-container {
  display: flex;
  border-top: 1px solid #333;
}

#chat-input {
  flex: 1;
  border: none;
  padding: 0.75rem;
  background: #2a2a2a;
  color: #e0e0e0;
}

#chat-input:focus {
  outline: none;
}

#send-btn {
  background: #eb0029;
  border: none;
  color: #fff;
  width: 60px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .overview-grid {
    flex-direction: column;
  }

  table {
    min-width: 100%;
  }

  .analytics-grid {
    flex-direction: column;
  }

  .chart-card {
    max-width: 100%;
  }

  .advanced-grid {
    flex-direction: column;
  }
}

footer {
  background: #111;
  padding: 1.5rem 0;
  text-align: center;
  color: #aaa;
  margin-top: 3rem;
}

footer a {
  color: #aaa;
  margin: 0 0.5rem;
  display: inline-block;
}

footer a:hover {
  color: #fff;
}

footer svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  fill: currentColor;
}

#connect-btn {
  background: red;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  margin: 0.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

#connect-btn:disabled {
  background: #444;
  cursor: not-allowed;
}

#connect-btn:hover:enabled {
  background: #c00025;
}

#header-wallet-info {
  margin: 0.5em;
  color: #fff;
}

#header-wallet-info p {
  margin: 0;
}

.pro-badge {
  background: #f5b301;
  padding: 0.3em 0.6em;
  border-radius: 5px;
  color: #000;
  font-weight: bold;
  margin-left: 0.5rem;
}

.free-badge {
  background: #666;
  padding: 0.3em 0.6em;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  margin-left: 0.5rem;
}

a:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  margin-top: 1.5em;
  flex-wrap: wrap;
}

.pagination button {
  padding: 6px 10px;
  min-width: 34px;
  font-size: 0.9em;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a1a;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.pagination button:hover {
  background: #333;
}

.pagination .active-page {
  background: white;
  color: black;
  font-weight: bold;
}

.pagination select {
  padding: 5px 8px;
  font-size: 0.9em;
  border: 1px solid #444;
  border-radius: 5px;
  background: #1a1a1a;
  color: white;
}

.btn-connected {
  background-color: green;
  color: white;
  cursor: not-allowed;
}

#wallet-address {
  font-size: 14px;
  color: #333;
  margin-top: 10px;
}

.pro-badge {
  background: #f5b401ec;
  padding: 0.3em 0.6em;
  border-radius: 5px;
  color: #ffffff;
  font-weight: bold;
  margin-left: 0.5rem;
}

.free-badge {
  background: #666;
  padding: 0.3em 0.6em;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  margin-left: 0.5rem;
}

footer a svg {
  margin: 0 0.5rem;
  vertical-align: middle;
}

table button {
  background-color: #eb0029;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 0.9em;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

table button:hover {
  background-color: #ff1a3c;
}

.chart-wrap {
  width: 100%;
  height: 300px;
}

.pie-chart-canvas {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto;
}

.asset-chart-wrap {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#netflow-range-buttons {
  display: flex;
  gap: 0.5em;
  margin-top: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

#netflow-range-buttons button {
  background: #1e1e1e;
  color: #ddd;
  border: 1px solid #444;
  padding: 0.4em 1em;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

#netflow-range-buttons button:hover {
  background: #333;
  border-color: #888;
  color: #fff;
}

#netflow-range-buttons button.active {
  background: #e60023;
  color: #fff;
  border-color: #e60023;
  box-shadow: 0 0 6px #e60023a4;
}

#goalSelect,
#customNote,
#aiInputs button {
  font-size: 0.95em;
  background-color: #1e1e1e;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5em;
  width: 100%;
  box-sizing: border-box;
}

#goalSelect {
  height: 2.2em;
}

#aiInputs button {
  background-color: #008f4c;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#aiInputs button:hover {
  background-color: #00b15c;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
  border-radius: 8px;
  font-size: 1em;
}

.locked-overlay button {
  margin-top: 0.8em;
  background: #eb0029;
  border: none;
  padding: 0.5em 1.2em;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

.advanced-card form label {
  font-size: 0.9em;
  color: #ccc;
}

.advanced-card form input[type="email"] {
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5em;
  margin-bottom: 1em;
  width: 100%;
  box-sizing: border-box;
}

.advanced-card form input[type="checkbox"] {
  margin-right: 0.4em;
  transform: scale(1.1);
}

.advanced-card form label input[type="checkbox"]+span {
  display: inline-block;
  margin-left: 0.5em;
}

.advanced-card form button[type="submit"] {
  background: #00c57e;
  color: #111;
  font-weight: bold;
  padding: 0.6em 1.4em;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.advanced-card form button[type="submit"]:hover {
  background: #00e692;
}

body {
  margin: 0;
  background-color: #181818;
  color: #ddd;
  font-family: Arial, sans-serif;
}

.accent {
  color: #eb0029;
}

a,
button {
  font-family: inherit;
  text-decoration: none;
  color: inherit;
}

#quick-links .filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
  justify-content: start;
}

#quick-links .filter-button {
  display: inline-flex;
  align-items: center;
  padding: 0.6em 1.2em;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: bold;
  color: #ddd;
  cursor: pointer;
  transition: background 0.2s, border 0.2s, color 0.2s;
  gap: 0.5em;
}

#quick-links .filter-button:hover {
  background: #333;
  border-color: #666;
  color: #fff;
}

#quick-links .filter-button.active {
  background: #eb0029;
  border-color: #eb0029;
  color: #fff;
  box-shadow: 0 0 5px rgba(235, 0, 41, 0.5);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1em;
  margin-top: 1.5em;
}

.project-card {
  background: #121212;
  padding: 1em;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(235, 0, 41, 0.2);
}

.project-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.5em;
}

.project-card .project-name {
  font-weight: bold;
  color: #fff;
  margin-bottom: 0.25em;
}

.project-card .project-desc {
  font-size: 0.85em;
  color: #aaa;
}

.category-btn {
  font-family: PlusJakartaSans, -apple-system, BlinkMacSystemFont, Segoe UI,
    Roboto, Oxygen, Cantarell, Helvetica Neue, Ubuntu, sans-serif;
  font-size: 1rem;
  align-items: center;
  height: 42px;
  border-radius: 0.4rem;
  font-weight: 600;
  padding: 0 1.2rem;
  color: #ddd;
  border: none;
  cursor: pointer;
  margin: 4px;
  box-shadow: 0 0.5rem 1rem rgba(143, 142, 142, 0.15);
  background: #000;
  transition: background 0.2s ease;
}

.category-btn:hover,
.category-btn.active {
  background: #2b2a2a;
}

.category-btn span {
  font-size: 0.8rem;
  color: #7f7f7f;
}

.pro-feature-card {
  background: #111;
  padding: 1.5em;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 2em;
  position: relative;
}

.pro-feature-card h2 {
  font-size: 1.2em;
  margin-bottom: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.pro-feature-card select,
.pro-feature-card textarea,
.pro-feature-card input[type="email"] {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #444;
  color: #ccc;
  padding: 0.6em;
  border-radius: 6px;
  margin-bottom: 1em;
  font-size: 0.95em;
  box-sizing: border-box;
}

.pro-feature-card button {
  background-color: #eb0029;
  color: white;
  font-weight: bold;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pro-feature-card button:hover {
  background-color: #ff1a3c;
}

.pro-feature-card label {
  font-size: 0.9em;
  display: block;
  margin-bottom: 0.6em;
  cursor: pointer;
  color: #ccc;
}

.pro-feature-card input[type="checkbox"] {
  margin-right: 0.5em;
  transform: scale(1.2);
}

#alertStatus {
  margin-top: 1em;
  font-size: 0.9em;
  color: #aaa;
}

.locked-overlay button {
  padding: 0.6em 1.4em;
  font-weight: bold;
  background: #eb0029;
  border-radius: 6px;
  border: none;
  color: white;
  transition: background 0.2s ease;
}

.locked-overlay button:hover {
  background: #ff1a3c;
}

.pro-feature-card {
  background: #111;
  padding: 1.5em;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.35);
  margin-bottom: 2em;
  position: relative;
  transition: box-shadow 0.2s ease;
}

.pro-feature-card:hover {
  box-shadow: 0 0 25px rgba(235, 0, 41, 0.25);
}

.pro-feature-card h2 {
  font-size: 1.2em;
  margin-bottom: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #fff;
}

.pro-feature-card select,
.pro-feature-card textarea,
.pro-feature-card input[type="email"] {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #444;
  color: #ccc;
  padding: 0.65em 0.9em;
  border-radius: 6px;
  margin-bottom: 1em;
  font-size: 0.95em;
  box-sizing: border-box;
  transition: border 0.2s ease;
}

.pro-feature-card select:focus,
.pro-feature-card textarea:focus,
.pro-feature-card input[type="email"]:focus {
  outline: none;
  border-color: #eb0029;
}

.pro-feature-card label {
  font-size: 0.9em;
  display: flex;
  align-items: center;
  margin-bottom: 0.5em;
  color: #ccc;
  gap: 0.6em;
}

.pro-feature-card input[type="checkbox"] {
  transform: scale(1.2);
  accent-color: #eb0029;
}

.pro-feature-card button {
  background-color: #eb0029;
  color: white;
  font-weight: bold;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 0.3em 0.8em rgba(235, 0, 41, 0.2);
}

.pro-feature-card button:hover {
  background-color: #ff1a3c;
  transform: scale(1.03);
}

.pro-feature-card button:disabled {
  background: #444;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
}

form fieldset {
  border: 1px solid #333;
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 1.5em;
  background: #1a1a1a;
}

form legend {
  font-size: 1rem;
  font-weight: bold;
  color: #f5b301;
  padding: 0 0.4em;
}

form input[type="number"] {
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5em;
  margin: 0.4em 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.95em;
}

form label {
  display: flex;
  align-items: center;
  margin: 0.5em 0;
  gap: 0.5em;
  font-size: 0.95em;
  color: #ddd;
}

form input::placeholder {
  color: #888;
  font-style: italic;
}

.email-save-row {
  display: flex;
  gap: 0.75em;
  align-items: center;
  margin-bottom: 1em;
}

.email-save-row input[type="email"] {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.6em;
  color: #eee;
  font-size: 0.95em;
  box-sizing: border-box;
}

.email-save-row button {
  background-color: #eb0029;
  color: #fff;
  font-weight: bold;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 0.3em 0.8em rgba(235, 0, 41, 0.2);
  white-space: nowrap;
}

.email-save-row button:hover {
  background-color: #ff1a3c;
  transform: scale(1.03);
}

.email-save-row button:disabled {
  background: #444;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
}

.pro-feature-card {
  position: relative;
  padding: 1.5em;
  background: #111;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.35);
  margin-bottom: 2em;
  transition: box-shadow 0.2s ease;
}

.pro-feature-card:hover {
  box-shadow: 0 0 25px rgba(235, 0, 41, 0.25);
}

.pro-feature-card h2 {
  font-size: 1.2em;
  margin-bottom: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #fff;
}

.pro-feature-card label {
  display: block;
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 0.4em;
  font-weight: 500;
}

.pro-feature-card input[type="text"],
.pro-feature-card select,
.pro-feature-card textarea {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #444;
  color: #ccc;
  padding: 0.6em 0.8em;
  border-radius: 6px;
  margin-bottom: 0.8em;
  font-size: 0.95em;
  box-sizing: border-box;
  transition: border 0.2s ease;
}

.pro-feature-card input[type="text"]:focus,
.pro-feature-card select:focus,
.pro-feature-card textarea:focus {
  outline: none;
  border-color: #eb0029;
}

.pro-feature-card .aiInterest {
  transform: scale(1.2);
  accent-color: #eb0029;
  margin-right: 0.4em;
}

.pro-feature-card .focus-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.pro-feature-card .focus-areas label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 0.4em;
}

.pro-feature-card #runInsightsBtn {
  background: #eb0029;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7em 1.2em;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
  margin-top: 0.5em;
}

.pro-feature-card #runInsightsBtn:hover:not(:disabled) {
  background: #ff1a3c;
}

.pro-feature-card #runInsightsBtn:disabled {
  background: #444;
  cursor: not-allowed;
}

#aiInsightsOutput {
  margin-top: 1em;
  background: #1f1f1f;
  padding: 1em;
  border-radius: 6px;
  min-height: 60px;
  color: #ddd;
  font-size: 0.95em;
  white-space: pre-wrap;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
  border-radius: 8px;
}

.locked-overlay button {
  margin-top: 0.8em;
  background: #eb0029;
  border: none;
  padding: 0.5em 1.2em;
  color: #fff;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.locked-overlay button:hover {
  background: #ff1a3c;
}