:root {
  --primary-color: #1e3a8a;
  --secondary-color: #f97316;
  --background-color: #ffffff;
  --text-color: #333333;
  --light-gray: #f3f4f6;
}

body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-gray);
  color: var(--text-color);
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--background-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

header h1 a {
  color: white;
  text-decoration: none;
}

nav {
  display: flex;
}

.nav-button {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.desktop-nav .nav-button {
  margin-left: 1rem;
}

.nav-button.active {
  font-weight: bold;
}

.desktop-nav .nav-button.active {
  border-bottom: 2px solid white;
}

.dashboard-container {
  padding: 2rem;
}

.account-summary-container {
  overflow: hidden;
  margin-bottom: 2rem;
}

.account-summary-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.account-summary-scroll::-webkit-scrollbar {
  display: none; /* WebKit */
}

.account-summary {
  flex: 0 0 auto;
  width: 65%; /* Adjust as needed */
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-right: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  scroll-snap-align: start;
}

.account-summary:last-child {
  margin-right: 0;
}

.account-summary h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #666;
  font-weight: normal;
}

.balance {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
  color: #333;
}

.balance-rm {
  font-size: 1rem;
  margin: 0.25rem 0 0;
  color: #666;
}

.account-details {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.account-detail {
  flex: 1;
}

.account-detail h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.25rem;
  font-weight: normal;
}

.account-detail p {
  font-size: 1rem;
  color: #333;
  margin: 0;
  font-weight: bold;
}

/* Add some color distinction between gold account and cash wallet */
.gold-account {
  background-color: #fff9e6;
}

.cash-wallet {
  background-color: #e6f2ff;
}

#inputGroup {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.price-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.price-box {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  border-radius: 4px;
  flex: 1;
  margin-right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.price-box:last-child {
  margin-right: 0;
}

.chart-icon {
  background-color: var(--light-gray);
  color: var(--primary-color);
}

.action-buttons {
  display: flex;
  background-color: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: 0.5rem;
}

.action-button {
  padding: 0.75rem 1rem;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  width: 100%;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.action-button[type="submit"] {
  padding: 1rem;
}

.action-button i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.action-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.action-button:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.action-button.new {
  position: relative;
}

.action-button.new::after {
  content: "NEW";
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background-color: #3b82f6;
  color: white;
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.gold-chart-container {
  background-color: var(--light-gray);
  border-radius: 4px;
  padding: 1rem;
  height: 300px;
}

.gold-chart-container h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-detail {
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
}

form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

input[type="number"],
input[type="text"] {
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-size: 1rem;
}

.right-column h2,
#top-up h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

#history ul {
  list-style-type: none;
  padding: 0;
}

#history li {
  background-color: var(--light-gray);
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

#history li:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .action-buttons {
    flex-wrap: nowrap;
  }

  .action-button {
    padding: 0.25rem;
    font-size: 0.7rem;
  }

  .action-button i {
    font-size: 1rem;
    margin-bottom: 0.1rem;
  }

  header {
    padding: 1rem;
    flex-direction: column;
    align-items: center;
  }

  .desktop-nav {
    display: none; /* Hide the top navigation on mobile */
  }

  .mobile-nav {
    display: flex; /* Show the mobile navigation */
  }

  #main-content {
    padding-bottom: 60px; /* Add space for the mobile nav */
    min-height: calc(100vh - 60px);
  }

  .dashboard-container,
  #cash-wallet,
  #history {
    padding: 1rem;
  }
}

.wallet-balance {
  background-color: var(--light-gray);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.wallet-balance h3 {
  margin-top: 0;
}

.wallet-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

#cash-wallet,
#top-up,
#history {
  padding: 2rem;
}

#topUpForm {
  margin-top: 1rem;
}

#no-transactions {
  text-align: center;
  color: var(--text-color);
  font-style: italic;
}

.transaction-form {
  background-color: var(--light-gray);
  padding: 1rem;
  border-radius: 4px;
  min-height: 320px;
}

.transaction-form h2 {
  margin-top: 0;
  color: var(--primary-color);
}

.input-group-trade {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.input-group-trade input {
  flex-grow: 1;
  margin-right: 0.5rem;
}

.input-group-trade span {
  font-weight: bold;
}

#buyAmount,
#sellAmount {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0;
}

.transaction-form p {
  margin: 0.5rem 0;
}

/* Add these styles to your existing CSS file */

.tab-container {
  display: flex;
  margin-bottom: 1rem;
}

.tab-button {
  background-color: var(--light-gray);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.tab-button.active {
  background-color: var(--primary-color);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.profit-loss-container {
  padding: 2rem;
}

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

.pl-item {
  background-color: var(--light-gray);
  padding: 1rem;
  border-radius: 4px;
}

.pl-item h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1rem;
}

.pl-item p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.percentage {
  color: green;
}

.pl-disclaimer {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* Add these styles to your existing CSS file */

.wallet-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wallet-actions .action-button {
  flex: 1;
  background-color: var(--light-gray);
  color: var(--text-color);
}

.wallet-actions .action-button.active {
  background-color: var(--secondary-color);
  color: white;
}

#actionFormContainer form {
  background-color: var(--light-gray);
  padding: 1rem;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  margin: 1rem 0;
}

#actionFormContainer input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

#actionFormContainer {
  width: 100%;
  box-sizing: border-box;
}

#actionFormContainer .action-button {
  width: 100%;
  margin-top: 0.5rem;
}

/* Add these styles to your existing CSS file */

