/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0e0e1c, #1c1428, #291a34);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 60px; /* for nav bar */
}

/* Utility */
.glow {
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.btn {
  background: linear-gradient(145deg, #3a1c71, #d76d77, #ffaf7b);
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 175, 123, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

/* Header */
.top-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 999;
  font-size: 0.95rem;
}

.top-item {
  text-align: center;
  font-weight: 500;
  color: #f2f2f2;
}

/* Tabs */
.nav-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 999;
}

.tab-btn {
  background: none;
  border: none;
  color: #ccc;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.tab-btn.active {
  color: #fff;
  background: linear-gradient(145deg, #5b247a, #1bcedf);
  box-shadow: 0 0 8px rgba(91, 36, 122, 0.4);
}

/* Page Content */
.tab-page {
  display: none;
  padding: 16px;
}
.tab-page.active {
  display: block;
}

/* Coin List */
.coin-list, .portfolio-list, .autotrader-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coin-card {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.price-up {
  color: #00ffae;
}
.price-down {
  color: #ff4d6d;
}

/* Buttons */
.coin-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.coin-actions button {
  flex: 1;
}

/* Portfolio */
.portfolio-card {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}

.portfolio-profit {
  font-weight: bold;
}
.portfolio-profit.positive {
  color: #00ffaa;
}
.portfolio-profit.negative {
  color: #ff4d6d;
}

/* Empire Autotraders */
.autotrader-card {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}
.autotrader-locked {
  opacity: 0.5;
}

/* Vault */
.vault-info {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vault-info input, .vault-info select {
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Quests */
.quest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quest-list button {
  background: linear-gradient(145deg, #f857a6, #ff5858);
  color: #fff;
  padding: 10px;
  border-radius: 12px;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

/* Flex Mode Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 20, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: linear-gradient(145deg, #2a1a40, #1a0e2a);
  padding: 20px;
  border-radius: 20px;
  color: #fff;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
}

.modal-content h2 {
  margin-bottom: 16px;
}

.modal-content button {
  margin-top: 16px;
}

/* Leverage Toggle */
.leverage-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.leverage-toggle label {
  font-size: 0.95rem;
  font-weight: bold;
  color: #ffdd57;
  display: flex;
  gap: 8px;
  align-items: center;
}

input[type="checkbox"] {
  transform: scale(1.2);
}
.leverage-active {
  box-shadow: 0 0 10px #ffdd57;
  border: 2px solid #ffdd57;
}

