* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 206, 84, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Header */
.header {
  background: rgba(24, 26, 32, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffce54;
}

.logo-img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 10px rgba(255, 206, 84, 0.3));
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 206, 84, 0.1), transparent);
  transition: left 0.5s;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: #ffce54;
  background: rgba(255, 206, 84, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.2);
}

.nav-more {
  position: relative;
}

.more-btn {
  background: none;
  border: none;
  color: #848e9c;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.more-btn:hover {
  color: #f0b90b;
  background: rgba(240, 185, 11, 0.1);
}

.more-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #2b3139;
  border: 1px solid #3c4043;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 120px;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.more-dropdown.show {
  display: block;
}

.dropdown-link {
  display: block;
  color: #848e9c;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 14px;
  transition: all 0.2s;
}

.dropdown-link:hover {
  color: #f0b90b;
  background: rgba(240, 185, 11, 0.1);
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-status {
  color: #848e9c;
  font-size: 14px;
}

.balance-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.balance-item {
  color: #848e9c;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.login-btn {
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.3);
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 206, 84, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Market Header */
.market-header {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.market-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 206, 84, 0.5), transparent);
}

.market-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.market-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coin-icon {
  width: 32px;
  height: 32px;
}

.market-title h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.market-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  color: #848e9c;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-value.positive {
  color: #00d4aa;
  text-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.stat-value.negative {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

/* Trading Container */
.trading-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  margin-bottom: 20px;
}

/* Chart Section */
.chart-section {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #eaecef;
}

.timeframe-buttons {
  display: flex;
  gap: 4px;
}

.timeframe-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.timeframe-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 206, 84, 0.1), transparent);
  transition: left 0.5s;
}

.timeframe-btn:hover::before {
  left: 100%;
}

.timeframe-btn:hover,
.timeframe-btn.active {
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  border-color: #ffce54;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.3);
}

.chart-container {
  height: 450px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

#tradingChart {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, transparent 49%, rgba(255, 206, 84, 0.03) 50%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, rgba(120, 119, 198, 0.03) 50%, transparent 51%);
  background-size: 20px 20px;
  pointer-events: none;
}

.chart-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #848e9c;
}

.chart-loading i {
  font-size: 48px;
  opacity: 0.5;
  animation: pulse 2s infinite;
}

@keyframes chartPulse {
  0% { opacity: 0.5; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

/* Trading Panel */
.trading-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.order-form {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.order-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 170, 0.5), transparent);
}

.form-header {
  margin-bottom: 20px;
}

.form-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #eaecef;
  margin-bottom: 8px;
}

.balance-display {
  font-size: 12px;
  color: #848e9c;
}

