/* ===========================
   PhysX Exchange Main Styles
   =========================== */

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

:root {
    /* Colors */
    --bg-primary: #0c0e13;
    --bg-secondary: #161a1e;
    --bg-tertiary: #1e222d;
    --bg-hover: #2b3139;
    
    --text-primary: #eaecef;
    --text-secondary: #848e9c;
    --text-muted: #5e6673;
    --text-dim: #474d57;
    
    --color-buy: #0ecb81;
    --color-sell: #f6465d;
    --color-brand: #f0b90b;
    
    --border-color: #2b3139;
    --border-light: #363a45;
    
    /* Spacing */
    --header-height: 60px;
    --panel-padding: 20px;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    overflow-y: auto; /* 세로 스크롤 활성화 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* App Wrapper - 전체 레이아웃 개선 */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* height -> min-height로 변경 */
    background: var(--bg-primary);
    overflow: visible; /* 스크롤 허용 */
}

/* Header Styles */
.binance-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 20px;
    max-width: 100%;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-brand);
    font-weight: 700;
    font-size: 18px;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

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

.logo-text {
    font-size: 18px;
    font-weight: 700;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link-active {
    color: var(--color-brand);
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-brand);
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.connection-status-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.connection-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-buy);
}

.connection-indicator.disconnected {
    background: var(--color-sell);
}

.exchange-rate-display {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-hover);
    border-radius: 4px;
}

.balance-display-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.balance-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.balance-currency {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Guest Login Button */
.login-btn {
    padding: 8px 16px;
    background: #f0b90b;
    border: none;
    border-radius: 4px;
    color: #0b0e11;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: #d4a20a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
}

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

/* User Menu */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-hover);
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-menu-btn:hover {
    background: var(--border-light);
}

.user-menu-btn svg {
    width: 12px;
    height: 12px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    display: none;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
    border: none;
}

/* Main Container Layout */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
    min-height: 600px; /* 최소 높이 설정 */
}

/* 포지션 패널이 있을 때도 flex: 1로 자동 크기 조절 */
.main-container.with-position-panel {
    /* 높이 강제 설정 제거 - flex가 자동으로 처리 */
}

/* Chart Section */
.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--border-color);
    overflow: hidden; /* 오버플로우 숨김 */
}

.chart-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px; /* 16px 20px -> 12px 16px로 축소 */
}

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

.coin-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.coin-selector:hover {
    background: var(--border-light);
}

/* 코인 드롭다운 */
.coin-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1000;
}

.coin-selector.active .coin-dropdown {
    display: block;
}

.coin-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.coin-dropdown-item:hover {
    background: var(--bg-hover);
}

.coin-dropdown-item.active {
    background: var(--bg-hover);
    color: var(--color-brand);
}

.coin-name {
    font-weight: 600;
    font-size: 12px;
}

.coin-full-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.coin-pair {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.coin-base {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.coin-quote {
    font-size: 14px;
    color: var(--text-secondary);
}

.coin-selector-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-secondary);
}

/* Price Section */
.price-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.current-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.price-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.change-amount {
    font-size: 16px;
    color: var(--color-sell);
    line-height: 1;
}

.change-amount.positive {
    color: var(--color-buy);
}

.change-percent {
    font-size: 13px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 5px;
    border: none;
    display: inline-block;
    line-height: 1;
    transition: all 0.2s ease;
}

.change-percent.positive {
    background: rgba(14, 203, 129, 0.15) !important;
    color: var(--color-buy) !important;
}

.change-percent.negative {
    background: rgba(246, 70, 93, 0.15) !important;
    color: var(--color-sell) !important;
}

/* 가격 변동 섹션에서 추가 스타일 */
.price-change .change-percent {
    margin-left: 4px;
}

