/* styles.css - Unified CSS for all pages */

/* Dark Theme Default */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0b0e14;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  min-height: 100vh;
}

.main-wrapper {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

/* Auth Pages (Login, Register, Connect Wallet) */
.auth-container {
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card {
  background: #121721;
  border-radius: 24px;
  border: 1px solid #1e2532;
  padding: 40px 32px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: #0560fa;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 16px;
}

.auth-logo h2 {
  font-weight: 700;
  font-size: 1.75rem;
}

.auth-logo p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 6px;
}

.form-control {
  background: #1a212d;
  border: 2px solid #1e2532;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  width: 100%;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: #0560fa;
  box-shadow: 0 0 0 3px rgba(5, 96, 250, 0.1);
}

.form-control::placeholder {
  color: #64748b;
}

.form-control.error {
  border-color: #ef4444;
}

.error-message {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

/* Password input with toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper .toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1.1rem;
}

.password-wrapper .toggle-password:hover {
  color: #ffffff;
}

/* Buttons */
.btn-primary {
  background: #0560fa;
  border: none;
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}

.btn-primary:hover {
  background: #0548c4;
  color: #ffffff;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #1e2532;
  border: none;
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #2a3447;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 2px solid #1e2532;
  color: #94a3b8;
  padding: 12px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: #0560fa;
  color: #ffffff;
}

/* Auth Links */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.auth-footer a {
  color: #0560fa;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Connect Wallet - Seed Phrase */
.seed-phrase-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.seed-word {
  background: #1a212d;
  border: 2px solid #1e2532;
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
}

.seed-word.filled {
  border-color: #0560fa;
  color: #ffffff;
}

.seed-word .word-number {
  color: #64748b;
  font-size: 0.7rem;
  display: block;
  margin-bottom: 2px;
}

.seed-word .word-text {
  font-family: monospace;
  font-size: 0.9rem;
}

.seed-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.seed-input-group .form-control {
  text-align: center;
  font-family: monospace;
  font-size: 0.9rem;
}

.seed-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.seed-actions .btn-secondary {
  flex: 1;
}

/* Alert/Warning */
.alert-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: #ef4444;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-warning i {
  font-size: 1.2rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: #10b981;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* Top Bar Navigation */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e2532;
  margin-bottom: 24px;
}

.icon-btn {
  background: #1e2532;
  border: none;
  color: #94a3b8;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.icon-btn:hover {
  background: #2a3447;
  color: #ffffff;
}

.wallet-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e2532;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Dashboard Cards */
.dashboard-card {
  background-color: #121721;
  border-radius: 16px;
  border: 1px solid #1e2532;
  padding: 24px;
}

.balance-amount {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.badge-positive {
  color: #10b981;
}

.badge-negative {
  color: #ef4444;
}

/* Action Grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px;
  background: #1a212d;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-card:hover {
  background: #222b3a;
  color: #ffffff;
}

.action-icon {
  width: 48px;
  height: 48px;
  background-color: #0560fa;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Asset List */
.asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
  color: #ffffff;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  margin-bottom: 4px;
  cursor: pointer;
}

.asset-item:hover {
  background-color: #1a212d;
}

.asset-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.asset-symbol {
  font-size: 0.85rem;
  color: #64748b;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #121721;
  border-top: 1px solid #1e2532;
  padding: 8px 0;
  z-index: 1000;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #64748b;
  font-size: 0.7rem;
  gap: 2px;
  padding: 4px 0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.bottom-nav .nav-item i {
  font-size: 1.5rem;
}

.bottom-nav .nav-item.active {
  color: #0560fa;
}

.bottom-nav .nav-item:hover {
  color: #ffffff;
}

.page-content {
  padding-bottom: 80px;
}

/* Profile Page */
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #1e2532;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #0560fa;
  margin: 0 auto;
  border: 3px solid #0560fa;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #1e2532;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.profile-menu-item:hover {
  color: #0560fa;
}

.profile-menu-item .menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #1e2532;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Network Badge */
.network-badge {
  background: #1e2532;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.network-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.address-display {
  background: #1a212d;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #94a3b8;
  word-break: break-all;
  text-align: center;
}

/* QR Code */
.qr-code-placeholder {
  width: 200px;
  height: 200px;
  background: #1a212d;
  border: 2px dashed #1e2532;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #64748b;
  font-size: 4rem;
}

/* Wallet List */
.wallet-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #1a212d;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.wallet-list-item:hover {
  border-color: #0560fa;
  background: #222b3a;
}

.wallet-list-item .wallet-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Modal */
.modal-content {
  background: #121721;
  color: #ffffff;
  border: 1px solid #1e2532;
  border-radius: 16px;
}

.modal-header {
  border-bottom: 1px solid #1e2532;
  padding: 20px 24px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid #1e2532;
  padding: 16px 24px;
}

.modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.selected-wallet-display {
  background: #1a212d;
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #0560fa;
}

/* Responsive */
@media (max-width: 767.98px) {
  .main-wrapper {
    padding: 12px;
  }
  .dashboard-card {
    padding: 16px;
    border: none;
    background-color: transparent;
  }
  .action-card {
    background: transparent;
  }
  .balance-amount {
    font-size: 2.2rem;
  }
  .bottom-nav .nav-item {
    font-size: 0.6rem;
  }
  .bottom-nav .nav-item i {
    font-size: 1.3rem;
  }
  .auth-card {
    padding: 24px 16px;
  }
  .seed-phrase-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .seed-input-group {
    grid-template-columns: 1fr;
  }
  .qr-code-placeholder {
    width: 150px;
    height: 150px;
    font-size: 3rem;
  }
}