.order-tabs {
  display: flex;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.tab-btn:hover::before {
  left: 100%;
}

.tab-btn.active {
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
  transform: translateY(-1px);
}

.tab-btn[data-tab="sell"].active {
  background: linear-gradient(135deg, #ff6b6b 0%, #e55656 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 12px;
  color: #848e9c;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: #ffce54;
  box-shadow: 0 0 0 3px rgba(255, 206, 84, 0.1);
  background: rgba(0, 0, 0, 0.4);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.percentage-buttons {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.percent-btn {
  flex: 1;
  background: none;
  border: 1px solid #3c4043;
  color: #848e9c;
  padding: 6px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.percent-btn:hover {
  border-color: #f0b90b;
  color: #f0b90b;
}

.order-type {
  margin-bottom: 16px;
}

.order-type label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #848e9c;
  cursor: pointer;
}

.total-display {
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: #848e9c;
}

.place-order-btn {
  width: 100%;
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
  position: relative;
  overflow: hidden;
}

.place-order-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.place-order-btn:hover::before {
  left: 100%;
}

.place-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

.place-order-btn:active {
  transform: translateY(0);
}

/* My Orders */
.my-orders {
  background: #1e2329;
  border-radius: 8px;
  padding: 20px;
}

.my-orders h4 {
  font-size: 16px;
  font-weight: 600;
  color: #eaecef;
  margin-bottom: 16px;
}

.orders-table {
  min-height: 200px;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 60px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #3c4043;
  font-size: 12px;
  color: #848e9c;
  font-weight: 500;
}

.no-orders {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 150px;
  color: #848e9c;
  gap: 8px;
}

.no-orders i {
  font-size: 32px;
  opacity: 0.5;
}

/* Market Data Section */
.market-data-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.order-book,
.market-history,
.depth-chart {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.order-book h3,
.market-history h3,
.depth-chart h3 {
  font-size: 16px;
  font-weight: 600;
  color: #eaecef;
  margin-bottom: 16px;
}

.order-book-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #3c4043;
  font-size: 12px;
  color: #848e9c;
  font-weight: 500;
  margin-bottom: 12px;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 4px 0;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.order-row.buy .price {
  color: #00ff88;
  text-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

.order-row.sell .price {
  color: #ff4d4d;
  text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

.spread {
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid #3c4043;
  border-bottom: 1px solid #3c4043;
  margin: 12px 0;
}

.spread-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffce54;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(255, 206, 84, 0.3);
}

.spread-label {
  font-size: 10px;
  color: #848e9c;
  margin-left: 8px;
}

.history-table .table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #3c4043;
  font-size: 12px;
  color: #848e9c;
  font-weight: 500;
  margin-bottom: 12px;
}

.history-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 4px 0;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.history-row .price.positive {
  color: #0ecb81;
}

.depth-chart-container {
  height: 200px;
  background: #0b0e11;
  border-radius: 4px;
}

/* Markets Overview */
.markets-overview {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.markets-overview h3 {
  font-size: 16px;
  font-weight: 600;
  color: #eaecef;
  margin-bottom: 16px;
}

.markets-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 206, 84, 0.1), transparent);
  transition: left 0.5s;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  border-color: #ffce54;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.3);
}

.markets-table .table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #3c4043;
  font-size: 12px;
  color: #848e9c;
  font-weight: 500;
  margin-bottom: 12px;
}

.market-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #2b3139;
  cursor: pointer;
  transition: all 0.2s;
}

.market-row:hover,
.market-row.active {
  background: rgba(240, 185, 11, 0.05);
}

.market-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-icon-small {
  width: 20px;
  height: 20px;
}

.market-row .price {
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.market-row .change.positive {
  color: #00d4aa;
  text-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

.market-row .change.negative {
  color: #ff6b6b;
  text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

/* Coin Information */
.coin-info {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.coin-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 206, 84, 0.5), transparent);
}

.coin-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.coin-icon-large {
  width: 64px;
  height: 64px;
}

.coin-details h2 {
  font-size: 24px;
  font-weight: 600;
  color: #eaecef;
  margin-bottom: 16px;
}

.coin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.stat .label {
  color: #848e9c;
}

.stat .value {
  color: #eaecef;
  font-weight: 500;
}

.coin-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.action-btn.primary {
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.3);
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 206, 84, 0.4);
}

.action-btn.secondary {
  background: rgba(255, 206, 84, 0.1);
  color: #ffce54;
  border: 1px solid rgba(255, 206, 84, 0.3);
  backdrop-filter: blur(10px);
}

.action-btn.secondary:hover {
  background: rgba(255, 206, 84, 0.2);
  border-color: #ffce54;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.2);
}

/* Footer */
.footer {
  background: rgba(24, 26, 32, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 48px;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.status-info {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #848e9c;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  color: #848e9c;
  font-size: 18px;
  transition: all 0.2s;
}

.social-link:hover {
  color: #ffce54;
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(255, 206, 84, 0.5);
}

.theme-controls {
  display: flex;
  gap: 12px;
}

.theme-btn {
  background: none;
  border: 1px solid #3c4043;
  color: #848e9c;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-btn:hover {
  border-color: #ffce54;
  color: #ffce54;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.2);
}

.footer-bottom {
  text-align: center;
  padding: 16px 20px;
  border-top: 1px solid #2b3139;
  font-size: 12px;
  color: #848e9c;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 206, 84, 0.5), transparent);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid #2b3139;
}

.modal-icon {
  width: 32px;
  height: 32px;
}

.modal-header h2 {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #eaecef;
}

.close-btn {
  background: none;
  border: none;
  color: #848e9c;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(132, 142, 156, 0.1);
}

.modal-body {
  padding: 20px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  background: #0b0e11;
  border-radius: 4px;
  padding: 2px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: #848e9c;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 206, 84, 0.3);
}

.auth-form {
  display: none;
}

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

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 16px;
  box-shadow: 0 6px 20px rgba(255, 206, 84, 0.3);
  position: relative;
  overflow: hidden;
}

.auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-btn:hover::before {
  left: 100%;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 206, 84, 0.4);
}

.auth-links {
  text-align: center;
}

.auth-links a {
  color: #ffce54;
  text-decoration: none;
  font-size: 12px;
  transition: all 0.3s;
}

.auth-links a:hover {
  color: #ffa726;
  text-shadow: 0 0 8px rgba(255, 206, 84, 0.5);
}

.auth-links a:hover {
  text-decoration: underline;
}

/* Live Support */
.live-support {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
}

