@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --primary-color: #007bff; /* Vibrant Blue */
  --primary-dark-color: #0056b3; /* Darker Blue */
  --secondary-color: #6c757d; /* Gray 500 */
  --background-color: #f8f9fa; /* Light Gray */
  --card-background: #ffffff;
  --border-color: #dee2e6; /* Light Gray Border */
  --text-color: #212529; /* Dark Gray */
  --light-text-color: #6c757d; /* Medium Gray */
  --accent-color: #e7f3ff; /* Light Blue Accent */
  --green-500: #28a745; /* Bootstrap Green */
  --red-500: #dc3545; /* Bootstrap Red */
}

body {
  font-family: "Manrope", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Desktop Sidebar */
.sidebar {
  display: none; /* Hidden by default, shown on desktop */
  flex-direction: column;
  width: 250px;
  background-color: var(--card-background);
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.sidebar-header .logo {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 8px;
}

.sidebar-header .app-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 15px;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav .nav-item:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.sidebar-nav .nav-item.active {
  background-color: var(--primary-color);
  color: var(--card-background);
}

.sidebar-nav .nav-item.active i {
  color: var(--card-background);
}

.sidebar-nav .nav-item i {
  width: 20px;
  height: 20px;
  color: var(--secondary-color);
  transition: color 0.2s ease;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  padding: 20px;
  padding-bottom: 80px; /* Space for mobile bottom nav */
  max-width: 100%; /* Ensure it doesn't overflow */
}

.dashboard-header,
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

.page-header {
  justify-content: flex-start;
  gap: 15px;
}

.page-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.back-button {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: background-color 0.2s ease;
}

.back-button:hover {
  background-color: var(--border-color);
}

.back-button i {
  width: 24px;
  height: 24px;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.dashboard-header .header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-button {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: background-color 0.2s ease;
}

.icon-button:hover {
  background-color: var(--border-color);
}

.icon-button i {
  width: 24px;
  height: 24px;
}

.profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: var(--primary-color);
  text-decoration: none;
}

.profile-link i {
  width: 24px;
  height: 24px;
}

.profile-picture-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background-color: var(--background-color);
}

.portfolio-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.balance-card {
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.balance-card .label {
  font-size: 0.9rem;
  color: var(--light-text-color);
  margin-bottom: 5px;
}

.balance-display-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.balance-card .balance-amount {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

.balance-card .balance-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 500;
}

.balance-card .balance-change i {
  width: 18px;
  height: 18px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  justify-content: center;
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px 10px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.action-button:hover {
  background-color: var(--accent-color);
  border-color: var(--primary-color);
}

.action-button .icon-wrapper {
  background-color: var(--primary-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  color: white;
}

.action-button .icon-wrapper i {
  color: var(--card-background);
  width: 24px;
  height: 24px;
}

.section-card {
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}

.section-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.section-header p {
  font-size: 0.85rem;
  color: var(--light-text-color);
  flex-grow: 1;
  margin: 0;
}

.crypto-holdings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.holding-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.holding-card:hover {
  border-color: var(--primary-color);
}

.holding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coin-icons {
  display: flex;
  align-items: center;
  gap: -5px; /* Overlap icons */
}

.coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--card-background);
  background-color: var(--background-color); /* Placeholder background */
  object-fit: cover;
}

.coin-icons span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--light-text-color);
  margin-left: 5px;
}

.holdings-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.holding-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.currency-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--background-color); /* Placeholder background */
  object-fit: cover;
}

.currency-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.currency-name {
  font-weight: 600;
  font-size: 1rem;
}

.currency-ticker {
  font-size: 0.85rem;
  color: var(--light-text-color);
}

.currency-balance {
  font-weight: 500;
  font-size: 0.95rem;
  text-align: right;
  min-width: 80px;
}

.currency-usd {
  font-weight: 600;
  font-size: 1rem;
  text-align: right;
  min-width: 100px;
}

.expand-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.expand-card {
  background-color: var(--accent-color);
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  font-weight: 500;
  color: var(--primary-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.expand-card:hover {
  background-color: #d0e8ff; /* Slightly darker accent */
}

.expand-card i {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
}

/* Mobile Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: var(--card-background);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  color: var(--light-text-color);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.bottom-nav .nav-item i {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  color: var(--light-text-color);
  transition: color 0.2s ease;
}

.bottom-nav .nav-item.active {
  color: var(--primary-color);
}

.bottom-nav .nav-item.active i {
  color: var(--primary-color);
}

/* Forms */
.form-card {
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 8px;
}

.input-field,
.file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--background-color);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus,
.file-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* primary-color with 20% opacity */
}

.input-field::placeholder {
  color: var(--light-text-color);
}

.file-input {
  padding: 8px 12px;
  cursor: pointer;
}

