body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 220px;
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 1rem;
  height: calc(100vh - 70px);
  overflow-y: auto;
}
.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.sidebar li {
  margin-bottom: 0.25rem;
}
.sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
}
.sidebar a:hover {
  background-color: #34495e;
}
.submenu-toggle {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.submenu-toggle:hover {
  background-color: #34495e;
}
.submenu {
  margin-left: 0.5rem;
  margin-top: 0.25rem;
}
.submenu a {
  background-color: #34495e;
  font-size: 0.9em;
  padding-left: 1.5rem;
}

main {
  flex: 1;
  padding: 1rem;
}

form {
  margin-bottom: 1rem;
}

input {
  margin-right: 0.5rem;
  padding: 0.25rem 0.5rem;
}

button {
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}

header {
  background-color: #222;
  color: #fff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
}

header button.header-icon {
  background: none;
  border: none;
  color: #1abc9c;
  font-size: 1.5rem;
  padding: 0.25rem;
  cursor: pointer;
}

header button.header-icon:hover {
  color: #16a085;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  max-width: 800px;
}

.hero .cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  background-color: #222;
  color: #fff;
}

/* Table for historical candles */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.history-table th,
.history-table td {
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  text-align: right;
}

.history-table th {
  background-color: #eee;
  text-align: center;
}

.history-table td:first-child {
  text-align: left;
  white-space: nowrap;
}

/* Table for saved strategy results */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.results-table th,
.results-table td {
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  text-align: right;
}

.results-table th {
  background-color: #eee;
  text-align: center;
}

.results-table td:first-child {
  text-align: left;
  white-space: nowrap;
}

/* Table for performance matrix */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.matrix-table th,
.matrix-table td {
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  text-align: right;
}

.matrix-table th {
  background-color: #eee;
  text-align: center;
}

.matrix-table td:first-child {
  text-align: left;
  white-space: nowrap;
}

/* Table for arbitrage results */
.arb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.arb-table th,
.arb-table td {
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  text-align: right;
}

.arb-table th {
  background-color: #eee;
  text-align: center;
}

.arb-table td:first-child {
  text-align: left;
  white-space: nowrap;
}

/* Tabs for simulator */
.tabs {
  margin-bottom: 1rem;
}

.tabs button {
  margin-right: 0.5rem;
  padding: 0.25rem 0.75rem;
}

.tabs button.active {
  background-color: #007bff;
  color: #fff;
}

/* Simulator form layout */
.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Pagination */
.pagination {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination button {
  margin: 0 0.25rem;
  padding: 0.25rem 0.5rem;
}

/* Login page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.login-form {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 320px;
}

.login-form h2 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 1rem;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.login-form label {
  margin-bottom: 0.25rem;
}

.login-form input {
  padding: 0.5rem;
  font-size: 1rem;
}

.login-form .error {
  color: red;
  text-align: center;
  margin-bottom: 1rem;
}

.login-form button {
  width: 100%;
  padding: 0.5rem;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.login-form button:hover {
  background-color: #0056b3;
}

/* Simple modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  padding: 1rem;
  border-radius: 4px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
}

.modal pre {
  white-space: pre-wrap;
  font-family: monospace;
  background: #f0f0f0;
  padding: 0.5rem;
  margin-bottom: 1rem;
}