.support-btn {
  background: linear-gradient(135deg, #ffce54 0%, #ffa726 100%);
  color: #000;
  border: none;
  padding: 16px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(255, 206, 84, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.support-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.support-btn:hover::before {
  left: 100%;
}

.support-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 206, 84, 0.5);
}

.support-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .trading-container {
    grid-template-columns: 1fr;
  }
  
  .market-data-section {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 16px;
  }
  
  .main-nav {
    display: none;
  }
  
  .nav-more {
    display: block;
  }
  
  .market-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .market-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
  }
  
  .market-data-section {
    grid-template-columns: 1fr;
  }
  
  .coin-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .coin-stats {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 16px;
  }
  
  .market-header {
    padding: 16px;
  }
  
  .chart-section,
  .order-form,
  .my-orders,
  .order-book,
  .market-history,
  .depth-chart,
  .markets-overview,
  .coin-info {
    padding: 16px;
  }
  
  .balance-info {
    flex-direction: column;
    gap: 8px;
  }
  
  .user-info {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
}

.order-book-header, .order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 8px;
  font-size: 14px;
}
.order-row.buy span { color: #00ff88; }
.order-row.sell span { color: #ff4d4d; }

.order-list {
  max-height: 250px; /* controlled size */
  overflow-y: auto;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 5px;
}
.pagination button {
  background: #222;
  border: 1px solid #555;
  color: #fff;
  padding: 4px 10px;
  margin: 0 4px;
  cursor: pointer;
}

/* more */
.order-book {
  font-size: 14px;
}

.order-book-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 8px;
  font-weight: bold;
  color: #aaa;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.4);
  z-index: 5;
}

.order-list {
  max-height: 220px;   /* scroll area */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 2px 8px;
  font-family: monospace;
}

.order-row.buy span { color: #00ff88; }
.order-row.sell span { color: #ff4d4d; }

.order-row:hover {
  background: rgba(255,255,255,0.05);
}

.depth-chart-container {
  width: 100%;
  height: 500px;   /* or whatever height you want */
  position: relative;
}
.spread {
  text-align: center;
  margin: 4px 0;
  font-size: 12px;
  color: #aaa;
}

#depthChart {
  width: 100%;
  height: 100%;
}

.market-history.binance-style {
  background: #111;
  border-radius: 6px;
  padding: 10px;
}

.market-history .history-wrapper {
  max-height: 240px;   /* scroll area like Binance */
  overflow-y: auto;
}

.market-history table {
  font-size: 13px;
}

.market-history td,
.market-history th {
  padding: 2px 6px;
  border: none;  /* cleaner look */
}

.market-history tr + tr {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.market-history .price-up {
  color: #0ecb81; /* Binance green */
}
.market-history .price-down {
  color: #f6465d; /* Binance red */
}
.market-history.binance-style {
  background: #0d0d0f; /* match your dark panels */
  border-radius: 8px;
  padding: 12px;
  color: #d1d4dc; /* light gray text */
  font-family: "Inter", sans-serif;
}

.market-history h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #f0b90b; /* Binance-style gold accent to match your Login button */
}

.market-history .history-wrapper {
  max-height: 240px;
  overflow-y: auto;
}

.market-history table {
  width: 100%;
  font-size: 13px;
}

.market-history th {
  font-size: 12px;
  text-transform: uppercase;
  color: #888;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 4px;
}

.market-history td {
  padding: 2px 4px;
  border: none;
}

.market-history tr:hover {
  background: rgba(240, 185, 11, 0.05); /* faint gold hover */
}

.market-history .price-up {
  color: #00ff88; /* neon green to match your buy highlights */
  font-weight: 500;
}
.market-history .price-down {
  color: #ff4d4d; /* neon red for sells */
  font-weight: 500;
}
.market-history .text-muted {
  color: #666 !important;
}
/* more */
.market-history {
  background: #0d0d0f;
  border-radius: 8px;
  padding: 12px;
  color: #d1d4dc;
  font-family: "Inter", sans-serif;
}

.market-history h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #f0b90b; /* gold accent */
}

.market-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.market-history th {
  font-size: 12px;
  text-transform: uppercase;
  color: #999;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 4px;
  text-align: left;
}

.market-history td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.market-history tr:hover {
  background: rgba(240, 185, 11, 0.06); /* faint gold hover */
}

.market-history .price-up {
  color: #00ff88; /* neon green */
  font-weight: 600;
}

.market-history .price-down {
  color: #ff4d4d; /* neon red */
  font-weight: 600;
}

.market-history .amount {
  color: #d1d4dc;
}

.market-history .time {
  color: #888;
  font-size: 12px;
}

#marketHistoryPagination .btn {
  color: #f5f5f5 !important;  /* light text */
  border-color: rgba(255,255,255,0.2);
  background: transparent;
}

