/* ============================================
   모바일 전용 스타일 (mobile.html)
   ============================================ */

/* CSS 변수 정의 (styles.css와 동일) */
:root {
  /* 다크 테마 (기본) */
  --bg-primary: #0b0e11;
  --bg-secondary: #161a1e;
  --border-color: #575757;
  --text-primary: #eaecef;
  --text-secondary: #848e9c;
  --btn-hover: rgba(132, 142, 156, 0.1);
  --chart-bg: #0b0e11;
  --input-bg: #0b0e11;
  --input-text: #eaecef;
  --input-border: #0b0e11;
  --input-group-bg: #0b0e11;
  --input-group-text: #848e9c;
  --progress-bg: #2a2e37;
  --progress-bar: #1e4dd8;
  --ask-color: rgb(246, 70, 93);
  --bid-color: rgb(14, 203, 129);
  --ask-bar: rgba(246, 70, 93, 0.15);
  --bid-bar: rgba(14, 203, 129, 0.15);
  --modal-bg: #0b0e11;
  --modal-border: #2a2e37;
  --alert-bg: #1e2126;
  --alert-border: #2a2e37;
  --scrollbar-track: #0b0e11;
  --scrollbar-thumb: #2a2e37;
  --table-hover-bg: #1e2126;
  --table-header-bg: #161a1e;
  --ask-volume-color: rgba(246, 70, 93, 0.2);
  --bid-volume-color: rgba(14, 203, 129, 0.2);
  --my-order-color: rgba(0, 123, 255, 0.5);
}

body:not(.dark) {
  /* 라이트 테마 */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --border-color: #dcdfe6;
  --text-primary: #2c3e50;
  --text-secondary: #606266;
  --btn-hover: rgba(0, 0, 0, 0.05);
  --chart-bg: #ffffff;
  --input-bg: #ffffff;
  --input-text: #2c3e50;
  --input-border: #ffffff;
  --input-group-bg: #ffffff;
  --input-group-text: #606266;
  --progress-bg: #e9ecef;
  --progress-bar: #007bff;
  --ask-color: #eb4d5c;
  --bid-color: #00b07c;
  --ask-bar: rgba(235, 77, 92, 0.25);
  --bid-bar: rgba(0, 176, 124, 0.25);
  --modal-bg: #ffffff;
  --modal-border: #dcdfe6;
  --alert-bg: #f5f5f5;
  --alert-border: #dcdfe6;
  --scrollbar-track: #ffffff;
  --scrollbar-thumb: #dcdfe6;
  --ask-volume-color: rgba(246, 70, 93, 0.2);
  --bid-volume-color: rgba(14, 203, 129, 0.2);
  --my-order-color: rgba(0, 123, 255, 0.3);
}

