/* ==========================================================================
   COPEXY MOBILE APP DESIGN SYSTEM
   Theme: Dominant Orange, Deep Black/OLED, Crisp White
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #090C10;
  --bg-secondary: #0F141C;
  --bg-card: rgba(18, 24, 35, 0.85);
  --bg-card-hover: rgba(26, 34, 48, 0.95);
  --bg-glass: rgba(255, 102, 0, 0.06);
  --bg-glass-strong: rgba(255, 102, 0, 0.12);

  /* Primary Dominant Orange */
  --orange-primary: #FF6600;
  --orange-vivid: #FF7700;
  --orange-hover: #E05500;
  --orange-light: #FFA04D;
  --orange-ultra-light: #FFE8D6;
  --orange-glow: rgba(255, 102, 0, 0.35);
  --orange-glow-intense: rgba(255, 102, 0, 0.6);
  --orange-subtle: rgba(255, 102, 0, 0.12);

  /* Text & Accents */
  --text-white: #FFFFFF;
  --text-silver: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  /* Status Colors */
  --green-profit: #10B981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --red-loss: #EF4444;
  --red-glow: rgba(239, 68, 68, 0.25);

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-orange: rgba(255, 102, 0, 0.3);
  --border-orange-bright: #FF6600;
  --shadow-app: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 102, 0, 0.12);
  --shadow-orange: 0 8px 24px rgba(255, 102, 0, 0.4);
  --shadow-floating: 0 12px 30px rgba(255, 102, 0, 0.55);

  /* Layout */
  --app-max-width: 490px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --nav-height: 72px;
  --topbar-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #05070A;
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Orange Backdrops */
body::before {
  content: '';
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.22) 0%, rgba(255, 102, 0, 0.04) 50%, transparent 75%);
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
}

body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 550px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.16) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  filter: blur(50px);
}

/* Mobile App Viewport Container */
.app-shell {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #0D1118 0%, #090C10 50%, #06080B 100%);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-app);
  border-left: 1px solid rgba(255, 102, 0, 0.15);
  border-right: 1px solid rgba(255, 102, 0, 0.15);
  padding-bottom: calc(var(--nav-height) + 30px);
}

/* Top App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  background: rgba(13, 17, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 102, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-white);
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF7700 0%, #FF5500 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 102, 0, 0.5);
  position: relative;
}

.brand-logo-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #FFFFFF 0%, #FFA04D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 102, 0, 0.18);
  color: #FFA04D;
  border: 1px solid rgba(255, 102, 0, 0.3);
}

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

.header-wallet-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 102, 0, 0.12);
  border: 1px solid rgba(255, 102, 0, 0.35);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-white);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
}

.header-wallet-pill:hover {
  background: rgba(255, 102, 0, 0.22);
  border-color: var(--orange-primary);
  transform: translateY(-1px);
}

.header-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--orange-primary);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.35);
}

.header-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Market Ticker Marquee */
.ticker-strip {
  background: rgba(10, 14, 20, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 20px;
  animation: tickerScroll 24s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ticker-symbol {
  color: #E2E8F0;
  font-weight: 700;
}

.ticker-price {
  font-family: 'JetBrains Mono', monospace;
  color: #FFFFFF;
}

.ticker-up {
  color: var(--green-profit);
}

.ticker-down {
  color: var(--red-loss);
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Glow Cards & Containers */
.card-glow {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-glow:hover {
  border-color: var(--border-orange);
  box-shadow: 0 10px 28px rgba(255, 102, 0, 0.12);
}

.card-orange-glow {
  background: linear-gradient(145deg, rgba(255, 102, 0, 0.16) 0%, rgba(18, 24, 35, 0.9) 60%);
  border: 1px solid rgba(255, 102, 0, 0.4);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(255, 102, 0, 0.15);
}

.card-orange-glow::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Typography Helpers */
.text-orange { color: var(--orange-primary) !important; }
.text-orange-light { color: var(--orange-light) !important; }
.text-green { color: var(--green-profit) !important; }
.text-red { color: var(--red-loss) !important; }
.text-muted { color: var(--text-muted) !important; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #FF7700 0%, #FF5500 100%);
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-orange);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 102, 0, 0.55);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--orange-primary);
}

.btn-orange-outline {
  background: rgba(255, 102, 0, 0.08);
  color: var(--orange-light);
  border: 1px solid rgba(255, 102, 0, 0.4);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-orange-outline:hover {
  background: var(--orange-primary);
  color: #FFFFFF;
  border-color: var(--orange-primary);
  box-shadow: 0 4px 16px rgba(255, 102, 0, 0.4);
}

/* Badges */
.badge-orange {
  background: rgba(255, 102, 0, 0.18);
  color: #FFA04D;
  border: 1px solid rgba(255, 102, 0, 0.35);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-green {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-risk {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.risk-low {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.risk-med {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Bottom Fixed Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: var(--nav-height);
  background: rgba(13, 17, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 102, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 50;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 62px;
  height: 100%;
  position: relative;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s, stroke 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--orange-primary);
}

.nav-item.active svg {
  stroke: var(--orange-primary);
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(255, 102, 0, 0.6));
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--orange-primary);
  box-shadow: 0 2px 8px var(--orange-primary);
}

/* Floating Center Action Button */
.floating-nav-btn {
  position: relative;
  top: -18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8800 0%, #FF5500 50%, #E04400 100%);
  border: 3px solid #0D1118;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: var(--shadow-floating);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 52;
}

.floating-nav-btn:hover,
.floating-nav-btn:active {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 16px 36px rgba(255, 102, 0, 0.7);
}

.floating-nav-btn svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Quick Action Center Hub Modal */
.floating-hub-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.floating-hub-overlay.active {
  display: flex;
}

.floating-hub-card {
  width: 100%;
  max-width: var(--app-max-width);
  background: #111622;
  border-top: 2px solid var(--orange-primary);
  border-radius: 28px 28px 0 0;
  padding: 24px 20px 40px 20px;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.hub-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-white);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
}

.hub-item:hover {
  background: rgba(255, 102, 0, 0.16);
  border-color: var(--orange-primary);
  transform: translateY(-2px);
}

.hub-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 102, 0, 0.18);
  border: 1px solid rgba(255, 102, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-light);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 450px;
  background: #111723;
  border: 1px solid rgba(255, 102, 0, 0.35);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 102, 0, 0.2);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--red-loss);
  color: #FFFFFF;
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-silver);
  display: flex;
  justify-content: space-between;
}

.form-control {
  width: 100%;
  background: rgba(8, 12, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
  background: rgba(12, 17, 26, 0.95);
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: 90%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  background: #0B291B;
  border: 1px solid #10B981;
  color: #A7F3D0;
}

.toast-error {
  background: #2C0F12;
  border: 1px solid #EF4444;
  color: #FECACA;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: #090C10;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 102, 0, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--orange-primary);
}
