/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0e1a;
    background-image: 
        radial-gradient(ellipse at 20% 10%, rgba(234, 148, 25, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 90%, rgba(255, 165, 0, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(234, 148, 25, 0.03) 0%, transparent 60%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Container */
.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(13, 17, 28, 0.95);
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
}

/* Market Header */
.market-header {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 16px 24px;
    background: rgba(16, 20, 35, 0.9);
    border-bottom: 1px solid rgba(234, 148, 25, 0.15);
}

.market-info-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.market-price-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.current-price-lg {
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
}

.price-change-lg {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.price-change-lg.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.price-change-lg.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.market-info-stats {
    display: flex;
    gap: 32px;
    flex: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

.logo h1 {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #ea9419 0%, #d68315 50%, #c77310 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -1px;
    text-shadow: 0 0 40px rgba(234, 148, 25, 0.3);
    position: relative;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(234, 148, 25, 0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(234, 148, 25, 0.6)); }
}

.logo-subtitle {
    font-size: 11px;
    color: #ea9419;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-top: 2px;
    display: block;
    opacity: 0.7;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance {
    font-size: 18px;
    font-weight: 800;
    color: #ea9419;
    text-shadow: 0 0 20px rgba(234, 148, 25, 0.5);
    background: rgba(234, 148, 25, 0.1);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(234, 148, 25, 0.3);
    transition: all 0.3s ease;
}

#userBalance {
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary {
    background: rgba(30, 35, 50, 0.6);
    border: 1px solid rgba(234, 148, 25, 0.2);
    color: #f0f6fc;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234, 148, 25, 0.1), rgba(255, 165, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(40, 45, 60, 0.8);
    border-color: rgba(234, 148, 25, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 148, 25, 0.2), 0 0 20px rgba(234, 148, 25, 0.1);
}

.btn-secondary:hover::before {
    opacity: 1;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 240px 1fr 280px 320px;
    gap: 1px;
    height: calc(100vh - 160px);
    background: rgba(234, 148, 25, 0.02);
}

/* Markets Panel (Left) */
.markets-panel {
    background: rgba(10, 14, 26, 0.5);
    border-right: 1px solid rgba(234, 148, 25, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.markets-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.markets-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.expand-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.expand-btn:hover {
    color: #ea9419;
}

.market-search-wrapper {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.05);
}

.market-search {
    width: 100%;
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(234, 148, 25, 0.15);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.market-search::placeholder {
    color: #4b5563;
}

.market-search:focus {
    outline: none;
    border-color: #ea9419;
}

.market-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.05);
}

.market-tab {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.market-tab:hover {
    color: #9ca3af;
    background: rgba(234, 148, 25, 0.05);
}

.market-tab.active {
    color: #ffffff;
    background: rgba(234, 148, 25, 0.15);
}

.market-sort {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.05);
    font-size: 11px;
}

.sort-item {
    color: #6b7280;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s ease;
}

.sort-item:hover {
    color: #9ca3af;
}

.sort-item.active {
    color: #ffffff;
}

.markets-list {
    flex: 1;
    overflow-y: auto;
}

.market-item {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-item:hover {
    background: rgba(234, 148, 25, 0.08);
}

.market-item.active {
    background: rgba(234, 148, 25, 0.12);
    border-left: 2px solid #ea9419;
}

.market-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.market-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-icon {
    color: #ea9419;
    font-size: 10px;
}

.market-leverage {
    font-size: 10px;
    background: rgba(234, 148, 25, 0.2);
    color: #ea9419;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.market-item-volume {
    font-size: 11px;
    color: #6b7280;
}

.market-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.market-item-price-value {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-align: right;
}

.market-item-change {
    font-size: 12px;
    font-weight: 600;
}

.market-item-change.positive {
    color: #10b981;
}

.market-item-change.negative {
    color: #ef4444;
}

/* Chart Panel (Center) */
.chart-panel {
    background: rgba(10, 14, 26, 0.3);
    display: flex;
    flex-direction: column;
}

.chart-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
    background: rgba(10, 14, 26, 0.5);
}

.chart-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chart-title-text {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
}

.chart-ohlc {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.ohlc-value {
    color: #ffffff;
    margin-left: 4px;
    margin-right: 8px;
}

.ohlc-value.green {
    color: #10b981;
}

.ohlc-value.red {
    color: #ef4444;
}

.ohlc-change {
    margin-left: 8px;
}

.ohlc-change.green {
    color: #10b981;
}

.ohlc-change.red {
    color: #ef4444;
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-action-btn {
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(234, 148, 25, 0.2);
    color: #9ca3af;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-action-btn:hover {
    border-color: #ea9419;
    color: #ffffff;
}

.chart-tools {
    display: flex;
    gap: 4px;
    margin-left: 16px;
}

.chart-tool-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.chart-tool-btn:hover {
    color: #ea9419;
}

/* Order Book Panel */
.orderbook-panel {
    background: rgba(10, 14, 26, 0.5);
    border-right: 1px solid rgba(234, 148, 25, 0.1);
    overflow-y: auto;
}

.orderbook-tabs-header {
    display: flex;
    gap: 2px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
}

.ob-tab {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ob-tab:hover {
    color: #9ca3af;
}

.ob-tab.active {
    color: #ffffff;
    background: rgba(234, 148, 25, 0.15);
}

.orderbook-controls-row {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.05);
}

/* Trading Panel (Far Right) */
.trading-panel {
    background: rgba(10, 14, 26, 0.5);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.trading-tabs {
    display: flex;
    gap: 2px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
}

.trading-tab {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.trading-tab:hover {
    color: #9ca3af;
}

.trading-tab.active {
    color: #ffffff;
    background: rgba(234, 148, 25, 0.15);
}

.form-row {
    margin-bottom: 12px;
}

.form-select {
    width: 100%;
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(234, 148, 25, 0.2);
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #ea9419;
}

.available-balance {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
    font-weight: 600;
}

.available-balance span {
    color: #ffffff;
}

.input-wrapper {
    position: relative;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(234, 148, 25, 0.15);
    color: #ffffff;
    padding: 10px 60px 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-input:focus {
    outline: none;
    border-color: #ea9419;
}

.input-unit {
    position: absolute;
    right: 12px;
    top: 10px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    line-height: 20px;
}

.price-buttons {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.price-btn {
    background: rgba(234, 148, 25, 0.1);
    border: 1px solid rgba(234, 148, 25, 0.2);
    color: #ea9419;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.price-btn:hover {
    background: rgba(234, 148, 25, 0.2);
    border-color: #ea9419;
}

.total-info {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 600;
}

.total-info span {
    color: #ffffff;
}

.percentage-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.percentage-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    min-width: 30px;
}

.percentage-slider {
    flex: 1;
}

.percentage-slider input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(234, 148, 25, 0.2);
    border-radius: 2px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.percentage-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #ea9419;
    border-radius: 50%;
    cursor: pointer;
}

.max-buy {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

.est-price {
    font-size: 13px;
    color: #6b7280;
    padding: 10px 12px;
    background: rgba(10, 14, 26, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(234, 148, 25, 0.1);
}

.fees-info {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 600;
}

.fee-detail {
    color: #9ca3af;
}

.form-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid rgba(234, 148, 25, 0.2);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option-btn:hover {
    background: rgba(234, 148, 25, 0.1);
    border-color: rgba(234, 148, 25, 0.4);
    color: #ea9419;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(234, 148, 25, 0.2);
}

.option-btn[data-active="true"] {
    background: linear-gradient(135deg, rgba(234, 148, 25, 0.2), rgba(234, 148, 25, 0.15));
    border-color: #ea9419;
    color: #ea9419;
    box-shadow: 
        0 4px 16px rgba(234, 148, 25, 0.3),
        inset 0 1px 0 rgba(234, 148, 25, 0.2);
}

.option-btn[data-active="true"]:hover {
    background: linear-gradient(135deg, rgba(234, 148, 25, 0.25), rgba(234, 148, 25, 0.2));
    box-shadow: 
        0 6px 20px rgba(234, 148, 25, 0.4),
        inset 0 1px 0 rgba(234, 148, 25, 0.3);
}

.option-text {
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Bottom Tabs Panel */
.bottom-tabs-panel {
    background: rgba(10, 14, 26, 0.8);
    border-top: 1px solid rgba(234, 148, 25, 0.15);
    margin-top: 0;
}

.bottom-tabs-header {
    display: flex;
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
    padding: 0 16px;
    background: rgba(13, 17, 28, 0.6);
}

.bottom-tab {
    background: none;
    border: none;
    color: #6b7280;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.bottom-tab:hover {
    color: #ea9419;
    background: rgba(234, 148, 25, 0.05);
}

.bottom-tab.active {
    color: #ea9419;
    border-bottom-color: #ea9419;
    background: rgba(234, 148, 25, 0.08);
}

.bottom-tabs-content {
    min-height: 200px;
    padding: 16px;
}

.bottom-tab-content {
    display: none;
}

.bottom-tab-content.active {
    display: block;
}

.positions-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(234, 148, 25, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(234, 148, 25, 0.1);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.summary-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
}

.no-orders {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    padding: 32px 16px;
    font-weight: 600;
    background: rgba(234, 148, 25, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(234, 148, 25, 0.15);
}

.btn-trade {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-trade.buy {
    background: #10b981;
    color: #000;
}

.btn-trade.buy:hover {
    background: #059669;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-trade.sell {
    background: #ef4444;
    color: #fff;
}

.btn-trade.sell:hover {
    background: #dc2626;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* Cards */
.trading-card, .positions-card, .orderbook-card {
    background: transparent;
    padding: 16px;
    height: 100%;
}

.trading-panel .trading-card {
    border-bottom: 1px solid rgba(234, 148, 25, 0.1);
}

.trading-panel .positions-card {
    flex: 1;
    margin-top: 0;
}

.trading-form {
    padding: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.15);
}

.orderbook-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.depth-selector {
    background: rgba(234, 148, 25, 0.08);
    border: 1px solid rgba(234, 148, 25, 0.3);
    color: #ea9419;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(234, 148, 25, 0.1);
}

.depth-selector:hover {
    background: rgba(234, 148, 25, 0.12);
    border-color: rgba(234, 148, 25, 0.5);
    box-shadow: 0 0 25px rgba(234, 148, 25, 0.2);
    transform: translateY(-1px);
}

.depth-selector:focus {
    outline: none;
    border-color: #ea9419;
    box-shadow: 0 0 0 3px rgba(234, 148, 25, 0.2);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

/* Market Selector */
.market-selector select {
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(234, 148, 25, 0.2);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.market-selector select:hover {
    border-color: #ea9419;
}

.market-selector select:focus {
    outline: none;
    border-color: #ea9419;
}

/* Trading Form */

/* Side Buttons */
.side-buttons {
    display: flex;
    gap: 8px;
}

.side-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(234, 148, 25, 0.2);
    background: rgba(10, 14, 26, 0.6);
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.side-btn:hover {
    color: #9ca3af;
}

.side-btn.buy.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

.side-btn.sell.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}





/* Primary Button */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #ea9419 0%, #d68315 50%, #c77310 100%);
    border: none;
    color: #000;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(234, 148, 25, 0.4),
        0 0 60px rgba(234, 148, 25, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 48px rgba(234, 148, 25, 0.6),
        0 0 80px rgba(234, 148, 25, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 24px rgba(234, 148, 25, 0.5),
        0 0 40px rgba(234, 148, 25, 0.3);
}

/* Positions */
.no-positions {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    padding: 32px 16px;
    font-weight: 600;
    background: rgba(234, 148, 25, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(234, 148, 25, 0.15);
    margin: 8px 0;
}

.position-row {
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(234, 148, 25, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(234, 148, 25, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.position-row:hover {
    transform: translateY(-2px);
    border-color: rgba(234, 148, 25, 0.4);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(234, 148, 25, 0.15),
        inset 0 1px 0 rgba(234, 148, 25, 0.2);
}

.position-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.position-market {
    font-weight: 600;
    color: #fff;
}

.position-side {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.position-side.buy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.2));
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.position-side.sell {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.2));
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.position-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #ccc;
}

.position-pnl {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    padding: 8px 12px;
    border-radius: 10px;
    text-align: center;
}

.position-pnl.positive {
    color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.position-pnl.negative {
    color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.3);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

.btn-close {
    width: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 16px rgba(239, 68, 68, 0.3),
        0 0 20px rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-close::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 ease;
}

.btn-close:hover::before {
    left: 100%;
}

.btn-close:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 24px rgba(239, 68, 68, 0.4),
        0 0 40px rgba(239, 68, 68, 0.3);
}

.btn-close:active {
    transform: translateY(0);
}

/* Chart */
.chart-container {
    background: transparent;
    padding: 16px;
    height: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(234, 148, 25, 0.05);
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}






/* Timeframe Buttons */
.timeframe-buttons {
    display: flex;
    gap: 2px;
    flex: 1;
}

.timeframe-btn {
    padding: 5px 10px;
    background: transparent;
    border: none;
    color: #6b7280;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.timeframe-btn:hover {
    color: #d1d5db;
    background: rgba(234, 148, 25, 0.1);
}

.timeframe-btn.active {
    background: rgba(234, 148, 25, 0.2);
    color: #ea9419;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    min-height: 500px;
    width: 100%;
}

#priceChart {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.volume-chart {
    height: 120px;
    position: relative;
    padding: 8px 16px;
    border-top: 1px solid rgba(234, 148, 25, 0.1);
}

.volume-label {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    z-index: 10;
}

#volumeChart {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Order Book */
.orderbook-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 8px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    border-bottom: 1px solid rgba(234, 148, 25, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(234, 148, 25, 0.03);
    border-radius: 6px;
    margin-bottom: 8px;
}

.orderbook-asks, .orderbook-bids {
    max-height: 180px;
    overflow-y: auto;
}

.orderbook-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border-radius: 6px;
    margin: 2px 0;
}

.orderbook-row:hover {
    background: rgba(234, 148, 25, 0.08);
    transform: translateX(4px);
}

.orderbook-row.ask {
    color: #ef4444;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.03));
}

.orderbook-row.ask:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

.orderbook-row.bid {
    color: #10b981;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.03));
}

.orderbook-row.bid:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
}

.orderbook-spread {
    text-align: center;
    padding: 8px 12px;
    background: rgba(234, 148, 25, 0.05);
    margin: 4px 0;
}

.spread-price {
    font-size: 16px;
    color: #10b981;
    font-weight: 700;
    margin-bottom: 4px;
}

.spread-value {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

/* Trades */
.trades-list {
    max-height: 180px;
    overflow-y: auto;
}

.trade-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    padding: 4px 0;
    font-size: 11px;
    border-bottom: 1px solid #21262d;
    font-weight: 500;
}

.trade-row:last-child {
    border-bottom: none;
}

.trade-price.buy {
    color: #3fb950;
}

.trade-price.sell {
    color: #f85149;
}

/* Market Data Table - Hidden */
.market-data {
    display: none;
}

.price-positive {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    font-weight: 700;
}

.price-negative {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 220px 1fr 260px 300px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 200px 1fr 240px 280px;
    }
    
    .market-info-stats {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .markets-panel, .orderbook-panel, .trading-panel {
        display: none;
    }
    
    .chart-panel {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .market-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .market-info-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 14, 26, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(234, 148, 25, 0.4), rgba(199, 115, 16, 0.4));
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 10px rgba(234, 148, 25, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(234, 148, 25, 0.6), rgba(199, 115, 16, 0.6));
    box-shadow: 0 0 20px rgba(234, 148, 25, 0.5);
}

::-webkit-scrollbar-corner {
    background: rgba(10, 14, 26, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(234, 148, 25, 0.4),
            0 0 60px rgba(234, 148, 25, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 40px rgba(234, 148, 25, 0.6),
            0 0 80px rgba(234, 148, 25, 0.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.trading-card, .positions-card, .orderbook-card, .chart-container {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #333;
    border-top: 2px solid #ea9419;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Notifications */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4444;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.error-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.error-content p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.error-content button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.error-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Wallet Info */
.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-right: 15px;
    padding: 10px 16px;
    background: rgba(234, 148, 25, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(234, 148, 25, 0.2);
}

.wallet-address {
    font-size: 13px;
    color: #9ca3af;
    font-family: 'Monaco', 'Courier New', monospace;
    font-weight: 600;
}

.wallet-connect {
    display: flex;
    gap: 10px;
}

/* Wallet Dropdown */
.wallet-dropdown {
    position: relative;
    display: inline-block;
}

.wallet-dropdown .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
}

.wallet-dropdown .btn-primary svg {
    transition: transform 0.3s ease;
}

.wallet-dropdown.active .btn-primary svg {
    transform: rotate(180deg);
}

.wallet-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.95);
    border: 1px solid rgba(234, 148, 25, 0.2);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-dropdown.active .wallet-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: rgba(13, 17, 28, 0.4);
    border: 1px solid rgba(234, 148, 25, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
    margin-bottom: 6px;
}

.wallet-option:last-child {
    margin-bottom: 0;
}

.wallet-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #ea9419, #ffa500);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.wallet-option:hover {
    background: rgba(234, 148, 25, 0.15);
    border-color: rgba(234, 148, 25, 0.3);
    color: #ea9419;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(234, 148, 25, 0.2);
}

.wallet-option:hover::before {
    transform: scaleY(1);
}

.wallet-option:active {
    transform: translateX(2px) scale(0.98);
}

.wallet-option img,
.wallet-logo {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
}

.wallet-option:hover img,
.wallet-option:hover .wallet-logo {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(234, 148, 25, 0.5));
    background: rgba(255, 255, 255, 0.1);
}

.wallet-option span {
    flex: 1;
    letter-spacing: 0.3px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(234, 148, 25, 0.1);
    border: 1px solid rgba(234, 148, 25, 0.2);
    color: #ea9419;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(234, 148, 25, 0.2);
    border-color: rgba(234, 148, 25, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 148, 25, 0.3);
}

.social-link svg {
    transition: all 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Button Base Styles */
.btn-primary {
    background: linear-gradient(135deg, #ea9419 0%, #c77310 100%);
    border: 1px solid rgba(234, 148, 25, 0.3);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffa500 0%, #ea9419 100%);
    border-color: rgba(234, 148, 25, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 148, 25, 0.3);
}

/* Disabled States */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Remove number input spinners (arrows) - hide completely */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Firefox */
input[type="number"]::-moz-inner-spin-button,
input[type="number"]::-moz-outer-spin-button {
    display: none !important;
    opacity: 0 !important;
}

/* Specific for form inputs */
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button,
#priceInput::-webkit-inner-spin-button,
#priceInput::-webkit-outer-spin-button,
#qtyInput::-webkit-inner-spin-button,
#qtyInput::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Connect Wallet Button - Enhanced Styling */
.connect-wallet-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ea9419 0%, #c77310 100%);
    border: 2px solid rgba(255, 165, 0, 0.4);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(234, 148, 25, 0.4),
        0 0 40px rgba(234, 148, 25, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.connect-wallet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.connect-wallet-btn:hover::before {
    left: 100%;
}

.connect-wallet-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 32px rgba(234, 148, 25, 0.6),
        0 0 60px rgba(234, 148, 25, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 165, 0, 0.6);
}

.connect-wallet-btn:active {
    transform: translateY(0) scale(0.98);
}

.wallet-icon {
    stroke: currentColor;
    stroke-width: 2.5;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.connect-wallet-btn:hover .wallet-icon {
    transform: rotate(-5deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.connect-text {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.dropdown-arrow {
    transition: all 0.3s ease;
    opacity: 0.8;
    flex-shrink: 0;
}

.connect-wallet-btn:hover .dropdown-arrow {
    transform: translateY(2px);
    opacity: 1;
}

/* Wallet dropdown when active */
.wallet-dropdown.active .connect-wallet-btn {
    background: linear-gradient(135deg, #c77310 0%, #ea9419 100%);
    box-shadow: 
        0 8px 32px rgba(234, 148, 25, 0.5),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.wallet-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}