#marketHistoryPagination .btn:hover {
  background: rgba(240,185,11,0.15); /* faint gold hover */
  border-color: #f0b90b;
}

#marketHistoryPagination .btn-primary {
  background: #f0b90b !important;  /* gold for active */
  border-color: #f0b90b !important;
  color: #0d0d0f !important;       /* dark text on gold */
}
#sellOrders {
  display: flex;
  flex-direction: column-reverse; /* lowest ask goes to top */
}

.order-row.sell span:first-child {
  color: #f6465d; /* Binance red */
}
.order-row.buy span:first-child {
  color: #0ecb81; /* Binance green */
}
.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 13px;
  padding: 2px 0;
}
.order-row span {
  text-align: middle;
}
.order-row span:first-child {
  text-align: middle;
}
.history-row .price.up { color: #0ecb81; }
.history-row .price.down { color: #f6465d; }
@keyframes flash-green {
  from { background-color: rgba(14, 203, 129, 0.2); }
  to { background-color: transparent; }
}
@keyframes flash-red {
  from { background-color: rgba(246, 70, 93, 0.2); }
  to { background-color: transparent; }
}
.order-row.flash-up { animation: flash-green 0.5s; }
.order-row.flash-down { animation: flash-red 0.5s; }

/* modal markets */ 
/* Modal Dark Theme */
#marketsModal .modal-content {
  background: #0e0e0e;
  color: #fff;
}

#marketsModal .table thead {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#marketsModal .table tbody tr:hover {
  background: rgba(255, 206, 84, 0.1); /* subtle yellow hover like Binance */
}

#marketsModal .btn-outline-light {
  border-color: rgba(255,255,255,0.2);
  color: #ddd;
}
#marketsModal .btn-outline-light.active {
  background: #ffce54;
  color: #000;
  border-color: #ffce54;
}

#marketsModal .btn-outline-info {
  border-color: #00c2ff;
  color: #00c2ff;
}
#marketsModal .btn-outline-warning {
  border-color: #ffce54;
  color: #ffce54;
}

/* Modal background */
.modal-backdrop {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.8);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
/* Modal box */
.modal-box {
  background:#111;
  color:#eee;
  width: 90%;
  max-width: 1100px;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 0 20px rgba(0,0,0,0.6);
}
/* Header */
.modal-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  border-bottom:1px solid #222;
}
.modal-header h3 { margin:0; font-size:1.2rem; }
.close-btn {
  background:none; border:none; color:#aaa; font-size:1.5rem; cursor:pointer;
}
/* Toolbar */
.modal-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 16px;
  border-bottom:1px solid #222;
}
.tabs .tab {
  background:#1a1a1a; border:none;
  padding:5px 12px; margin-right:6px;
  color:#aaa; border-radius:4px; cursor:pointer;
}
.tabs .tab.active { background:#f0b90b; color:#111; font-weight:600; }
#marketSearchModal {
  background:#1a1a1a; border:1px solid #333; color:#fff;
  padding:5px 10px; border-radius:4px;
}
/* Body split */
.modal-body {
  display:flex;
  padding:0;
}
.markets-list {
  flex:2; max-height:500px; overflow-y:auto; border-right:1px solid #222;
}
.markets-list table { width:100%; border-collapse:collapse; font-size:0.9rem; }
.markets-list th, .markets-list td {
  padding:8px 12px; border-bottom:1px solid #222;
}
.markets-list tr:hover { background:#1c1c1c; cursor:pointer; }
.markets-list td { text-align:right; }
.markets-list td.text-start { text-align:left; }

/* Coin Info Panel */
.coin-info {
  flex:1; padding:16px;
  display:flex; flex-direction:column; justify-content:space-between;
}
.coin-header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.coin-header img { width:40px; height:40px; }
.coin-header h4 { margin:0; }
.coin-stats p { margin:4px 0; font-size:0.85rem; }
.coin-links { margin-top:12px; }
.btn.small {
  background:#f0b90b; color:#111;
  border:none; padding:6px 12px;
  border-radius:4px; font-weight:600;
  margin-right:8px; cursor:pointer;
}
.btn.small:hover { opacity:0.9; }

/* Chart wrapper fix */
#chartPanel, .chart-section {
  height: 100%;       /* reasonable default */
  max-height: 90vh;    /* donÃ¢â‚¬â„¢t exceed half the viewport */
  min-height: 300px;   /* still usable on smaller screens */
}

  /* Consistent spacing between dashboard panels */