/* 기본 스타일 */
html {
  font-size: 14px;
  font-family: 'IBM Plex Sans', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 숫자가 들어가는 부분에 적용할 등너비 폰트 */
.price,
.amount,
.percentage,
.orderbook-cell,
.trade-cell,
.balance-value,
.asset-amount,
.countdown-timer,
.chart-number,
.volume-value,
.timer-value,
.form-control[type='number'],
.form-control.number {
  font-family: 'IBM Plex Mono', 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

body.mobile-page {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.container-fluid {
  padding: 0.5rem 1rem;
  max-width: 100%;
}

/* 모바일 상단 네비게이션 바 */
.mobile-top-navbar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-brand-mobile h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.back-to-menu-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.back-to-menu-mobile:hover {
  background-color: var(--btn-hover);
  color: var(--text-primary);
}

.back-to-menu-mobile i {
  font-size: 1rem;
}

.wallet-summary-mobile {
  background-color: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wallet-summary-mobile .wallet-label {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.wallet-summary-mobile .wallet-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.75rem;
}

.wallet-summary-mobile .wallet-divider {
  color: var(--border-color);
  margin: 0 4px;
}

.mobile-chart-header {
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-chart-header .form-select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 500;
  min-width: 80px;
}

.mobile-chart-header .form-select:focus {
  border-color: var(--progress-bar);
  box-shadow: 0 0 0 0.2rem rgba(30, 77, 216, 0.25);
}

/* ============================================
   모바일 반응형 스타일 (767px 이하) - v2 전용
   ============================================ */

@media (max-width: 767px) {
  /* 전역 스타일 */
  html {
    font-size: 14px;
  }

  body {
    max-width: 100%;
    width: 100% !important;
    min-width: 320px;
    overflow-x: hidden;
  }

  .container-fluid {
    padding: 0.5rem 1rem;
  }

  /* 메인 레이아웃 - 세로 스택 */
  .main-content-wrapper {
    flex-direction: column !important;
  }

  .chart-section {
    width: 100% !important;
    order: 1;
  }

  .chart-container {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px;
  }

  .orderbook-section {
    width: 100% !important;
    order: 2;
    flex-direction: column;
  }

  .orderbook-wrapper {
    width: 100% !important;
    max-width: 100%;
  }

  .orderbook-container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100%;
  }

  /* 오더북 내부 고정 width 제거 */
  .orderbook-container > div[style*="width: 300px"],
  .orderbook-container > div[style*="width: 306px"] {
    width: 100% !important;
  }

  /* 네비게이션 바 모바일 최적화 */
  .top-navbar {
    padding: 8px 12px;
    flex-wrap: wrap;
  }

  .top-navbar > div {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 4px;
  }

  .top-navbar > div:last-child {
    margin-bottom: 0;
  }

  .navbar-brand {
    font-size: 0.9rem;
  }

  .navbar-brand h5 {
    font-size: 1rem;
  }

  .top-navbar .btn {
    padding: 4px 8px;
    font-size: 0.875rem;
  }

  /* 차트 헤더 모바일 최적화 */
  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
    padding: 8px 12px;
  }

  .card-header .d-flex {
    flex-wrap: wrap;
    gap: 8px;
  }

  .input-group {
    width: 100% !important;
    max-width: 150px;
    margin-bottom: 4px;
  }

  .input-group-sm {
    font-size: 0.75rem;
  }

  .wallet-summary {
    width: 100%;
    font-size: 0.75rem;
    padding: 4px 8px;
    flex-wrap: wrap;
  }

  /* 설정 영역 모바일 최적화 */
  .settings-wrapper {
    flex-direction: column !important;
  }

  .settings-left,
  .settings-right {
    width: 100% !important;
  }

  .setting-section {
    margin-bottom: 8px;
  }

  .setting-content {
    height: auto !important;
    max-height: 200px;
    overflow-y: auto;
  }

  .setting-input {
    width: 100% !important;
    max-width: 100px;
  }

  .btn-sell-compact,
  .btn-buy-compact {
    width: 100% !important;
    max-width: 80px;
  }

  /* 모달 모바일 최적화 */
  .modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 1rem auto;
  }

  .modal-dialog.modal-lg {
    width: 95% !important;
  }

  .access-logs-container {
    max-height: 60vh;
  }

  .order-execution-panel {
    width: 95vw !important;
    right: 2.5vw !important;
    left: 2.5vw !important;
    bottom: 10px;
    max-height: 70vh;
  }

  /* 체결 목록 모바일 최적화 */
  .trade-history-container {
    height: 300px !important;
  }

  .trade-cell {
    font-size: 0.75rem;
    padding: 0 4px;
  }

  .trade-row {
    height: 24px;
    line-height: 24px;
  }

  /* 폰트 크기 조정 */
  h5 {
    font-size: 1rem;
  }

  .custom-default-font-size {
    font-size: 0.875rem !important;
  }

  /* 버튼 터치 영역 확대 */
  .btn {
    min-height: 44px;
    padding: 8px 16px;
  }

  .btn-sm {
    min-height: 36px;
    padding: 6px 12px;
  }

  /* 입력 필드 터치 최적화 */
  .form-control {
    min-height: 44px;
    font-size: 16px; /* iOS 줌 방지 */
  }

  /* 터치 액션 최적화 */
  * {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }

  /* 스크롤 부드럽게 */
  .orderbook-body,
  .trade-history-body {
    -webkit-overflow-scrolling: touch;
  }

  /* 선택 방지 (거래 인터페이스) */
  .orderbook-cell,
  .trade-cell {
    user-select: none;
    -webkit-user-select: none;
  }

  /* 모든 고정 width 제거 */
  [style*="width: 300px"],
  [style*="width: 306px"],
  [style*="width: 650px"],
  [style*="width: 550px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* PC 레이아웃 (768px 이상) - v2 전용 */
@media (min-width: 768px) {
  .main-content-wrapper {
    flex-direction: row !important;
  }

  .chart-section {
    width: 60%;
  }

  .orderbook-section {
    width: 40%;
    display: flex;
  }

  .orderbook-wrapper {
    width: 306px;
  }

  .orderbook-container {
    width: 306px;
    min-width: 306px;
  }

  .orderbook-input-area,
  .orderbook-vertical-wrapper {
    width: 100%;
  }

  .orderbook-asks,
  .orderbook-bids {
    width: 100%;
  }

  .current-price {
    width: 100%;
  }

  .settings-left,
  .settings-right {
    width: 50%;
  }
}

/* ============================================
   모바일 탭 기반 UI 스타일 (바이낸스/토스 스타일)
   ============================================ */

/* 모바일 탭 레이아웃 */
.mobile-tabs-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  position: relative;
}

.mobile-tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.mobile-tab-pane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 하단 탭 바 (바이낸스 스타일) */
.mobile-bottom-tabs {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.mobile-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 60px;
}

.mobile-tab-btn i {
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.mobile-tab-btn span {
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-tab-btn.active {
  color: var(--progress-bar);
}

.mobile-tab-btn.active i {
  color: var(--progress-bar);
  transform: scale(1.1);
}

.mobile-tab-btn:active {
  transform: scale(0.95);
}

/* 모바일 차트 컨테이너 */
.mobile-chart {
  width: 100%;
  height: calc(100vh - 250px);
  min-height: 500px;
  max-height: 700px;
  position: relative;
  background-color: var(--bg-primary);
  border-radius: 0;
  padding: 12px 8px;
  margin: 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-chart .chart {
  width: 100%;
  height: 100%;
  min-height: 480px;
  flex: 1;
}

/* 모바일 차트 범례 스타일 개선 */
.mobile-chart .echarts-legend {
  padding: 8px 12px !important;
  background-color: var(--bg-secondary) !important;
  border-radius: 8px !important;
  margin: 8px !important;
  font-size: 0.75rem !important;
}

.mobile-chart .echarts-legend-item {
  margin: 4px 8px !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* 모바일 차트 탭 패널 스타일 */
.mobile-chart-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
}


/* 모바일 차트 내부 스크롤 최적화 */
.mobile-chart .echarts {
  width: 100% !important;
  height: 100% !important;
}

/* 모바일 차트 툴팁 스타일 개선 */
.mobile-chart .echarts-tooltip {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  padding: 8px 12px !important;
  font-size: 0.75rem !important;
}

/* 모바일 차트 그리드 라인 스타일 */
.mobile-chart .echarts-grid {
  border-color: var(--border-color) !important;
}

/* 모바일 차트 축 레이블 스타일 */
.mobile-chart .echarts-axis-label {
  color: var(--text-secondary) !important;
  font-size: 0.7rem !important;
}

/* 모바일 현재 가격 크게 표시 */
.mobile-current-price-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s;
}

.mobile-current-price-large.price-up {
  background-color: rgba(14, 203, 129, 0.1);
}

.mobile-current-price-large.price-down {
  background-color: rgba(246, 70, 93, 0.1);
}

.current-price-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'IBM Plex Mono', 'Roboto Mono', monospace;
}

.mobile-current-price-large i {
  font-size: 1.8rem;
}

/* 유동성 공급 상태 표시 */
.liquidity-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: linear-gradient(135deg, #0ecb81 0%, #0ab870 100%);
  border-radius: 12px;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 12px;
  box-shadow: 0 2px 6px rgba(14, 203, 129, 0.3);
}

.liquidity-indicator i {
  font-size: 0.7rem;
}

.liquidity-indicator span {
  letter-spacing: 0.05em;
}

/* 모바일 오더북 컨테이너 */
.mobile-orderbook-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}

.mobile-orderbook-container .orderbook-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* 모바일 오더북 입력 영역 스타일 개선 */
.mobile-orderbook-container .orderbook-input-area {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 호가 개수, 주문 개수, 주문 형태 입력 필드 숨기기 */
.mobile-orderbook-container .orderbook-input-area {
  display: none !important;
}

.mobile-orderbook-container .orderbook-input-area .input-group {
  background-color: var(--bg-primary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.mobile-orderbook-container .orderbook-input-area .input-group-text {
  background-color: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 6px 8px;
}

.mobile-orderbook-container .orderbook-input-area .form-control {
  background-color: var(--bg-primary);
  border: none;
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 6px 8px;
  height: auto;
  min-height: 32px;
}

.mobile-orderbook-container .orderbook-input-area .form-check-label {
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
}

.mobile-orderbook-container .orderbook-input-area .form-check-input {
  margin-top: 0.25rem;
}

.mobile-orderbook-container .orderbook-input-area .btn-layout {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.mobile-orderbook-container .orderbook-input-area .btn-layout.active {
  background-color: var(--progress-bar);
  border-color: var(--progress-bar);
}

/* 모바일 오더북 헤더 스타일 */
.mobile-orderbook-container .orderbook-header {
  display: flex;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.mobile-orderbook-container .orderbook-header .orderbook-cell {
  flex: 1;
  text-align: right;
  padding: 0 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-orderbook-container .orderbook-header .orderbook-cell:first-child {
  text-align: left;
}

/* 모바일 오더북 행 스타일 */
.mobile-orderbook-container .orderbook-row {
  display: flex;
  height: 28px;
  line-height: 28px;
  position: relative;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background-color 0.2s;
  z-index: 1;
}

.mobile-orderbook-container .orderbook-row:hover {
  background-color: var(--btn-hover);
}

.mobile-orderbook-container .orderbook-cell {
  flex: 1;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  z-index: 2;
  font-family: 'IBM Plex Mono', 'Roboto Mono', monospace;
}

.mobile-orderbook-container .qty-cell {
  text-align: left;
}

.mobile-orderbook-container .price-cell {
  text-align: right;
  font-weight: 600;
}

/* 매수 쪽 셀 스타일 */
.mobile-orderbook-container .orderbook-bid-side .qty-cell {
  text-align: left;
  color: var(--bid-color);
}

.mobile-orderbook-container .orderbook-bid-side .price-cell {
  text-align: right;
  color: var(--bid-color);
}

/* 매도 쪽 셀 스타일 */
.mobile-orderbook-container .orderbook-ask-side .price-cell {
  text-align: left;
  color: var(--ask-color);
}

.mobile-orderbook-container .orderbook-ask-side .qty-cell {
  text-align: right;
  color: var(--ask-color);
}

/* 모바일 오더북 매도 행 스타일 */
.mobile-orderbook-container .ask-row {
  color: var(--ask-color);
  background-color: transparent;
}

.mobile-orderbook-container .ask-row::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: var(--ask-volume-percent, 0%);
  height: 100%;
  background: linear-gradient(to left, var(--ask-bar), transparent);
  z-index: 0;
  transition: width 0.3s ease;
}

.mobile-orderbook-container .ask-row.has-my-order {
  background-color: rgba(0, 123, 255, 0.15);
  border-left: 3px solid var(--my-order-color);
}

/* 모바일 오더북 매수 행 스타일 */
.mobile-orderbook-container .bid-row {
  color: var(--bid-color);
  background-color: transparent;
}

.mobile-orderbook-container .bid-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--bid-volume-percent, 0%);
  height: 100%;
  background: linear-gradient(to right, var(--bid-bar), transparent);
  z-index: 0;
  transition: width 0.3s ease;
}

.mobile-orderbook-container .bid-row.has-my-order {
  background-color: rgba(0, 123, 255, 0.15);
  border-left: 3px solid var(--my-order-color);
}

/* 모바일 현재 가격 표시 */
.mobile-orderbook-container .current-price {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  padding: 16px;
  text-align: center;
  position: relative;
  z-index: 5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mobile-orderbook-container .current-price.price-up {
  background: linear-gradient(135deg, rgba(14, 203, 129, 0.2) 0%, var(--bg-primary) 100%);
  animation: priceFlashUp 0.3s ease;
}

.mobile-orderbook-container .current-price.price-down {
  background: linear-gradient(135deg, rgba(246, 70, 93, 0.2) 0%, var(--bg-primary) 100%);
  animation: priceFlashDown 0.3s ease;
}

@keyframes priceFlashUp {
  0%, 100% { background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); }
  50% { background: linear-gradient(135deg, rgba(14, 203, 129, 0.4) 0%, var(--bg-primary) 100%); }
}

@keyframes priceFlashDown {
  0%, 100% { background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); }
  50% { background: linear-gradient(135deg, rgba(246, 70, 93, 0.4) 0%, var(--bg-primary) 100%); }
}

.mobile-orderbook-container .current-price h5 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-orderbook-container .current-price i {
  font-size: 1.2rem;
}

/* 모바일 오더북 바디 스타일 */
.mobile-orderbook-container .orderbook-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.mobile-orderbook-container .orderbook-asks {
  height: calc((100vh - 400px) / 2);
  min-height: 200px;
}

.mobile-orderbook-container .orderbook-bids {
  height: calc((100vh - 400px) / 2);
  min-height: 200px;
}

/* 좌우 분할 오더북 컨테이너 */
.orderbook-split-container {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.mobile-orderbook-split {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 400px);
  min-height: 400px;
  overflow: hidden;
}

.mobile-orderbook-split .orderbook-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
}

.mobile-orderbook-split .orderbook-side:last-child {
  border-right: none;
}

.mobile-orderbook-split .orderbook-side .orderbook-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 모바일 오더북 스크롤바 스타일 */
.mobile-orderbook-container .orderbook-body::-webkit-scrollbar {
  width: 4px;
}

.mobile-orderbook-container .orderbook-body::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.mobile-orderbook-container .orderbook-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.mobile-orderbook-container .orderbook-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================
   모바일 주문창 스타일
   ============================================ */

/* 주문창 열기 버튼 - 플로팅 버튼 스타일 */
.mobile-order-panel-toggle {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 1000;
  width: auto;
}

.btn-order-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 28px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: none;
  width: auto;
  min-width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--progress-bar) 0%, #2a5fd4 100%);
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-order-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.btn-order-panel:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-order-panel i {
  font-size: 1.1rem;
}

.btn-order-panel span {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* 주문창이 열렸을 때 레이아웃 */
.mobile-orderbook-with-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.mobile-orderbook-split-container {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* 좌측 호가창 */
.mobile-orderbook-side {
  width: 35%;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.mobile-orderbook-side .orderbook-split-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mobile-orderbook-side .orderbook-side {
  flex: 1;
  min-height: 0;
}

.mobile-orderbook-side .orderbook-body {
  max-height: 100%;
  overflow-y: auto;
}

/* 주문창 열렸을 때 한 줄 호가 스타일 */
.orderbook-single-list {
  width: 100%;
  height: 100%;
}

.orderbook-list-body {
  display: flex;
  flex-direction: column;
}

.orderbook-list-row {
  display: flex;
  align-items: center;
  min-height: 20px;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.orderbook-list-row.ask-row {
  background-color: rgba(246, 70, 93, 0.02);
}

.orderbook-list-row.bid-row {
  background-color: rgba(14, 203, 129, 0.02);
}

.orderbook-list-row.current-price-row {
  background-color: rgba(0, 0, 0, 0.05);
  font-weight: 700;
}

.orderbook-list-row.current-price-row.price-up {
  background-color: rgba(14, 203, 129, 0.1);
}

.orderbook-list-row.current-price-row.price-down {
  background-color: rgba(246, 70, 93, 0.1);
}

.orderbook-list-row.has-my-order {
  background-color: rgba(0, 123, 255, 0.15);
  border-left: 2px solid #007bff;
}

/* 우측 주문 폼 */
.mobile-order-form-side {
  width: 65%;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-order-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-order-form-header h6 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.02em;
}

.btn-close-order {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  color: #666;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-order:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
  transform: rotate(90deg);
}

.mobile-order-form-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

/* 주문 탭 버튼 */
.mobile-order-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-order-tab-btn {
  flex: 1;
  padding: 10px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}

.mobile-order-tab-btn.active {
  background-color: var(--progress-bar);
  border-color: var(--progress-bar);
  color: white;
}

/* 주문 입력 그룹 */
.mobile-order-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-order-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

.mobile-order-price-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-order-input {
  flex: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.mobile-order-input:focus {
  border-color: var(--progress-bar);
  box-shadow: 0 0 0 0.2rem rgba(30, 77, 216, 0.25);
  outline: none;
}

.btn-price-adjust {
  width: 40px;
  height: 40px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-price-adjust:active {
  background-color: var(--btn-hover);
  transform: scale(0.95);
}

.mobile-order-quick-price {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-quick-price {
  flex: 1;
  min-width: 60px;
  padding: 8px 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-quick-price:active {
  background-color: var(--btn-hover);
  border-color: var(--progress-bar);
}

.mobile-order-unit {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
}

/* 계정 정보 */
.mobile-order-account-info {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
}

.account-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-info-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.account-info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 총 주문 금액 */
.mobile-order-total {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.total-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.total-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 주문 실행 버튼 */
.btn-order-execute {
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-order-execute.btn-buy {
  background: linear-gradient(135deg, var(--bid-color) 0%, #00d4a3 100%);
  color: white;
}

.btn-order-execute.btn-buy:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-order-execute.btn-sell {
  background: linear-gradient(135deg, var(--ask-color) 0%, #ff4d6d 100%);
  color: white;
}

.btn-order-execute.btn-sell:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 주문창 내 셀프 트레이딩 섹션 */
.mobile-order-self-trading {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-order-self-trading .setting-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.mobile-order-self-trading .setting-header i {
  font-size: 1rem;
  color: #1e88e5;
}

.mobile-order-self-trading .setting-header span {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.mobile-order-self-trading .setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.mobile-order-self-trading .setting-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.mobile-order-self-trading .setting-label {
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mobile-order-self-trading .setting-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-order-self-trading .setting-input {
  height: 36px;
  font-size: 0.875rem;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #1a1a1a;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 80px;
}

.mobile-order-self-trading .setting-input[type="number"] {
  width: 80px;
}

.mobile-order-self-trading .setting-input:focus {
  background-color: #ffffff;
  border-color: #1e88e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.mobile-order-self-trading .setting-input:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.mobile-order-self-trading .setting-status {
  font-size: 0.875rem;
  font-weight: 700;
  color: #999;
  min-width: 40px;
  text-align: right;
  letter-spacing: 0.05em;
}

.mobile-order-self-trading .setting-status.active {
  color: #0ecb81;
}

.mobile-order-self-trading .setting-unit {
  font-size: 0.875rem;
  color: #666;
  margin-left: 6px;
  font-weight: 500;
}

.mobile-order-self-trading .setting-note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 16px;
  padding: 12px;
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffc107;
}

.mobile-order-self-trading .setting-note i {
  color: #f57c00;
  font-size: 0.875rem;
}

.mobile-order-self-trading .toggle-button {
  width: 52px;
  height: 28px;
  background-color: #e0e0e0;
  border: none;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-order-self-trading .toggle-button.active {
  background: linear-gradient(135deg, #0ecb81 0%, #0ab870 100%);
  box-shadow: 0 2px 8px rgba(14, 203, 129, 0.3);
}

.mobile-order-self-trading .toggle-slider {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mobile-order-self-trading .toggle-button.active .toggle-slider {
  transform: translateX(24px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* 호가창 전체 레이아웃 */
.mobile-orderbook-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.mobile-orderbook-full {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* 모바일 주문 설정 */
.mobile-order-settings {
  width: 100%;
  background-color: var(--bg-primary);
}

/* PC에서 탭 바 숨기기 */
@media (min-width: 768px) {
  .mobile-tabs-layout {
    display: none !important;
  }

  .mobile-bottom-tabs {
    display: none !important;
  }

  .desktop-layout {
    display: flex !important;
  }
}

/* ===== 모바일 로딩 화면 ===== */

.mobile-loading-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(-45deg, #0D3B14, #1B5E20, #2E7D32, #43A047, #1B5E20);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  z-index: 9999;
  overflow: hidden;
}

/* 배경 그라디언트 애니메이션 */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 배경 장식 원들 */
.mobile-loading-container::before,
.mobile-loading-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: floatOrbs 6s ease-in-out infinite;
}

.mobile-loading-container::before {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #81C784, #A5D6A7);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.mobile-loading-container::after {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  bottom: -80px;
  left: -80px;
  animation-delay: -3s;
}

@keyframes floatOrbs {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.mobile-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px;
  position: relative;
  z-index: 1;
}

.mobile-loading-logo {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: logoPulse 2s ease-in-out infinite;
}

.mobile-loading-logo i {
  font-size: 40px;
  background: linear-gradient(135deg, #fff 0%, #C8E6C9 50%, #A5D6A7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
      0 12px 40px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      0 0 40px 15px rgba(255, 255, 255, 0.15);
  }
}

.mobile-loading-spinner-wrapper {
  position: relative;
  width: 70px;
  height: 70px;
}

.mobile-loading-spinner {
  position: relative;
  width: 100%;
  height: 100%;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
}

.spinner-ring:nth-child(1) {
  border-image: linear-gradient(135deg, #fff, #A5D6A7) 1;
  border-top: 3px solid #fff;
  border-right: 3px solid #C8E6C9;
  animation: spinRing 1.2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.spinner-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-right: 3px solid #81C784;
  border-bottom: 3px solid #A5D6A7;
  animation: spinRing 1.5s linear infinite reverse;
  filter: drop-shadow(0 0 4px rgba(129, 199, 132, 0.5));
}

.spinner-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-bottom: 3px solid #C8E6C9;
  border-left: 3px solid #E8F5E9;
  animation: spinRing 1s linear infinite;
  filter: drop-shadow(0 0 3px rgba(200, 230, 201, 0.5));
}

@keyframes spinRing {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.mobile-loading-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mobile-loading-text .loading-title {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #E8F5E9 40%, #C8E6C9 70%, #A5D6A7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.08em;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-loading-text .loading-subtitle {
  font-size: 0.95rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
  animation: shimmerText 2s ease-in-out infinite;
}

@keyframes shimmerText {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.mobile-loading-dots {
  display: flex;
  gap: 10px;
}

.mobile-loading-dots span {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(200, 230, 201, 0.8));
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.mobile-loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.mobile-loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.mobile-loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0.8) translateY(0);
    opacity: 0.5;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(200, 230, 201, 0.6));
  }
  40% {
    transform: scale(1.3) translateY(-8px);
    opacity: 1;
    background: linear-gradient(135deg, #fff, #C8E6C9);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.5);
  }
}

/* 다크 모드 로딩 화면 */
body.dark .mobile-loading-container {
  background: linear-gradient(-45deg, #051A09, #0A2E14, #0D3B1A, #1B5E20, #0A2E14);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

body.dark .mobile-loading-container::before {
  background: linear-gradient(135deg, #2E7D32, #43A047);
  opacity: 0.25;
}

body.dark .mobile-loading-container::after {
  background: linear-gradient(135deg, #1B5E20, #388E3C);
  opacity: 0.2;
}

body.dark .mobile-loading-logo {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(46, 125, 50, 0.2) 100%);
  border: 1px solid rgba(76, 175, 80, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(76, 175, 80, 0.3),
    0 0 40px rgba(76, 175, 80, 0.2);
}

body.dark .mobile-loading-logo i {
  background: linear-gradient(135deg, #81C784 0%, #4CAF50 50%, #66BB6A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark .spinner-ring:nth-child(1) {
  border-top: 3px solid #4CAF50;
  border-right: 3px solid #66BB6A;
  filter: drop-shadow(0 0 6px rgba(76, 175, 80, 0.6));
}

body.dark .spinner-ring:nth-child(2) {
  border-right: 3px solid #388E3C;
  border-bottom: 3px solid #43A047;
  filter: drop-shadow(0 0 4px rgba(56, 142, 60, 0.5));
}

body.dark .spinner-ring:nth-child(3) {
  border-bottom: 3px solid #2E7D32;
  border-left: 3px solid #388E3C;
  filter: drop-shadow(0 0 3px rgba(46, 125, 50, 0.5));
}

body.dark .mobile-loading-text .loading-title {
  background: linear-gradient(135deg, #E8F5E9 0%, #A5D6A7 40%, #81C784 70%, #66BB6A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark .mobile-loading-text .loading-subtitle {
  background: linear-gradient(90deg, rgba(200, 230, 201, 0.6), rgba(165, 214, 167, 0.9), rgba(200, 230, 201, 0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark .mobile-loading-dots span {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.5), rgba(102, 187, 106, 0.7));
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

@keyframes dotBounceDark {
  0%, 80%, 100% {
    transform: scale(0.8) translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.3) translateY(-8px);
    opacity: 1;
    background: linear-gradient(135deg, #4CAF50, #81C784);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.5);
  }
}

/* ===== 다크 모드 - 모바일 주문창 ===== */

/* 주문 폼 사이드 패널 */
body.dark .mobile-order-form-side {
  background: rgba(30, 30, 30, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}

/* 주문 폼 헤더 */
body.dark .mobile-order-form-header {
  background: linear-gradient(135deg, #2a2e37 0%, #1e2128 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .mobile-order-form-header h6 {
  color: #eaecef;
}

body.dark .btn-close-order {
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
}

body.dark .btn-close-order:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 주문 폼 콘텐츠 */
body.dark .mobile-order-form-content {
  background: #1e2128;
}

/* 셀프 트레이딩 섹션 */
body.dark .mobile-order-self-trading .setting-header {
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

body.dark .mobile-order-self-trading .setting-header i {
  color: #4b7bf5;
}

body.dark .mobile-order-self-trading .setting-header span {
  color: #eaecef;
}

body.dark .mobile-order-self-trading .setting-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark .mobile-order-self-trading .setting-label {
  color: #cccccc;
}

body.dark .mobile-order-self-trading .setting-input {
  background-color: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #eaecef;
}

body.dark .mobile-order-self-trading .setting-input:focus {
  background-color: rgba(50, 50, 50, 0.9);
  border-color: #4b7bf5;
  box-shadow: 0 0 0 3px rgba(75, 123, 245, 0.2);
}

body.dark .mobile-order-self-trading .setting-input:disabled {
  background-color: rgba(30, 30, 30, 0.6);
  color: #666;
}

body.dark .mobile-order-self-trading .setting-status {
  color: #888;
}

body.dark .mobile-order-self-trading .setting-status.active {
  color: #0ecb81;
}

body.dark .mobile-order-self-trading .setting-unit {
  color: #888;
}

body.dark .mobile-order-self-trading .setting-note {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

body.dark .mobile-order-self-trading .setting-note i {
  color: #ffc107;
}

body.dark .mobile-order-self-trading .toggle-button {
  background-color: rgba(80, 80, 80, 0.6);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark .mobile-order-self-trading .toggle-button.active {
  background: linear-gradient(135deg, #0ecb81 0%, #0ab870 100%);
}

body.dark .mobile-order-self-trading .toggle-slider {
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
}

body.dark .mobile-order-self-trading .value-display {
  color: #eaecef;
}