/* ========================================================
   TOPGRADE - Dark Luxury Fintech Algo Placers Theme
   Obsidian Black UI | Champagne Gold Accents | Glassmorphism
   High-Contrast Legibility Architecture
   ======================================================== */

:root {
  /* Backgrounds - Ultra Deep Obsidian */
  --bg-primary: #040404;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #101010;

  /* Cards and surfaces */
  --surface-primary: #121212;
  --surface-secondary: #1a1a1a;
  --surface-glass: rgba(14, 14, 14, 0.94);
  --card-glass: rgba(12, 12, 12, 0.92);

  /* Gold palette */
  --gold-dark: #806020;
  --gold-bronze: #A08030;
  --gold-primary: #B9A05A;
  --gold-accent: #C8A64E;
  --gold-light: #D8BD7A;
  --gold-highlight: #E5D3A0;

  /* Typography */
  --text-primary: #FFFFFF;
  --text-secondary: #C4C4C4;
  --text-muted: #808080;
  --white: #FFFFFF;

  /* Font sizes required by placers */
  --font-xs: 10px;
  --font-sm: 11px;
  --font-base: 12px;
  --font-md: 13px;
  --font-lg: 14px;
  --font-xl: 16px;
  --font-2xl: 18px;
  --font-3xl: 20px;

  /* Shadows & Transitions - Sharp contrast without fuzzy halos */
  --shadow-compact: 0 2px 6px rgba(0, 0, 0, 0.7);
  --shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.85);
  --transition-smooth: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Gradients */
  --gold-gradient: linear-gradient(110deg, #806020, #B99A4A, #D8BD7A);
  --gold-gradient-hover: linear-gradient(110deg, #A08030, #C8A64E, #E5D3A0);
  --gradient-primary: linear-gradient(110deg, #806020, #B99A4A, #D8BD7A);
  --gradient-success: linear-gradient(135deg, #059669, #10b981);
  --gradient-danger: linear-gradient(135deg, #dc2626, #ef4444);

  /* Glass containers */
  --glass-bg: rgba(10, 10, 10, 0.96);
  --glass-light: rgba(18, 18, 18, 0.94);
  --glass-medium: rgba(14, 14, 14, 0.96);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(200, 166, 78, 0.45);

  /* Surface tokens */
  --slate: #1c1c1c;
  --light-slate: #C4C4C4;
  --dark-slate: #0e0e0e;
  --navy-dark: #040404;
  --dark-navy: #040404;

  /* State colors */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #C8A64E;
  --accent-blue: #C8A64E;
  --light-blue: #D8BD7A;
}

/* Base Body & Subtle Grid Background */
html,
body {
  background-color: #040404 !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  color: #FFFFFF !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Master Container */
.container,
.main-container {
  background: rgba(14, 14, 14, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Header Dashboard Cards (Balance / Trades / Net Profit) */
.firstline {
  gap: 6px !important;
}

.acctbalance,
.tradesTaken,
.netProfit {
  background: #181818 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: 3px solid #C8A64E !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  padding: 4px 8px !important;
}

#balance,
#tradesTaken {
  color: #BDBDBD !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

#netProfit {
  color: #FFFFFF !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

#netProfit.profit {
  color: #10b981 !important;
  text-shadow: none !important;
}

#netProfit.loss {
  color: #ef4444 !important;
  text-shadow: none !important;
}

/* Inputs, Selects, and Dropdowns */
#symbolInput,
#stake_input,
#takeprofit_input,
#maximum_losses,
#stoploss_input,
#martingaleDigitInput,
#ticksInput,
#durationInput,
#durationUnit,
.stake-input,
input,
select {
  background: #181818 !important;
  color: #FFFFFF !important;
  border: 1px solid #333333 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  outline: none !important;
}

#symbolInput:hover,
#stake_input:hover,
#takeprofit_input:hover,
#maximum_losses:hover,
#stoploss_input:hover,
input:hover,
select:hover {
  border-color: #B9A05A !important;
  box-shadow: none !important;
}

#symbolInput:focus,
#stake_input:focus,
#takeprofit_input:focus,
#maximum_losses:focus,
#stoploss_input:focus,
input:focus,
select:focus {
  border-color: #C8A64E !important;
  box-shadow: 0 0 0 1px #C8A64E !important;
}

/* Dropdown Menu Options */
#symbolInput option,
#durationUnit option,
select option {
  background: #141414 !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
}

optgroup {
  background: #0d0d0d !important;
  color: #C8A64E !important;
  font-weight: 700 !important;
}

/* Strategy Panel & Radio Options */
.strategy-panel,
.market-selection-panel,
.additional-inputs {
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 8px !important;
}

.square-radio,
label,
.additional-inputs label {
  color: #FFFFFF !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
}

.square-radio:hover {
  background: rgba(200, 166, 78, 0.12) !important;
  border-color: rgba(200, 166, 78, 0.30) !important;
}

.square-radio input[type="radio"]:checked {
  background: var(--gold-gradient) !important;
  border-color: #C8A64E !important;
  box-shadow: none !important;
}

/* Market Selection & Combined Buttons */
#combinedButton {
  background: #1a1a1a !important;
  border: 1px solid rgba(200, 166, 78, 0.40) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

#evenSection {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

#oddSection {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* Trading Summary Banner */
#tradingSummary {
  background: #161616 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: 3px solid #C8A64E !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
}

#tradingSummary span.input-value {
  color: #D8BD7A !important;
  font-weight: 700 !important;
}

/* Trade Cards / Execution Log - High Contrast Legibility */
.trade-card {
  background: #161616 !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.25s ease !important;
}

.trade-card:hover {
  border-color: rgba(200, 166, 78, 0.35) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

/* High-contrast Label Styling (Fixes unreadable blue on dark) */
.trade-item .label,
.trade-label {
  color: #C8A64E !important;
  font-size: 11px !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* High-contrast Value Styling */
.trade-item .value,
.trade-value {
  color: #FFFFFF !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

.trade-item .value.time,
.trade-time {
  color: #BDBDBD !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}

/* Status Badges */
.trade-item .status {
  padding: 3px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.trade-item .status.won,
.trade-status.won {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.trade-item .status.lost,
.trade-status.lost {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.trade-item .status.open,
.trade-status.open {
  color: #C8A64E !important;
  background: rgba(200, 166, 78, 0.18) !important;
  border: 1px solid rgba(200, 166, 78, 0.4) !important;
}

/* Profit Values */
.trade-item .profit.positive,
.trade-profit.positive {
  color: #10b981 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

.trade-item .profit.negative,
.trade-profit.negative {
  color: #ef4444 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

/* Tooltips */
[title]:hover::before,
.mobile-tooltip {
  background: #141414 !important;
  color: #FFFFFF !important;
  border: 1px solid #C8A64E !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7) !important;
  font-weight: 600 !important;
}

/* Action Buttons / Mobile Triggers */
.mobile-settings-trigger button,
#openSettingsBtn,
.action-btn-primary {
  background: linear-gradient(110deg, #806020, #B99A4A, #D8BD7A) !important;
  color: #080808 !important;
  font-weight: 800 !important;
  border: 1px solid rgba(216, 189, 122, 0.5) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

.mobile-settings-trigger button:hover,
#openSettingsBtn:hover,
.action-btn-primary:hover {
  background: linear-gradient(110deg, #A08030, #C8A64E, #E5D3A0) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Animated Character Branding */
.animate-charcter {
  background: var(--gold-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

/* Global Clean Contrast Overrides for Algo Placers: Eliminate Blurry Halos */
* {
  text-shadow: none !important;
}

.card,
.stat-box,
.trade-card,
.metric-box,
.panel,
.control-box {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.status-indicator,
.status-dot {
  box-shadow: none !important;
}