.swap-card,
.chart-container,
.order-book,
.market-history,
#coinInfoPanel,
#marketsPanel,
#myOrdersPanel,
#p2pMarketsPanel {
  margin-bottom: 20px;   /* equal gaps */
}

/* Consistent card padding */
.swap-card .card-body,
.chart-container,
.order-book,
.market-history {
  padding: 15px;
}
:root {
  --panel-gap: 16px;
}

.swap-card,
.chart-container,
.order-book,
.market-history,
#coinInfoPanel,
#marketsPanel,
#myOrdersPanel,
#p2pMarketsPanel {
  margin-bottom: var(--panel-gap);
}

.swap-card .card-body,
.chart-container,
.order-book,
.market-history {
  padding: var(--panel-gap);
}
/* Cap chart height like Binance */
.chart-container {
  height: 420px;       /* normal chart height */
  min-height: 380px;
  max-height: 480px;
  margin-bottom: 15px; /* tighter spacing */
  border-radius: 8px;
  overflow: hidden;
}

/* Fix coin-info panel under chart */
.chart-section .coin-info {
  margin-top: 10px;
  background: #111418;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 15px;
  color: #eee;
}

/* Keep My Orders and P2P Markets aligned neatly */
.trading-panel .my-orders,
.trading-panel .markets-overview {
  margin-top: 15px;
  border-radius: 8px;
  background: #111418;
  border: 1px solid #222;
  padding: 15px;
}

/* Flexbox alignment for bottom row (order book + market history) */
.market-data-section {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.market-data-section > div {
  flex: 1;
  border-radius: 8px;
  background: #111418;
  border: 1px solid #222;
  padding: 15px;
}
/* Binance style card wrapper */
.binance-card {
  background: #1e2026;
  border: 1px solid #2c2e33;
  border-radius: 8px;
  color: #eaecef;
  font-family: "Binance PLEX", Arial, sans-serif;
  font-size: 14px;
  overflow: hidden;
}

/* Card header */
.binance-card .card-header {
  padding: 10px 15px;
  border-bottom: 1px solid #2c2e33;
  font-weight: 600;
  font-size: 15px;
  color: #f0b90b;
}

/* Table header */
.orders-table .table-header {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 15px;
  font-weight: 600;
  background: #2c2e33;
  font-size: 13px;
  color: #a1a5b0;
  border-bottom: 1px solid #2c2e33;
}

/* Table body */
.orders-table .table-body {
  display: flex;
  flex-direction: column;
}

/* Row */
.orders-table .table-body .order-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 15px;
  border-bottom: 1px solid #2c2e33;
  transition: background 0.2s;
}
.orders-table .table-body .order-row:hover {
  background: rgba(240, 185, 11, 0.05);
}

/* Buy / Sell tags */
.order-buy {
  color: #0ecb81;
  font-weight: 600;
}
.order-sell {
  color: #f6465d;
  font-weight: 600;
}

/* Status */
.status-open {
  color: #f0b90b;
}
.status-filled {
  color: #0ecb81;
}
.status-cancelled {
  color: #a1a5b0;
  text-decoration: line-through;
}

/* No Orders */
.no-orders {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #a1a5b0;
}
.no-orders i {
  font-size: 20px;
  margin-bottom: 8px;
  display: block;
}

/* Pagination bar */
.pagination-bar {
  text-align: center;
  padding: 10px;
  border-top: 1px solid #2c2e33;
}
.pagination-bar button {
  background: none;
  border: 1px solid #2c2e33;
  color: #eaecef;
  padding: 5px 10px;
  margin: 0 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.pagination-bar button:hover {
  border-color: #f0b90b;
  color: #f0b90b;
}
.pagination-bar .active {
  background: #f0b90b;
  color: #000;
  border-color: #f0b90b;
}
.trading-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Left column (chart + coin info + my orders) */
.chart-section {
  flex: 2;
  min-width: 300px;
}

/* Right column (order form only) */
.trading-panel {
  flex: 1;
  min-width: 280px;
}

/* On mobile stack vertically */
@media (max-width: 992px) {
  .trading-container {
    flex-direction: column;
  }
  .chart-section,
  .trading-panel {
    width: 100%;
  }
}
.orders-table {
  width: 100%;
  overflow-x: auto;
}

.orders-table .table-body {
  display: flex;
  flex-direction: column;
}
.market-data-section {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .market-data-section {
    width: 100%;
  }
}
/* Make chart section expand full width on mobile */
.chart-section {
  width: 100%;
  max-width: 100%;
  /* padding: 0; */
  margin: 0;
}

/* Chart container should stretch */
.chart-container {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Force the chart placeholder to expand */
#tradingChart {
  width: 100% !important;
  min-height: 320px;
}

/* Timeframe buttons stretch row */
.timeframe-buttons {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 4px;
}

.timeframe-buttons .timeframe-btn {
  flex: 1;
  font-size: 12px;
  padding: 6px 0;
  text-align: center;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .market-header,
  .chart-header,
  .coin-info,
  .order-form,
  .my-orders,
  .market-history,
  .order-book {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }

  #tradingChart {
    min-height: 250px;
  }
}