.primary-button {
  background-color: var(--primary-color);
  color: var(--card-background);
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.primary-button:hover {
  background-color: var(--primary-dark-color);
}

.primary-button:disabled {
  background-color: var(--secondary-color);
  cursor: not-allowed;
}

.secondary-button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 10px 15px;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.secondary-button:hover {
  background-color: var(--primary-color);
  color: var(--card-background);
}

/* Deposit Page Specific */
.address-display-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  gap: 10px;
}

.address-display {
  flex-grow: 1;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-color);
  word-break: break-all;
  margin: 0;
}

.copy-button {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.copy-button:hover {
  background-color: var(--accent-color);
}

.copy-button i {
  width: 20px;
  height: 20px;
}

/* Withdrawal Page Specific */
.tab-buttons {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  flex: 1;
  padding: 10px 15px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--light-text-color);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  display: flex; /* Added for icon alignment */
  align-items: center; /* Added for icon alignment */
  justify-content: center; /* Added for icon alignment */
  gap: 8px; /* Space between icon and text */
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
}

.withdrawal-form {
  display: none;
}

.withdrawal-form.active-form {
  display: block;
}

/* Settings Page Specific */
.profile-picture-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.profile-picture {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background-color: var(--background-color);
}

/* Recent Transactions Page Specific */
.transactions-list .transaction-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.transactions-list .transaction-item:last-child {
  border-bottom: none;
}

.transactions-list .transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.transactions-list .transaction-icon i {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}

.transactions-list .transaction-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.transactions-list .transaction-type {
  font-weight: 600;
  font-size: 1rem;
}

.transactions-list .transaction-date {
  font-size: 0.85rem;
  color: var(--light-text-color);
}

.transactions-list .transaction-amount {
  font-weight: 600;
  font-size: 1rem;
  text-align: right;
}

.transactions-list .transaction-status {
  font-size: 0.85rem;
  text-align: right;
  font-weight: 500;
}

.transactions-list .transaction-status.completed {
  color: var(--green-500);
}

.transactions-list .transaction-status.pending {
  color: #ffc107; /* Yellow */
}

.transactions-list .transaction-status.failed {
  color: var(--red-500);
}

/* Utility classes */
.text-green-500 {
  color: var(--green-500);
}
.text-red-500 {
  color: var(--red-500);
}
.text-gray-500 {
  color: var(--light-text-color);
}
.w-full {
  width: 100%;
}
.ml-auto {
  margin-left: auto;
}
.text-center {
  text-align: center;
}
.mb-4 {
  margin-bottom: 1rem;
}

/* Notification System Styles */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
}

.toast-notification {
  background-color: var(--card-background);
  color: var(--text-color);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInOut 4s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-notification.success {
  border-left: 5px solid var(--green-500);
}

.toast-notification.error {
  border-left: 5px solid var(--red-500);
}

.toast-notification.info {
  border-left: 5px solid var(--primary-color);
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

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

.modal-dialogue {
  background-color: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 450px;
  overflow: hidden;
  animation: scaleIn 0.3s ease-out;
}

.modal-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header {
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--primary-color);
}

.modal-body {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  text-align: center;
}

.modal-footer {
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

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

/* Spinner Styles */
.spinner {
  border: 2px solid #f3f3f3; /* Light grey */
  border-top: 2px solid var(--primary-color); /* Blue */
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Media Queries for Responsiveness */
@media (max-width: 767px) {
  .action-button {
    padding: 10px 5px; /* Smaller padding */
    font-size: 0.75rem; /* Smaller font size */
  }

  .action-button .icon-wrapper {
    width: 32px; /* Even smaller icon wrapper */
    height: 32px;
  }

  .action-button .icon-wrapper i {
    width: 16px; /* Even smaller icon */
    height: 16px;
  }
}

@media (min-width: 768px) {
  .sidebar {
    display: flex; /* Show sidebar on desktop */
  }

  .main-content {
    padding: 30px;
    padding-bottom: 20px; /* Remove space for mobile bottom nav */
  }

  .bottom-nav {
    display: none; /* Hide mobile bottom nav on desktop */
  }

  .dashboard-header {
    padding: 0; /* Remove padding as sidebar handles left spacing */
  }

  .action-buttons {
    grid-template-columns: repeat(5, 1fr); /* 5 columns on desktop */
  }

  .crypto-holdings {
    grid-template-columns: 1fr 1fr; /* 2 columns for holdings cards */
  }

  .expand-options {
    grid-template-columns: 1fr 1fr; /* 2 columns for expand options */
  }
}

@media (min-width: 1024px) {
  .main-content {
    max-width: 1200px; /* Limit content width on larger screens */
    margin: 0 auto; /* Center content */
  }
}

button{
  font-family: inherit;
}