#cash-wallet {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.wallet-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wallet-balance {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}

.wallet-balance h3 {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: normal;
}

.wallet-balance .balance {
  font-size: 2.5rem;
  margin: 0.5rem 0 0;
  color: white;
}

.wallet-actions-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wallet-actions {
  display: flex;
  gap: 1rem;
}

.wallet-actions .action-button {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  color: var(--text-color);
}

.wallet-actions .action-button.active {
  background-color: var(--secondary-color);
  color: white;
}

#actionFormContainer {
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
}

#actionFormContainer form {
  max-width: 100%;
  margin: 0;
}

#actionFormContainer h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.input-group {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.input-group .currency-symbol {
  background-color: #f0f0f0;
  padding: 0.75rem 1rem;
  font-weight: bold;
  color: var(--text-color);
}

.input-group input {
  flex-grow: 1;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
}

.input-group input:focus {
  outline: none;
}

#actionFormContainer .action-button {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  background-color: var(--secondary-color);
  color: white;
}

@media (max-width: 768px) {
  #cash-wallet {
    padding: 1rem;
  }

  .wallet-balance {
    padding: 1.5rem;
  }

  .wallet-balance h3 {
    font-size: 1rem;
  }

  .wallet-balance .balance {
    font-size: 2rem;
  }

  .wallet-actions {
    flex-direction: row;
  }

  #actionFormContainer {
    padding: 1rem;
  }
}

.login-container {
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.login-container .input-group {
  margin-bottom: 1rem;
}

.login-container .action-button {
  width: 100%;
  margin-top: 1rem;
}

.login-container p {
  margin-top: 1rem;
  text-align: center;
}

.login-container a {
  color: var(--primary-color);
  text-decoration: none;
}

.login-container a:hover {
  text-decoration: underline;
}

/* Add these styles to your existing CSS file */

/* Desktop navigation */
.desktop-nav {
  display: flex;
}

/* Mobile navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--background-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.mobile-nav .nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  color: var(--text-color);
  text-decoration: none;
  flex: 1;
  text-align: center;
}

.mobile-nav .nav-button i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.mobile-nav .nav-button span {
  font-size: 0.75rem;
}

.mobile-nav .nav-button.active {
  color: var(--primary-color);
}

/* Adjust existing styles */
@media (max-width: 768px) {
  #app {
    padding-bottom: 60px; /* Add space for the mobile nav */
  }

  header {
    display: none !important;
    padding: 1rem;
    flex-direction: column;
    align-items: center;
  }

  .desktop-nav {
    display: none; /* Hide the top navigation on mobile */
  }

  .mobile-nav {
    display: flex; /* Show the mobile navigation */
  }

  #main-content {
    padding-bottom: 60px; /* Add space for the mobile nav */
  }

  .dashboard-container,
  #cash-wallet,
  #history {
    padding: 1rem;
  }
}

/* Adjust the header styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* Existing modal styles (for moreActions) */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #fefefe;
  position: absolute;
  bottom: 0;
  width: 85%;
  left: 50%;
  transform: translateX(-50%);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 769px) {
  .modal-content {
    width: auto;
  }
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-color);
}

.more-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.more-action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none; /* Add this line */
  color: inherit; /* Add this line */
  font-family: "Roboto", sans-serif; /* Add this line */
  font-size: inherit; /* Add this line */
}

.more-action-button i {
  font-size: 24px;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.more-action-button:hover {
  background-color: #e0e0e0;
}

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

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .more-actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* My Account styles */
#my-account {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.account-content {
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.user-info {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem;
  text-align: center;
}

.user-avatar {
  width: 80px;
  height: 80px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1rem;
}

.user-avatar i {
  color: white;
}

.user-info h3 {
  margin: 0;
  font-size: 1.5rem;
}

.account-sections {
  padding: 1rem 2rem;
}

.account-sections h4 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.account-menu {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.account-menu li {
  border-bottom: 1px solid var(--light-gray);
}

.account-menu li:last-child {
  border-bottom: none;
}

.account-menu a {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.account-menu a:hover {
  background-color: var(--light-gray);
}

.account-menu i:first-child {
  margin-right: 1rem;
  width: 20px;
  color: var(--primary-color);
}

.account-menu i:last-child {
  margin-left: auto;
  color: #999;
}

@media (max-width: 768px) {
  #my-account {
    padding: 1rem;
  }

  .user-info {
    padding: 1.5rem;
  }

  .account-sections {
    padding: 1rem;
  }
}

.more-actions-grid a {
  color: var(--text-color);
  text-decoration: none;
}

.account-summary-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.account-summary-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-visibility-btn,
.notification-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  color: #333;
  padding: 5px;
}

.notification-btn {
  position: relative;
  margin-left: auto;
}

.notification-btn::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background-color: red;
  border-radius: 50%;
  display: none;
}

.notification-btn.has-notifications::after {
  display: block;
}

#notificationList {
  list-style-type: none;
  padding: 0;
}

#notificationList li {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

#notificationList li:last-child {
  border-bottom: none;
}

/* New notification modal styles */
.notification-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s;
}

.notification-modal-content {
  background-color: #fefefe;
  margin: 0;
  padding: 20px;
  border: 1px solid #888;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.notification-modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-color);
}

#notificationList {
  list-style-type: none;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}

#notificationList li {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

#notificationList li:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .notification-modal-content {
    width: 50%;
    left: 50%;
    transform: translateX(-50%);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
}