/* fixes */

.chart-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#tradingChart {
  width: 100% !important;
  height: 60vh;           /* fills 60% of viewport height */
  min-height: 300px;      /* ensures usability on desktop */
  max-height: 500px;      /* keeps it from stretching too tall */
  position: relative;
}
  
/* Mobile adjustments */
@media (max-width: 768px) {
  #tradingChart {
    height: 45vh;         /* smaller on mobile */
    max-height: 450px;
  }
}
.chart-section {
  height:100% !important;
  max-height:1000px !important;
}

.order-book-header {
  color: white !important;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  color: #aaa;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  color: #fff;
  border-bottom: 2px solid #f0b90b; /* Binance yellow */
}

.auth-tab:hover {
  color: #f0b90b;
}

.auth-links {
  margin-top: 15px;
  text-align: center !important;
  font-size: 14px;
  color: #aaa;
}

.auth-links a {
  color: #f0b90b; /* Binance-style yellow */
  font-weight: 600;
  margin-left: 5px;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}
/* Modal box */
.modal-content {
  max-width: 420px;        /* keep a nice fixed width */
  margin: 0 auto;          /* center horizontally */
  padding: 20px 30px;
  border-radius: 10px;
  background: #111;        /* dark background */
  color: #fff;
  text-align: center;      /* center all text inside */
}

/* Input groups */
.auth-form .input-group {
  margin-bottom: 15px;
  text-align: left;        /* labels stay aligned left */
}

/* Inputs expand full width */
.auth-form .form-input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
}

/* Button */
.auth-btn {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f0b90b, #d39e00);
  color: #000;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
}

/* Centered auth-links */
.auth-links {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: #aaa;
}

.auth-links a {
  color: #f0b90b;
  font-weight: 600;
  margin-left: 5px;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}
.pin-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 22px;
  border-radius: 8px;
  border: 1px solid #2b3139;
  background: #181a20;
  color: #eaecef;
  outline: none;
}
.pin-input:focus {
  border: 1px solid #f0b90b;
  box-shadow: 0 0 6px rgba(240,185,11,0.5);
}
/* Backdrop */
.custom-modal {
  display: none; /* default hidden */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

/* Dialog box */
.custom-modal-dialog {
  background: #1e2126;
  border-radius: 8px;
  width: 320px; /* compact Binance-style size */
  max-width: 90%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  animation: scaleIn 0.2s ease-out;
}

/* Inner content */
.custom-modal-content {
  display: flex;
  flex-direction: column;
}

.custom-modal-header, .custom-modal-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2c2f36;
}

.custom-modal-footer {
  border-top: 1px solid #2c2f36;
  justify-content: flex-end;
}

.custom-modal-body {
  padding: 16px;
  font-size: 14px;
  color: #ddd;
}