/* Stats Section */
.stats-section {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

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

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Chart Controls - 2줄 레이아웃 */
.chart-controls {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* 각 줄 스타일 */
.chart-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
}

/* 첫 번째 줄 */
.chart-controls-row:first-child {
    border-bottom: 1px solid var(--border-color);
}

/* 두 번째 줄 */
.chart-controls-second {
    gap: 16px;
    padding: 6px 16px;
}

.timeframe-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* 모바일 호가 버튼 - 차트 컨트롤 안에 */
.mobile-orderbook-chart-btn,
.mobile-order-chart-btn {
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .mobile-orderbook-chart-btn,
    .mobile-order-chart-btn {
        display: flex; /* 모바일에서만 표시 */
    }
}

.mobile-orderbook-chart-btn:hover,
.mobile-order-chart-btn:hover {
    background: var(--border-light);
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.mobile-orderbook-chart-btn:active,
.mobile-order-chart-btn:active {
    transform: scale(0.95);
}

.mobile-orderbook-chart-btn svg,
.mobile-order-chart-btn svg {
    width: 16px;
    height: 16px;
}

/* 주문 버튼 특별 스타일 */
.mobile-order-chart-btn {
    background: rgba(14, 203, 129, 0.1);
    border-color: var(--color-buy);
    color: var(--color-buy);
}

.mobile-order-chart-btn:hover {
    background: var(--color-buy);
    color: white;
}

/* EMA 토글 버튼 - margin 제거 */
.ema-toggle-wrapper {
    position: relative;
    display: inline-flex;
    margin-left: 0; /* 기존 8px 제거 */
}

.ema-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ema-toggle-btn:hover {
    background: var(--border-light);
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.ema-toggle-btn:active {
    transform: scale(0.95);
}

.ema-toggle-btn.active {
    background: var(--color-brand);
    color: var(--bg-primary);
    border-color: var(--color-brand);
}

.ema-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.ema-label {
    font-weight: 600;
}

/* EMA 툴팁 */
.ema-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 12px;
    background: #1e2329;
    border: 1px solid #434651;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 200px;
    max-width: 90vw;  /* 화면 너비의 90%를 넘지 않도록 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* PC 화면에서 툴팁 위치와 크기 최적화 */
@media (min-width: 769px) {
    .ema-tooltip {
        max-width: 400px;  /* PC에서는 더 넓게 */
        white-space: nowrap;  /* 한 줄로 표시 */
    }
    
    /* 화면 왼쪽 끝에 있을 때 위치 조정 */
    .ema-toggle-wrapper:first-child .ema-tooltip,
    .ema-toggle-wrapper:nth-child(2) .ema-tooltip {
        left: 0;
        transform: translateX(0);
    }
    
    /* 화면 오른쪽 끝에 있을 때 위치 조정 */
    .ema-toggle-wrapper:last-child .ema-tooltip,
    .ema-toggle-wrapper:nth-last-child(2) .ema-tooltip {
        left: auto;
        right: 0;
        transform: translateX(0);
    }
}

/* PC에서 hover 시 표시 */
@media (min-width: 769px) {
    .ema-toggle-wrapper:hover .ema-tooltip {
        opacity: 1;
        visibility: visible;
    }
}

/* 모바일에서 클릭 시 표시 */
.ema-tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .ema-tooltip {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        width: 90%;
        max-width: 300px;
        padding: 16px;
        background: var(--bg-secondary);
        border: 2px solid var(--color-brand);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }
    
    /* 모바일에서 hover 효과 비활성화 */
    .ema-toggle-wrapper:hover .ema-tooltip {
        opacity: 0;
        visibility: hidden;
    }
    
    /* show 클래스로만 표시 */
    .ema-tooltip.show {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
}

.ema-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #434651;
}

.ema-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(1px);
    border: 5px solid transparent;
    border-bottom-color: #1e2329;
}

/* 모바일에서 화살표 숨김 */
@media (max-width: 768px) {
    .ema-tooltip::before,
    .ema-tooltip::after {
        display: none;
    }
}

/* EMA 툴팁 오버레이 - 모바일용 */
.ema-tooltip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ema-tooltip-overlay.show {
    opacity: 1;
    visibility: visible;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center; /* 중앙 정렬 */
}

.ema-info {
    display: flex;
    align-items: center;
    justify-content: center; /* 중앙 정렬 */
    gap: 8px;
    font-size: 13px;
    color: #d1d4dc;
}

.ema-color-box {
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.ema-description {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #434651;
    font-size: 11px;
    color: #848e9c;
    line-height: 1.4;
}

.timeframe-tab {
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.timeframe-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.timeframe-tab.active {
    background: var(--bg-hover);
    color: var(--color-brand);
}

.chart-tools {
    display: flex;
    gap: 8px;
}

/* 차트 정보 섹션 (캤들 타이머, 펀딩비) */
.chart-info-section {
    display: flex;
    gap: 16px;
    margin-left: auto; /* 오른쪽 정렬 */
}

.candle-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 4px;
}

.timer-label {
    color: var(--text-secondary);
    font-size: 11px;
}

#candle-countdown {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
    min-width: 40px;
}

.funding-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 4px;
}

.funding-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.funding-rate {
    font-weight: 600;
    font-family: var(--font-mono);
}

.funding-rate.positive {
    color: var(--color-buy);
}

.funding-rate.negative {
    color: var(--color-sell);
}

.funding-time {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
}

.chart-tool-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.chart-tool-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.chart-tool-btn.active {
    background: var(--bg-hover);
    color: var(--color-brand);
}

/* 차트 컨트롤 스페이서 - 모바일 왼쪽 정렬용 */
.chart-controls-spacer {
    flex: 1;
    display: none; /* PC에서는 숨김 */
}

