* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #050505;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 0;
}

/* Clean Balanced Mobile Viewport Container (No Device Frame Graphic) */
.mobile-container {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    max-height: 920px;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

@media (min-width: 480px) {
    .mobile-container {
        margin-top: 20px;
        height: 92vh;
        border-radius: 16px;
        border: 1px solid #1a1a1a;
    }
}

/* MT5 Mobile Top Header */
.mt5-header {
    height: 50px;
    background-color: #000000;
    border-bottom: 1px solid #111111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 10;
}

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

.icon-btn {
    background: none;
    border: none;
    color: #00c8ff;
    font-size: 20px;
    cursor: pointer;
}

.symbol-info .symbol-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.symbol-name .arrow {
    font-size: 10px;
    color: #777777;
}

.symbol-name .tf-badge {
    color: #00c8ff;
    font-weight: 600;
}

.symbol-info .symbol-sub {
    font-size: 10px;
    color: #777777;
}

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

.header-action-btn {
    background: none;
    border: none;
    color: #00c8ff;
    font-size: 16px;
    cursor: pointer;
}

/* Timeframe Quick Touch Pills Bar */
.tf-pills-bar {
    height: 38px;
    background-color: #0a0a0c;
    border-bottom: 1px solid #16161c;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 12;
}

.tf-pill {
    background: #141418;
    color: #888888;
    border: 1px solid #22222a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tf-pill:hover, .tf-pill.active {
    background: rgba(0, 200, 255, 0.2);
    color: #00c8ff;
    border-color: #00c8ff;
}

.sheet-tf-pills {
    display: flex;
    gap: 6px;
    justify-content: space-between;
    margin-top: 6px;
}

.sheet-tf-btn {
    flex: 1;
    background: #18181c;
    color: #888888;
    border: 1px solid #2a2a30;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sheet-tf-btn:hover, .sheet-tf-btn.active {
    background: rgba(0, 200, 255, 0.2);
    color: #00c8ff;
    border-color: #00c8ff;
}

/* Main Chart Viewport */
.chart-viewport {
    flex: 1;
    position: relative;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas#mobileChartCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Floating Controls Button (Placed Bottom Center) */
.floating-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}

.btn-floating-menu {
    background: rgba(18, 18, 20, 0.95);
    color: #00c8ff;
    border: 1px solid rgba(0, 200, 255, 0.4);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    transition: all 0.2s ease;
}

.btn-floating-menu:hover {
    background: rgba(0, 200, 255, 0.2);
    border-color: #00c8ff;
}

/* Expandable Drawer Sheet */
.menu-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f0f12;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 30;
    padding: 12px 18px 28px 18px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9);
}

.menu-sheet.open {
    transform: translateY(0);
}

.sheet-handle-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.sheet-handle {
    width: 38px;
    height: 4px;
    background: #333333;
    border-radius: 2px;
}

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

.sheet-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.btn-close-sheet {
    background: none;
    border: none;
    color: #888888;
    font-size: 16px;
    cursor: pointer;
}

.control-group {
    margin-bottom: 14px;
}

.control-group label {
    display: block;
    font-size: 12px;
    color: #888888;
    margin-bottom: 6px;
}

.status-summary-card {
    background: #141418;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #222228;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-bottom: 8px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row .lbl {
    color: #777777;
}

.summary-row .val {
    color: #ffffff;
    font-weight: 600;
}

.summary-row .val.highlight {
    color: #00c8ff;
}

.signal-pill {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

.signal-pill.buy {
    background: rgba(0, 200, 255, 0.2);
    color: #00c8ff;
    border: 1px solid #00c8ff;
}

.signal-pill.sell {
    background: rgba(255, 0, 127, 0.2);
    color: #ff007f;
    border: 1px solid #ff007f;
}

.btn-action-primary {
    width: 100%;
    background: linear-gradient(135deg, #00c8ff, #0072ff);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 200, 255, 0.3);
}