/* Buttons */
.close-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
}
.close-btn:hover { color: #fff; }

.btn {
  background: #f0b90b;
  color: #111;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: #d9a308; }

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

/* Modal overlay */
.modal2fa {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
}

/* Modal box */
.modal2fa-content {
  background: #0b0e11;
  color: #eaecef;
  border: 1px solid #2b3139;
  border-radius: 12px;
  width: 320px;
  margin: 15% auto;
  padding: 20px;
  text-align: center;
  position: relative;
}

/* Close button */
.modal2fa-close {
  position: absolute;
  right: 10px; top: 5px;
  font-size: 20px;
  cursor: pointer;
  color: #aaa;
}
.modal2fa-close:hover { color: #fff; }

/* Code inputs */
.code-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 15px 0;
}
.code-inputs input {
  width: 40px; height: 50px;
  font-size: 24px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #2b3139;
  background: #1a1f25;
  color: #fff;
}

/* Button */
.btn-confirm {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #f0b90b;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}
.btn-confirm:hover { background: #d9a70a; }

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;            /* hidden by default */
  justify-content: center;  /* center horizontally */
  align-items: center;      /* center vertically */
  z-index: 2000;
}

.modal-box {
  background: #0b0e11;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  color: #eaecef;
}

/* more  */

.order-type-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #eaecef;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #4b5563;
  transition: .25s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  transition: .25s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(90deg,#0ecb81,#2ce2a0);
  box-shadow: 0 0 8px rgba(14,203,129,.55);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.order-type-notice {
  font-size: 13px;
  margin-top: -6px;
  margin-bottom: 10px;
  color: #848e9c;
  font-style: italic;
  transition: color .3s ease;
}
.order-type-notice.market {
  color: #0ecb81;
  font-weight: 600;
}
.order-type-notice.limit {
  color: #f0b90b;
  font-weight: 600;
}

.disabled-input {
  background: #1a1f2a;
  color: #aaa;
  cursor: not-allowed;
}

.markets-container {
  display: flex;
  gap: 16px;
  min-height: 300px;
}

.markets-list {
  flex: 2;
  overflow-y: auto;
}

.markets-list table {
  width: 100%;
  border-collapse: collapse;
}

.markets-list th,
.markets-list td {
  padding: 6px 10px;
  text-align: left;
}

.coin-info {
  flex: 1;
  background: #0b0e11;
  border: 1px solid #2b3139;
  border-radius: 8px;
  padding: 12px;
  min-width: 200px;
  color: #eaecef;
}

.coin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.coin-header img {
  width: 32px;
  height: 32px;
}

@media (max-width: 768px) {
  .markets-container {
    flex-direction: column;
  }
  .coin-info {
    width: 100%;
    margin-top: 12px;
  }
}
.modal-box {
  background: #0b0e11;
  border-radius: 12px;
  padding: 16px;
  max-width: 900px;   /* ðŸ‘ˆ limit modal width */
  width: 90%;
  margin: 40px auto;
  color: #eaecef;
  position: relative;
}

.markets-container {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.markets-list {
  flex: 2;          /* table takes more space */
  max-height: 400px;
  overflow-y: auto;
}

.coin-info {
  flex: 1;
  min-width: 220px;
  max-width: 280px;
  background: #111419;
  border: 1px solid #2b3139;
  border-radius: 8px;
  padding: 12px;
}

@media (max-width: 768px) {
  .markets-container {
    flex-direction: column;
  }
  .coin-info {
    max-width: 100%;
  }
}

.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;              /* hidden by default */
  align-items: center;        /* center modal */
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #0b0e11;
  border-radius: 12px;
  padding: 16px;
  max-width: 900px;
  width: 90%;
  color: #eaecef;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: none;
  border: none;
  font-size: 20px;
  color: #eaecef;
  cursor: pointer;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.markets-container {
  display: flex;
  gap: 16px;
}

@media (max-width: 768px) {
  .markets-container {
    flex-direction: column;
  }
}
  
.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;              /* hidden by default */
  align-items: center;        /* flex center vertically */
  justify-content: center;    /* flex center horizontally */
  z-index: 1000;
}

.modal-box {
  background: #0b0e11;
  border-radius: 12px;
  padding: 20px;
  max-width: 900px;
  width: 90%;                 /* never full width */
  max-height: 85vh;
  overflow-y: auto;
  color: #eaecef;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 20px;
  color: #eaecef;
  background: none;
  border: none;
  cursor: pointer;
}
/* Backdrop */
.gm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: none;                  /* toggled to flex when open */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

/* Box containment */
.gm-modal-backdrop .modal-box {
  background: #0b0e11;
  color: #eaecef;
  border: 1px solid #2b3139;
  border-radius: 12px;
  width: min(960px, 92vw);        /* never full width */
  max-height: 85vh;               /* stays on-screen */
  overflow: hidden;               /* header/toolbars fixed */
  display: grid;
  grid-template-rows: auto auto 1fr; /* header, toolbar, body scrolls */
  position: relative;
}

/* Scroll the body if tall */
.gm-modal-backdrop .modal-body {
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  padding: 10px 0 0 0;
}

/* Responsive: stack panels on narrow screens */
@media (max-width: 900px) {
  .gm-modal-backdrop .modal-body {
    grid-template-columns: 1fr;
  }
}

/* Header + toolbar */
.gm-modal-backdrop .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #2b3139;
}

.gm-modal-backdrop .modal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid #2b3139;
}

/* Close button */
.gm-modal-backdrop .close-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #eaecef;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Keep table contained */
.markets-list {
  min-width: 0;
  overflow: auto;
}

/* Make sure table cells don't force full width */
.markets-list table {
  width: 100%;
  border-collapse: collapse;
}
.markets-list th, .markets-list td {
  padding: 8px 10px;
  white-space: nowrap;
}
#userOrdersBody {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.order-row-my-orders {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 60px;
  gap: 12px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #2b3139;
  color: #eaecef;
}

@media (max-width: 768px) {
  .table-header,
  .order-row-my-orders {
    grid-template-columns: 60px 80px 80px 70px 60px 40px;
    gap: 4px;
    font-size: 11px;
  }
  
  .table-header span:nth-child(5),
  .order-row-my-orders span:nth-child(5) {
    display: none;
  }
}

.order-row-my-orders span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Balances Panel */
.balances-panel {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 999;
  overflow-y: auto;
  animation: slideDown 0.3s ease;
}

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

.balances-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.balances-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.balances-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #ffce54;
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-balances-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 18px;
}