/* Chart Container - 높이 증가 및 여백 조정 */
.chart-container {
    flex: 1;
    background: var(--bg-primary);
    position: relative;
    min-height: 0; /* 최소 높이 제거 */
    /* 차트 상호작용 활성화 */
    pointer-events: auto;
    cursor: crosshair;
    display: flex;
    flex-direction: column;
    padding: 0; /* 모든 패딩 제거 */
    margin: 0; /* 모든 마진 제거 */
}

/* 차트 영역 내부에서 모든 포인터 이벤트 활성화 */
.chart-container * {
    pointer-events: auto;
}

/* 차트 컨테이너 내부 tv-lightweight-charts 요소 */
.chart-container .tv-lightweight-charts {
    pointer-events: auto !important;
}

.chart-container canvas {
    pointer-events: auto !important;
}

/* 캔들 차트 영역 */
.chart-main {
    flex: 1;
    position: relative;
}

/* 거래량 차트 영역 - 제거 또는 축소 */
.chart-volume {
    height: 0; /* 거래량 차트 숨김 */
    display: none;
}

#candlestick-chart {
    width: 100%;
    height: 100%;
    /* 차트 요소에 대한 포인터 이벤트 활성화 */
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

/* 차트 드래그 시 커서 */
.chart-container:active {
    cursor: move;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-brand);
    margin-bottom: 10px;
}

.loading-details {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 10px;
        height: 50px;
    }
    
    .logo-text {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .exchange-rate-display {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    /* 모바일에서 주문 섹션 표시로 변경 - mobile-layout-fix.css에서 처리 */
    
    /* 모바일에서 호가창 숨기기 - 모달로 대체 */
    .orderbook-section {
        display: none !important;
    }
    
    /* 차트 섹션이 전체 너비 사용 */
    .chart-section {
        width: 100% !important;
        flex: 1 !important;
    }
    
    /* 차트 헤더 모바일 최적화 - 항상 두 줄로 표시 */
    .chart-header {
        padding: 12px;
    }
    
    .chart-header-content {
        flex-direction: column; /* 세로 배치 강제 */
        gap: 12px;
        align-items: stretch; /* 전체 너비 사용 */
    }
    
    /* 첫 번째 줄: 코인 선택과 가격 정보 */
    .coin-selector {
        width: fit-content; /* 필요한 만큼만 너비 사용 */
    }
    
    .price-section {
        flex: 1;
        justify-content: flex-start; /* 왼쪽 정렬 */
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap; /* 한 줄로 유지 */
    }
    
    .price-change {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap; /* 한 줄로 유지 */
    }
    
    /* 두 번째 줄: 24시간 통계 */
    .stats-section {
        margin-left: 0;
        width: 100%;
        order: 3; /* 세 번째 줄로 이동 */
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
        justify-content: space-between;
    }
    
    .current-price {
        font-size: 20px;
    }
    
    .change-amount {
        font-size: 14px;
    }
    
    .change-percent {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .stat-value {
        font-size: 12px;
    }
    
    /* 차트 컨트롤 모바일 최적화 */
    .chart-controls-row {
        padding: 6px 12px;
        flex-wrap: wrap;
    }
    
    .chart-controls-second {
        gap: 8px;
        padding: 6px 12px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    /* 타임프레임 탭 크기 조정 */
    .timeframe-tab {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    /* EMA 버튼 크기 조정 - 호가 버튼과 동일하게 */
    .ema-toggle-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .ema-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* 차트 정보 섹션 - 왼쪽 정렬로 변경 */
    .chart-info-section {
        margin-left: 0; /* auto에서 0으로 변경 */
        margin-right: auto; /* 왼쪽 정렬 */
        gap: 8px;
        order: 1; /* EMA, 호가 버튼 뒤에 배치 */
    }
    
    /* 펀딩비 모바일에서도 표시 */
    .funding-info {
        display: flex;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .funding-label {
        font-size: 10px;
    }
    
    .funding-rate {
        font-size: 11px;
    }
    
    .funding-time {
        display: inline; /* 시간도 표시 */
        font-size: 10px;
        color: var(--text-secondary);
    }
    
    /* 캔들 타이머 */
    .candle-timer {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .timer-label {
        font-size: 10px;
    }
    
    /* 차트 도구 버튼 표시 - 모바일에서도 필요 */
    .chart-tools {
        display: flex;
        order: 2; /* 호가 버튼 다음에 배치 */
        margin-left: 8px;
    }
    
    /* 모바일에서 차트 도구 버튼 크기 조정 */
    .chart-tool-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .chart-tool-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* 스페이서 표시 - 모바일에서 왼쪽 정렬 효과 */
    .chart-controls-spacer {
        display: none !important; /* 모바일에서도 숨김 - 왼쪽 정렬을 위해 margin-right: auto 사용 */
    }
}