.close-balances-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.balance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.balance-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s;
}

.balance-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 206, 84, 0.2);
  border-color: rgba(255, 206, 84, 0.3);
}

.balance-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.balance-coin-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.balance-coin-info h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.balance-coin-name {
  font-size: 12px;
  color: #848e9c;
}

.balance-amount {
  margin-bottom: 20px;
}

.balance-label {
  display: block;
  font-size: 12px;
  color: #848e9c;
  margin-bottom: 8px;
}

.balance-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #00d4aa;
  font-family: 'Courier New', monospace;
}

.balance-actions {
  display: flex;
  gap: 12px;
}

.balance-action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.deposit-btn {
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #fff;
}

.deposit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
}

.withdraw-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #e55656 100%);
  color: #fff;
}

.withdraw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.balance-extra-info {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.info-label {
  font-size: 12px;
  color: #848e9c;
}

.info-value {
  font-size: 12px;
  color: #eaecef;
  font-family: 'Courier New', monospace;
  flex: 1;
  word-break: break-all;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #848e9c;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 12px;
}

.copy-btn:hover {
  background: rgba(255, 206, 84, 0.2);
  border-color: #ffce54;
  color: #ffce54;
}

.transaction-history {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
}

.transaction-history h3 {
  font-size: 18px;
  font-weight: 600;
  color: #eaecef;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.transaction-list {
  min-height: 200px;
}

.no-transactions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #848e9c;
  gap: 12px;
}

.no-transactions i {
  font-size: 48px;
  opacity: 0.5;
}

.deposit-info {
  text-align: center;
}

.deposit-info p {
  color: #848e9c;
  margin-bottom: 16px;
}

.deposit-address-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 206, 84, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.deposit-address-box span {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #ffce54;
  word-break: break-all;
}

.deposit-qr {
  margin: 20px 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.deposit-warning {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.deposit-warning i {
  color: #ff6b6b;
  font-size: 20px;
  margin-top: 2px;
}

.deposit-warning p {
  color: #eaecef;
  font-size: 13px;
  margin: 0;
}

.input-hint {
  display: block;
  font-size: 12px;
  color: #848e9c;
  margin-top: 6px;
}

.withdraw-modal-box {
  max-width: 500px;
  max-height: 90vh;
}

.withdraw-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.withdraw-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.withdraw-row label {
  font-size: 14px;
  font-weight: 500;
  color: #eaecef;
}

.withdraw-confirm-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff6b6b 0%, #e55656 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.withdraw-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.code-inputs-2fa {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.code-input {
  width: 100%;
  height: 52px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
}

.code-input:focus {
  outline: none;
  border-color: #ffce54;
  background: rgba(255, 206, 84, 0.1);
  box-shadow: 0 0 0 2px rgba(255, 206, 84, 0.2);
}

@media (max-width: 768px) {
  .withdraw-modal-box {
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
  }
  
  .modal-overlay {
    align-items: flex-end;
  }
  
  .code-inputs-2fa {
    gap: 4px;
    max-width: 280px;
  }
  
  .code-input {
    height: 48px;
    font-size: 18px;
    border-radius: 6px;
  }
  
  .withdraw-modal-body {
    padding: 20px;
    gap: 16px;
  }
}

@media (max-width: 400px) {
  .code-inputs-2fa {
    gap: 3px;
    max-width: 240px;
  }
  
  .code-input {
    height: 44px;
    font-size: 16px;
  }
}

/* Comprehensive Mobile Responsiveness */
@media (max-width: 1024px) {
  .market-data-section {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .main-nav {
    gap: 8px;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .market-header {
    padding: 20px;
  }
  
  .market-stats {
    gap: 16px;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  .trading-container {
    grid-template-columns: 1fr;
  }
  
  .market-data-section {
    grid-template-columns: 1fr;
  }
  
  .order-book-header,
  .order-row {
    font-size: 11px;
  }
  
  .coin-stats {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-left {
    gap: 20px;
  }
  
  .logo-text {
    font-size: 18px;
  }
  
  .market-title h1 {
    font-size: 20px;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .order-form {
    padding: 16px;
  }
  
  .balance-info {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
